{"record":{"id":"1cd847bdd5127de1","repo":"juanfont/headscale","slug":"s-failed-to-bring-tailscale-client-down-s-w","errorCode":null,"errorMessage":"%s failed to bring tailscale client down (%s): %w","messagePattern":"(.+?) failed to bring tailscale client down \\((.+?)\\): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"integration/tsic/tsic.go","lineNumber":836,"sourceCode":"\t\t\t\"%s failed to bring tailscale client up (%s): %w\",\n\t\t\tt.hostname,\n\t\t\tstrings.Join(command, \" \"),\n\t\t\terr,\n\t\t)\n\t}\n\n\treturn nil\n}\n\n// Down runs `tailscale down` with no arguments.\nfunc (t *TailscaleInContainer) Down() error {\n\tcommand := []string{\n\t\ttailscaleBin,\n\t\t\"down\",\n\t}\n\n\tif _, _, err := t.Execute(command, dockertestutil.ExecuteCommandTimeout(dockerExecuteTimeout)); err != nil { //nolint:noinlineerr\n\t\treturn fmt.Errorf(\n\t\t\t\"%s failed to bring tailscale client down (%s): %w\",\n\t\t\tt.hostname,\n\t\t\tstrings.Join(command, \" \"),\n\t\t\terr,\n\t\t)\n\t}\n\n\treturn nil\n}\n\n// DisconnectFromNetwork detaches the container from network at the\n// docker daemon level. The container's network interface for that\n// network disappears and any in-flight TCP connection is left\n// half-open at the peer — the same failure mode a real cable pull\n// produces, which iptables-based simulations cannot reproduce.\nfunc (t *TailscaleInContainer) DisconnectFromNetwork(network *dockertest.Network) error {\n\treturn dockertestutil.DisconnectContainerFromNetwork(t.pool, network, t.hostname)\n}","sourceCodeStart":818,"sourceCodeEnd":854,"githubUrl":"https://github.com/juanfont/headscale/blob/565fd254d06c4c7f9a8cad1714a43445c79ba420/integration/tsic/tsic.go#L818-L854","documentation":"Error \"%s failed to bring tailscale client down (%s): %w\" thrown in juanfont/headscale.","triggerScenarios":"Thrown at integration/tsic/tsic.go:836 when the library encounters an invalid state.","commonSituations":"'tailscale down' failed inside the container. Check that tailscaled is running in the container.","solutions":["Inspect the wrapped error for the underlying cause and correct the failing condition (failed to bring tailscale client down ()); retry the operation after fixing the input, configuration, or environment."],"exampleFix":"Inspect the wrapped error for the underlying cause and correct the failing condition (failed to bring tailscale client down ()); 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"}