microsoft/aspire · error · DistributedApplicationException
is not running. Start and try again.
Error message
{containerRuntime.Name} is not running. Start {containerRuntime.Name} and try again. What it means
During the pipeline's push prerequisites step, Aspire checks that the configured container runtime (Docker or Podman) is reachable/running. If the runtime fails to start or connect within the wait window, it throws DistributedApplicationException telling you to start the runtime before retrying. No image build/push can proceed without a working container runtime.
Solutions
- Start your container runtime: launch Docker Desktop or run `sudo systemctl start docker`, or `podman machine start` for Podman.
- Verify connectivity with `docker info` (or `podman info`) before rerunning the pipeline.
- Check DOCKER_HOST/CONTAINER_HOST environment variables point to a reachable daemon (e.g. mount /var/run/docker.sock in CI containers).
- On Linux, ensure your user is in the docker group or has permission to the daemon socket.
Example fix
// before (terminal) aspire publish # fails: Docker is not running // after (terminal) sudo systemctl start docker # or: open Docker Desktop / podman machine start docker info # verify daemon is up aspire publish
Defensive patterns
Strategy: validation
Validate before calling
var runtime = args.Contains("--podman") ? "podman" : "docker";
var psi = new ProcessStartInfo(runtime, "info") { RedirectStandardOutput = true };
using var p = Process.Start(psi)!;
await p.WaitForExitAsync();
if (p.ExitCode != 0) throw new InvalidOperationException($"{runtime} daemon is not reachable; start it before running the pipeline."); Type guard
bool IsRuntimeReachable(string runtime)
{
try { using var p = Process.Start(new ProcessStartInfo(runtime, "info") { RedirectStandardOutput = true }); p!.WaitForExit(5000); return p.ExitCode == 0; }
catch { return false; }
} Try / catch
try
{
await pipeline.RunAsync(context);
}
catch (DistributedApplicationException ex) when (ex.Message.Contains("is not running"))
{
logger.LogError("Start the container runtime (Docker Desktop / podman machine start) and retry.");
} Prevention
- Start Docker Desktop or podman machine before dev/deploy sessions
- Add a pre-flight `docker info` / `podman info` check to CI jobs
- In CI containers, mount the Docker socket or configure DOCKER_HOST correctly
- Ensure your user has daemon socket permissions (docker group on Linux)
When it happens
Trigger: Executing a pipeline with container build/push steps when `docker info`/`podman info` fails or the runtime daemon isn't started; the code waits for the runtime to start, times out, and falls through to this throw.
Common situations: Docker Desktop not launched on Windows/macOS, podman machine not started (`podman machine init && podman machine start`), Docker daemon crashed, running in a container/CI without the Docker socket mounted, or DOCKER_HOST pointing at an unreachable endpoint.
Understand the failure class
Background: ECONNREFUSED and "connection refused" / "could not connect to server" errors: what they mean and how to fix them — this error's family across 44 libraries.
Related errors
- Container runtime ' ' could not be found. See…
- Container runtime ' ' was found but appears to be unhealthy.
- Container runtime ' ' was not found on PATH. Install or set…
- Container runtime ' ' is not running or is unhealthy.
- ASPIRE_REMOTE_APPHOST_TOKEN environment variable is not set.
AI-assisted analysis of microsoft/aspire@25830f84bd (2026-09-16).
Data as JSON: /api/errors/ad3cb927ff8662f9.
Report an issue: GitHub.
Appendix: source
Thrown at src/Aspire.Hosting/Pipelines/DistributedApplicationPipeline.cs:210
waitCts.CancelAfter(TimeSpan.FromMinutes(5));
try
{
while (!await containerRuntime.CheckIfRunningAsync(waitCts.Token).ConfigureAwait(false))
{
await Task.Delay(TimeSpan.FromSeconds(2), timeProvider, waitCts.Token).ConfigureAwait(false);
}
return;
}
catch (OperationCanceledException) when (!context.CancellationToken.IsCancellationRequested)
{
// Timed out waiting for the runtime to start — fall through to the error below
}
}
}
throw new DistributedApplicationException(
$"{containerRuntime.Name} is not running. Start {containerRuntime.Name} and try again.");
}
});
// Add a default "Push" meta-step that all push steps should be required by
// Push unconditionally depends on PushPrereq to ensure annotations are set up
var pushStep = new PipelineStep
{
Name = WellKnownPipelineSteps.Push,
Description = "Aggregation step for all push operations. All push steps should be required by this step.",
Action = _ => Task.CompletedTask
};
pushStep.DependsOn(WellKnownPipelineSteps.PushPrereq);
_steps.Add(pushStep);
_steps.Add(new PipelineStep
{
Name = WellKnownPipelineSteps.PushPrereq,View on GitHub (pinned to 25830f84bd)