{"record":{"id":"07daeab054323213","repo":"juanfont/headscale","slug":"s-could-not-start-tailscale-container-version-07daea","errorCode":null,"errorMessage":"%s could not start tailscale container (version: %s): %w\n\nDocker build succeeded on retry, but container creation failed. Last %d lines of build output:\n%s","messagePattern":"(.+?) could not start tailscale container \\(version: (.+?)\\): %w\n\nDocker build succeeded on retry, but container creation failed\\. Last (.+?) lines of build output:\n(.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"integration/tsic/tsic.go","lineNumber":524,"sourceCode":"\t\t\t\t}\n\n\t\t\t\trelevantOutput := strings.Join(lines[startLine:], \"\\n\")\n\n\t\t\t\tif buildErr != nil {\n\t\t\t\t\t// The diagnostic build also failed - this is the real error\n\t\t\t\t\treturn nil, fmt.Errorf(\n\t\t\t\t\t\t\"%s could not start tailscale container (version: %s): %w\\n\\nDocker build failed. Last %d lines of output:\\n%s\",\n\t\t\t\t\t\thostname,\n\t\t\t\t\t\tversion,\n\t\t\t\t\t\terr,\n\t\t\t\t\t\tmaxLines,\n\t\t\t\t\t\trelevantOutput,\n\t\t\t\t\t)\n\t\t\t\t}\n\n\t\t\t\tif buildOutput != \"\" {\n\t\t\t\t\t// Build succeeded on retry but container creation still failed\n\t\t\t\t\treturn nil, fmt.Errorf(\n\t\t\t\t\t\t\"%s could not start tailscale container (version: %s): %w\\n\\nDocker build succeeded on retry, but container creation failed. Last %d lines of build output:\\n%s\",\n\t\t\t\t\t\thostname,\n\t\t\t\t\t\tversion,\n\t\t\t\t\t\terr,\n\t\t\t\t\t\tmaxLines,\n\t\t\t\t\t\trelevantOutput,\n\t\t\t\t\t)\n\t\t\t\t}\n\n\t\t\t\t// No output at all - diagnostic build command may have failed\n\t\t\t\treturn nil, fmt.Errorf(\n\t\t\t\t\t\"%s could not start tailscale container (version: %s): %w\\n\\nUnable to get diagnostic build output (command may have failed silently)\",\n\t\t\t\t\thostname,\n\t\t\t\t\tversion,\n\t\t\t\t\terr,\n\t\t\t\t)\n\t\t\t}\n\t\t}","sourceCodeStart":506,"sourceCodeEnd":542,"githubUrl":"https://github.com/juanfont/headscale/blob/565fd254d06c4c7f9a8cad1714a43445c79ba420/integration/tsic/tsic.go#L506-L542","documentation":"Error \"%s could not start tailscale container (version: %s): %w\n\nDocker build succeeded on retry, but container creation failed. Last %d lines of build output:\n%s\" thrown in juanfont/headscale.","triggerScenarios":"Thrown at integration/tsic/tsic.go:524 when the library encounters an invalid state.","commonSituations":"The tailscale container build failed and the retry's container creation also failed. Review the included build output lines for the Docker build error.","solutions":["Inspect the wrapped error for the underlying cause and correct the failing condition (could not start tailscale container (version); retry the operation after fixing the input, configuration, or environment."],"exampleFix":"Inspect the wrapped error for the underlying cause and correct the failing condition (could not start tailscale container (version); retry the operation after fixing the input, configuration, or environment.","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"565fd254d06c4c7f9a8cad1714a43445c79ba420","analyzedAt":"2026-08-15T13:12:30.133Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}