-
Couldn't load subscription status.
- Fork 712
Labels
area-app-modelIssues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplicationIssues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplicationarea-orchestrator
Milestone
Description
INSTALL STEPS
-
Clean machine: Win11 x64 23h2 ENU
-
Install SDK 9.0.100-rc.2.24474.11
- Apply feed for SDK 9.0 RC2
-
Install Aspire 9.0.0-preview.4.24475.9
- Apply the dotnet8 feed for Aspire 9.0
REPRO STEPS
- Open CMD, create an Aspire Starter App using following commands:
dotnet new aspire-starter -o AspireStarterApp
cd AspireStarterApp
- Add the Aspire.Confluent.Kafka component to your AspireStarterApp.Web app:
cd AspireStarterApp.Web
dotnet add package Aspire.Confluent.Kafka --version 9.0.0-preview.4.24475.9
- In the Program.cs file of the AspireStarterApp.Web project, type following codes:
builder.AddKafkaProducer<string, string>("messaging"); - Open appsettings.json of AspireStarterApp.AppHost project, add ConnectionStrings configuration section:
{
"ConnectionStrings": {
"myConnection": "broker:9092"
}
}
- Add the Aspire.Hosting.Kafka component to your AspireStarterApp.AppHost app:
cd ..
cd AspireStarterApp.AppHost
dotnet add package Aspire.Hosting.Kafka --version 9.0.0-preview.4.24475.9
- Open Program.cs of AspireStarterApp.AppHost project, add following codes:
var messaging = builder.AddKafka("messaging");
var myService = builder.AddProject<Projects.MyService>()
.WithReference(messaging);
- Run the project in CMD, and open URL in the browser.
dotnet run - Click the 'Restart' option behind the messaging container resource in the Aspire dashboard
ACTUAL
Restart failed with some errors in the console


Error Log:
2024-09-27T02:55:20 Executing command 'restart'.
2024-09-27T02:55:23
Error executing command 'restart'.
Aspire.Hosting.DistributedApplicationException: Failed to delete 'messaging-rmdxzjam' successfully before restart.
at Aspire.Hosting.Dcp.ApplicationExecutor.<>c__DisplayClass80_2`1.<<StartResourceAsync>b__2>d.MoveNext() in /_/src/Aspire.Hosting/Dcp/ApplicationExecutor.cs:line 2098
--- End of stack trace from previous location ---
at Polly.ResiliencePipeline.<>c.<<ExecuteAsync>b__3_0>d.MoveNext()
--- End of stack trace from previous location ---
at Polly.Outcome`1.GetResultOrRethrow()
at Polly.ResiliencePipeline.ExecuteAsync(Func`2 callback, CancellationToken cancellationToken)
at Aspire.Hosting.Dcp.ApplicationExecutor.<>c__DisplayClass80_0.<<StartResourceAsync>g__StartExecutableOrContainerAsync|0>d`1.MoveNext() in /_/src/Aspire.Hosting/Dcp/ApplicationExecutor.cs:line 2093
--- End of stack trace from previous location ---
at Aspire.Hosting.Dcp.ApplicationExecutor.StartResourceAsync(String resourceName, CancellationToken cancellationToken) in /_/src/Aspire.Hosting/Dcp/ApplicationExecutor.cs:line 2041
at Aspire.Hosting.ApplicationModel.CommandsConfigurationExtensions.<>c.<<AddLifeCycleCommands>b__3_5>d.MoveNext() in /_/src/Aspire.Hosting/ApplicationModel/CommandsConfigurationExtensions.cs:line 88
--- End of stack trace from previous location ---
at Aspire.Hosting.Dashboard.DashboardCommandExecutor.ExecuteCommandAsync(String resourceId, ResourceCommandAnnotation annotation, CancellationToken cancellationToken) in /_/src/Aspire.Hosting/Dashboard/DashboardCommandExecutor.cs:line 31
at Aspire.Hosting.Dashboard.DashboardServiceData.ExecuteCommandAsync(String resourceId, String type, CancellationToken cancellationToken) in /_/src/Aspire.Hosting/Dashboard/DashboardServiceData.cs:line 108
andrem0
Metadata
Metadata
Assignees
Labels
area-app-modelIssues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplicationIssues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplicationarea-orchestrator