[WebToolsE2E][Aspire] After starting a stopped container, there is error in Console logs: "Error executing command 'resource-start'. Aspire.Hosting.DistributedApplicationException: Failed to delete 'cache-nskrejxr' successfully before restart." #6901
Open
Description
opened on Dec 9, 2024
REFRESSION INFO
- Reproduced in Aspire 9.0.1
INSTALL STEPS
- Clean machine: Win11 x64 23h2
- Install VS 17.13 P3 (with Aspire 9.0.0)
- Install Podman Desktop
REPRO STEPS
- Create .NET Aspire Starter App > .NET 9.0 (Standard Term Support) > Check "Use Redis for caching" > Create
- Build and F5
- Stop and Start the container and navigate to Console logs.
NOTE
- This issue is unstable and shows different error messages when rerunning the project.
- This is also reproduce in .NET 8.0 framework.
ACTUAL
Starting the container again after stopping it shows an error message in Console logs and CMD.
Error executing command 'resource-start'.
Aspire.Hosting.DistributedApplicationException: Failed to delete 'cache-nskrejxr' successfully before restart.
at Aspire.Hosting.Dcp.ApplicationExecutor.<>c__DisplayClass81_2`1.<<StartResourceAsync>b__2>d.MoveNext() in /_/src/Aspire.Hosting/Dcp/ApplicationExecutor.cs:line 2133
--- 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__DisplayClass81_0.<<StartResourceAsync>g__StartExecutableOrContainerAsync|0>d`1.MoveNext() in /_/src/Aspire.Hosting/Dcp/ApplicationExecutor.cs:line 2128
--- 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 2074
at Aspire.Hosting.ApplicationModel.CommandsConfigurationExtensions.<>c.<<AddLifeCycleCommands>b__3_1>d.MoveNext() in /_/src/Aspire.Hosting/ApplicationModel/CommandsConfigurationExtensions.cs:line 29
--- 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 99
CMD:
EXPECTED
There should be no errors when stopping and starting the container.
Activity