{"record":{"id":"4a670367209501c7","repo":"bcicen/ctop","slug":"cannot-stop-container-v","errorCode":null,"errorMessage":"cannot stop container: %v","messagePattern":"cannot stop container: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"connector/manager/docker.go","lineNumber":119,"sourceCode":"func (dc *Docker) Stop() error {\n\tif err := dc.client.StopContainer(dc.id, 3); err != nil {\n\t\treturn fmt.Errorf(\"cannot stop container: %v\", err)\n\t}\n\treturn nil\n}","sourceCodeStart":101,"sourceCodeEnd":137,"githubUrl":"https://github.com/bcicen/ctop/blob/59f00dd6aaebf48f3bc501e174f75f815c2619f0/connector/manager/docker.go#L101-L137","documentation":"Wraps the error from the Docker Remote API's StopContainer call (3-second grace period) in Docker.Stop. It fires when the daemon cannot stop the container — the container is already stopped or does not exist, or the daemon is unreachable.","triggerScenarios":"Thrown at connector/manager/docker.go:119 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ignore 'container already stopped' errors as idempotent success","Confirm the container ID with docker inspect before stopping","Retry once after a short delay to cover transient daemon/connection failures","Check Docker daemon health and socket permissions if errors persist"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"59f00dd6aaebf48f3bc501e174f75f815c2619f0","analyzedAt":"2026-09-02T23:34:03.832Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T02:17:09.455Z"}