{"record":{"id":"1d04cd3812cb655f","repo":"juanfont/headscale","slug":"container-not-ready-w","errorCode":null,"errorMessage":"container not ready: %w","messagePattern":"container not ready: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"integration/tsic/tsic.go","lineNumber":797,"sourceCode":"// \"tailscale up\" with any auth keys stored in environment variables.\nfunc (t *TailscaleInContainer) Restart() error {\n\tif t.container == nil {\n\t\treturn errContainerNotInitialized\n\t}\n\n\t// Use Docker API to restart the container\n\terr := t.pool.Client.RestartContainer(t.container.Container.ID, 30)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"restarting container %s: %w\", t.hostname, err)\n\t}\n\n\t// Wait for the container to be back up and tailscaled to be ready\n\t// We use exponential backoff to poll until we can successfully execute a command\n\t_, err = backoff.Retry(context.Background(), func() (struct{}, error) {\n\t\t// Try to execute a simple command to verify the container is responsive\n\t\t_, _, err := t.Execute([]string{tailscaleBin, \"version\"}, dockertestutil.ExecuteCommandTimeout(5*time.Second))\n\t\tif err != nil {\n\t\t\treturn struct{}{}, fmt.Errorf(\"container not ready: %w\", err)\n\t\t}\n\n\t\treturn struct{}{}, nil\n\t}, backoff.WithBackOff(backoff.NewExponentialBackOff()), backoff.WithMaxElapsedTime(30*time.Second))\n\tif err != nil {\n\t\treturn fmt.Errorf(\"timeout waiting for container %s to restart and become ready: %w\", t.hostname, err)\n\t}\n\n\treturn nil\n}\n\n// Up runs `tailscale up` with no arguments.\nfunc (t *TailscaleInContainer) Up() error {\n\tcommand := []string{\n\t\ttailscaleBin,\n\t\t\"up\",\n\t}\n","sourceCodeStart":779,"sourceCodeEnd":815,"githubUrl":"https://github.com/juanfont/headscale/blob/565fd254d06c4c7f9a8cad1714a43445c79ba420/integration/tsic/tsic.go#L779-L815","documentation":"Error \"container not ready: %w\" thrown in juanfont/headscale.","triggerScenarios":"Thrown at integration/tsic/tsic.go:797 when the library encounters an invalid state.","commonSituations":"The container did not become ready in time after start. Inspect container logs for a crash loop or slow startup.","solutions":["Inspect the wrapped error for the underlying cause and correct the failing condition (container not ready); retry the operation after fixing the input, configuration, or environment."],"exampleFix":"Inspect the wrapped error for the underlying cause and correct the failing condition (container not ready); 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-15T17:31:12.345Z"}