{"record":{"id":"fb208717acefe21f","repo":"microsoft/aspire","slug":"container-runtime-containerruntime-was-found-but-appears-to","errorCode":null,"errorMessage":"Container runtime '{containerRuntime}' was found but appears to be unhealthy. {additionalDetails}","messagePattern":"Container runtime '(.+?)' was found but appears to be unhealthy\\. (.+?)","errorType":"exception","errorClass":"DistributedApplicationException","httpStatus":null,"severity":"error","filePath":"src/Aspire.Hosting/Dcp/DcpDependencyCheck.cs","lineNumber":262,"sourceCode":"            }\n        }\n        else if (!running)\n        {\n            var (message, linkUrl) = BuildContainerRuntimeUnhealthyMessage(containerRuntime);\n\n            // For logging, we want the template format with {Runtime} placeholder\n            var logMessage = message.Replace($\"'{containerRuntime}'\", \"'{Runtime}'\");\n            if (linkUrl is not null)\n            {\n                logMessage += \" For more information, visit: \" + linkUrl;\n            }\n\n            logger.LogWarning(logMessage, containerRuntime);\n\n            logger.LogDebug(\"The error from the container runtime check was: {Error}\", error);\n            if (throwIfUnhealthy)\n            {\n                throw new DistributedApplicationException(message);\n            }\n        }\n    }\n}\n","sourceCodeStart":244,"sourceCodeEnd":267,"githubUrl":"https://github.com/microsoft/aspire/blob/25830f84bd145686607ad00c057b3f84e2e51d43/src/Aspire.Hosting/Dcp/DcpDependencyCheck.cs#L244-L267","documentation":"Same health-check path as the not-found case, but here the container runtime binary exists yet responds as unhealthy; the message includes additional details. With throwIfUnhealthy it throws DistributedApplicationException, otherwise it only logs a warning.","triggerScenarios":"CheckDcpInfoAndLogErrors receives a runtime check result indicating the runtime is installed but not running/healthy (e.g. 'docker ps' or equivalent failed), and throwIfUnhealthy=true.","commonSituations":"Docker Desktop installed but daemon not started, podman machine stopped, daemon restarting after reboot, WSL backend not started, or daemon socket permission problems.","solutions":["Start the container runtime/daemon (open Docker Desktop, 'podman machine start', 'systemctl start docker').","Wait for the daemon to finish starting and re-run the AppHost.","Check daemon status ('docker info' / 'podman info') and fix the reported problem (permissions, WSL, socket).","Reinstall or update the runtime if the daemon repeatedly fails to start."],"exampleFix":"// start the daemon before running the AppHost (shell)\n// sudo systemctl start docker   (Linux)\n// open -a Docker                (macOS)\n// podman machine start          (podman)","handlingStrategy":"retry","validationCode":"// confirm the daemon is actually answering before starting the AppHost\nvar probe = await ExecAsync(\"docker info\"); // or 'podman info'\nif (probe.ExitCode != 0) throw new InvalidOperationException(\"Container daemon is not responding; start it first.\");","typeGuard":null,"tryCatchPattern":"try\n{\n    await distributedApplication.RunAsync();\n}\ncatch (DistributedApplicationException ex) when (ex.Message.Contains(\"unhealthy\"))\n{\n    logger.LogWarning(\"Runtime unhealthy: {Details}. Will prompt user to start daemon.\", ex.Message);\n}","preventionTips":["Start Docker Desktop/podman machine before launching AppHosts, especially after reboots.","Add a health-wait loop (docker info until success) to dev environment setup scripts.","Check WSL2 backend status on Windows when the daemon won't start.","Watch for daemon socket permission errors after Docker upgrades."],"tags":["container-runtime","daemon-not-running","docker","podman"],"backgroundTag":"container-runtime-unhealthy","analyzedSha":"25830f84bd145686607ad00c057b3f84e2e51d43","analyzedAt":"2026-09-16T11:10:06.193Z","contentChangedAt":"2026-09-16T11:10:06.193Z","schemaVersion":2},"datasetVersion":"2026-09-21T04:17:39.646Z"}