{"record":{"id":"f5b78facefccc0f6","repo":"juanfont/headscale","slug":"reaching-derp-server-w","errorCode":null,"errorMessage":"reaching DERP server: %w","messagePattern":"reaching DERP server: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"integration/scenario.go","lineNumber":1541,"sourceCode":"\t\terr := user.syncWaitGroup.Wait()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// CreateDERPServer creates a new DERP server in a container.\nfunc (s *Scenario) CreateDERPServer(version string, opts ...dsic.Option) (*dsic.DERPServerInContainer, error) {\n\tderp, err := dsic.New(s.pool, version, s.Networks(), opts...)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"creating DERP server: %w\", err)\n\t}\n\n\terr = derp.WaitForRunning()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"reaching DERP server: %w\", err)\n\t}\n\n\ts.derpServers = append(s.derpServers, derp)\n\n\treturn derp, nil\n}\n\ntype scenarioOIDC struct {\n\tr   *dockertest.Resource\n\tcfg *types.OIDCConfig\n}\n\nfunc (o *scenarioOIDC) Issuer() string {\n\tif o.cfg == nil {\n\t\tpanic(\"OIDC has not been created\")\n\t}\n\n\treturn o.cfg.Issuer","sourceCodeStart":1523,"sourceCodeEnd":1559,"githubUrl":"https://github.com/juanfont/headscale/blob/565fd254d06c4c7f9a8cad1714a43445c79ba420/integration/scenario.go#L1523-L1559","documentation":"The DERP container was created but `WaitForRunning()` never observed it become healthy — the embedded health check (HTTP probe against the DERP port) kept failing until its timeout. Wraps the last probe error.","triggerScenarios":"CreateDERPServer starts the container, then polls readiness; the DERP server crashes on startup (bad config, port bind failure) or is unreachable on the Docker network, so the wait times out.","commonSituations":"DERP server misconfiguration passed via opts; container exits immediately (check `docker logs`); Docker network segmentation preventing the probe from reaching the port; slow CI machine exceeding the fixed wait budget.","solutions":["Inspect the DERP container logs to see why it did not become healthy.","Verify the container is on the same Docker network(s) as the prober.","Fix any DERP config passed via dsic options (cert mode, port).","On slow runners, retry the scenario once after confirming the container eventually starts."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Docker-inspect the DERP container and read its logs the moment WaitForRunning fails.","Validate DERP options (ports, certs) before passing them.","Budget wait times for slow CI hardware rather than assuming local speed."],"tags":["docker","integration","derp","readiness"],"backgroundTag":null,"analyzedSha":"565fd254d06c4c7f9a8cad1714a43445c79ba420","analyzedAt":"2026-08-15T13:12:30.133Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}