{"record":{"id":"08a90894ae29a70c","repo":"bcicen/ctop","slug":"cannot-restart-container-v","errorCode":null,"errorMessage":"cannot restart container: %v","messagePattern":"cannot restart container: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"connector/manager/docker.go","lineNumber":147,"sourceCode":"func (dc *Docker) Restart() error {\n\tif err := dc.client.RestartContainer(dc.id, 3); err != nil {\n\t\treturn fmt.Errorf(\"cannot restart container: %v\", err)\n\t}\n\treturn nil\n}","sourceCodeStart":129,"sourceCodeEnd":151,"githubUrl":"https://github.com/bcicen/ctop/blob/59f00dd6aaebf48f3bc501e174f75f815c2619f0/connector/manager/docker.go#L129-L151","documentation":"Wraps the error from the Docker Remote API's RestartContainer call (3-second stop timeout) in Docker.Restart. It fires when the daemon cannot stop-then-start the container — the container does not exist, is stuck stopping, or fails to start again (port conflict, image issue).","triggerScenarios":"Thrown at connector/manager/docker.go:147 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the container exists and is not wedged with docker inspect","Increase the stop timeout if the container does not terminate within 3 seconds","Retry the restart after transient daemon/connection errors","Check daemon logs for the underlying start failure if the container fails to come back"],"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"}