{"record":{"id":"0ba7fa81a6e29ab8","repo":"jdx/mise","slug":"compose-command-failed-with-status","errorCode":null,"errorMessage":"compose command failed with {status}","messagePattern":"compose command failed with (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/compose.rs","lineNumber":698,"sourceCode":"        args.extend(self.action_args());\n        let mut commands = vec![(program, args)];\n        if let Some(command) = orphan_removal {\n            commands.push(command);\n        }\n        commands\n    }\n\n    fn run_command(&self, program: &str, args: &[String]) -> Result<()> {\n        if self.sudo {\n            crate::system::sudo::run(program, args, &compose_env())\n        } else {\n            info!(\"$ {} {}\", program, shell_words::join(args));\n            let status = Command::new(program)\n                .args(args)\n                .envs(compose_env())\n                .status()?;\n            if !status.success() {\n                bail!(\"compose command failed with {status}\");\n            }\n            Ok(())\n        }\n    }\n\n    fn stopped_orphan_removal_command(&self) -> Result<Option<(String, Vec<String>)>> {\n        let Some(args) = self.stopped_orphan_removal_args() else {\n            return Ok(None);\n        };\n        let command = self.resolved_engine_command()?;\n        command_with_args(command, args).map(Some)\n    }\n\n    fn dry_run_stopped_orphan_removal_command(&self) -> Result<Option<(String, Vec<String>)>> {\n        let Some(args) = self.stopped_orphan_removal_args() else {\n            return Ok(None);\n        };\n        command_with_args(self.configured_engine_command(), args).map(Some)","sourceCodeStart":680,"sourceCodeEnd":716,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/compose.rs#L680-L716","documentation":"Thrown by `run_command` (used by `run_action`) when a compose/docker engine subprocess exits with a non-zero status. The error carries the raw exit status; the underlying compose output (already logged via info!) explains the actual failure.","triggerScenarios":"Any compose action (up, down, etc.) whose underlying `docker compose` command fails: invalid compose file, port conflicts, image pull failures, engine daemon not running, insufficient resources.","commonSituations":"Docker daemon stopped; compose file syntax errors; ports already bound; image not found/pull denied; out-of-disk or permission problems.","solutions":["Run the same compose command manually to see the real error output","Start the container engine daemon (`systemctl start docker` or start Docker Desktop)","Fix the underlying compose issue (port conflict, missing image, bad YAML) and retry"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"# preflight the compose command manually\ndocker compose -f docker-compose.yml config -q","typeGuard":null,"tryCatchPattern":"match run_action(...) {\n    Err(e) if e.contains(\"compose command failed\") => {\n        eprintln!(\"compose failed; run the command manually for details\");\n    }\n    other => other?,\n}","preventionTips":["Ensure the docker daemon is running before mise tasks","Validate compose files with `docker compose config`","Check for port conflicts and image availability up front"],"tags":["docker-compose","subprocess","exit-code"],"backgroundTag":"command-not-found","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}