{"record":{"id":"07f3d2f211c9122c","repo":"tailscale/tailscale","slug":"failed-to-watch-ipn-bus-w","errorCode":null,"errorMessage":"failed to watch IPN bus: %w","messagePattern":"failed to watch IPN bus: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kube/health/healthz.go","lineNumber":65,"sourceCode":"\t} else {\n\t\thttp.Error(w, \"node currently has no tailscale IPs\", http.StatusServiceUnavailable)\n\t}\n}\n\nfunc (h *Healthz) Update(healthy bool) {\n\th.Lock()\n\tdefer h.Unlock()\n\n\tif h.hasAddrs != healthy {\n\t\th.logger(\"Setting healthy %v\", healthy)\n\t}\n\th.hasAddrs = healthy\n}\n\nfunc (h *Healthz) MonitorHealth(ctx context.Context, lc *local.Client) error {\n\tw, err := lc.WatchIPNBus(ctx, ipn.NotifyInitialNetMap)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to watch IPN bus: %w\", err)\n\t}\n\n\tfor {\n\t\tn, err := w.Next()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif self := n.SelfChange; self != nil {\n\t\t\th.Update(len(self.Addresses) != 0)\n\t\t}\n\t}\n}\n\n// RegisterHealthHandlers registers a simple health handler at /healthz.\n// A containerized tailscale instance is considered healthy if\n// it has at least one tailnet IP address.\nfunc RegisterHealthHandlers(mux *http.ServeMux, podIPv4, podIPv6 string, logger logger.Logf) *Healthz {","sourceCodeStart":47,"sourceCodeEnd":83,"githubUrl":"https://github.com/tailscale/tailscale/blob/6e0912f97994f927632b34ae9e63b53d6516a6ac/kube/health/healthz.go#L47-L83","documentation":"Opening an IPN bus watch with initial netmap failed at the start of health monitoring, so the proxy's readiness endpoint can never observe the node's addresses; monitoring returns the error to the caller.","triggerScenarios":"Thrown at kube/health/healthz.go:65 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Watching the IPN bus for health checks failed; verify tailscaled is up and the local API socket is accessible."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6e0912f97994f927632b34ae9e63b53d6516a6ac","analyzedAt":"2026-08-18T08:17:25.280Z","contentChangedAt":"2026-08-18T08:17:25.280Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}