{"record":{"id":"7cee4fa815ff7fcc","repo":"juanfont/headscale","slug":"s-starting-tailscale-derper-container-version","errorCode":null,"errorMessage":"%s starting tailscale DERPer container (version: %s): %w","messagePattern":"(.+?) starting tailscale DERPer container \\(version: (.+?)\\): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"integration/dsic/dsic.go","lineNumber":253,"sourceCode":"\t\t})\n\tdefault:\n\t\tbuildOptions.BuildArgs = append(buildOptions.BuildArgs, docker.BuildArg{\n\t\t\tName:  \"VERSION_BRANCH\",\n\t\t\tValue: \"v\" + version,\n\t\t})\n\t}\n\t// Add integration test labels if running under hi tool\n\tdockertestutil.DockerAddIntegrationLabels(runOptions, \"derp\")\n\n\tcontainer, err = pool.BuildAndRunWithBuildOptions(\n\t\tbuildOptions,\n\t\trunOptions,\n\t\tdockertestutil.DockerRestartPolicy,\n\t\tdockertestutil.DockerAllowLocalIPv6,\n\t\tdockertestutil.DockerAllowNetworkAdministration,\n\t)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\n\t\t\t\"%s starting tailscale DERPer container (version: %s): %w\",\n\t\t\thostname,\n\t\t\tversion,\n\t\t\terr,\n\t\t)\n\t}\n\n\tlog.Printf(\"Created %s container\\n\", hostname)\n\n\tdsic.container = container\n\n\tfor i, cert := range dsic.caCerts {\n\t\terr = dsic.WriteFile(fmt.Sprintf(\"%s/user-%d.crt\", caCertRoot, i), cert)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"writing TLS certificate to container: %w\", err)\n\t\t}\n\t}\n","sourceCodeStart":235,"sourceCodeEnd":271,"githubUrl":"https://github.com/juanfont/headscale/blob/565fd254d06c4c7f9a8cad1714a43445c79ba420/integration/dsic/dsic.go#L235-L271","documentation":"Returned by the DERP integration-test helper when pool.BuildAndRunWithBuildOptions fails to build and start the tailscale DERPer container. It wraps the dockertest error with the intended container hostname and tailscale version for diagnosis.","triggerScenarios":"Running integration tests that spin up a DERPer while the Docker daemon is unreachable, the image build fails, or resource limits (disk, memory, network creation) prevent the container from starting.","commonSituations":"Docker daemon not running or the user lacking Docker permissions; CI runners with exhausted disk; pulling base images behind a restricted network; leftover networks/subnet exhaustion from prior failed runs.","solutions":["Verify Docker is reachable: docker ps works from the same user","Clean up leftovers from failed runs (docker network prune, hi cleanup / docker system prune)","Free disk/memory on the host and retry; check the build log for the failing Dockerfile step"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// preflight before tests that start a DERPer\nfunc dockerReachable() error {\n    cli, err := client.NewClientWithOpts(client.FromEnv)\n    if err != nil {\n        return err\n    }\n    _, err = cli.Info(context.Background())\n    return err\n}","typeGuard":null,"tryCatchPattern":"if err := dockerReachable(); err != nil {\n    t.Skipf(\"docker unavailable: %v\", err)\n}","preventionTips":["Run `go run ./cmd/hi doctor` before integration sessions","Prune docker networks/system between CI jobs to avoid resource exhaustion","Ensure the CI user is in the docker group"],"tags":["integration-test","docker","derp","infrastructure"],"backgroundTag":null,"analyzedSha":"565fd254d06c4c7f9a8cad1714a43445c79ba420","analyzedAt":"2026-08-15T13:12:30.133Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}