{"record":{"id":"590d7d736c4cb579","repo":"cilium/cilium","slug":"no-healthz-status-api-server-started","errorCode":null,"errorMessage":"no healthz status API server started","messagePattern":"no healthz status API server started","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"daemon/healthz/agenthealth.go","lineNumber":122,"sourceCode":"\t\t\t}()\n\n\t\t\tparams.Logger.Info(\"Starting healthz status API server\", logfields.Address, addr)\n\t\t\tif err := srv.Serve(ln); errors.Is(err, http.ErrServerClosed) {\n\t\t\t\tparams.Logger.Info(\"healthz status API server shutdown\", logfields.Address, addr)\n\t\t\t} else if err != nil {\n\t\t\t\tparams.Logger.Error(\"Error serving healthz status API server\",\n\t\t\t\t\tlogfields.Address, addr,\n\t\t\t\t\tlogfields.Error, err,\n\t\t\t\t)\n\t\t\t\treturn fmt.Errorf(\"failed to start healthz status API server: %w\", err)\n\t\t\t}\n\n\t\t\treturn nil\n\t\t}))\n\t}\n\n\tif available <= 0 {\n\t\treturn fmt.Errorf(\"no healthz status API server started\")\n\t}\n\n\treturn nil\n}\n\ntype agentHealthHandler struct {\n\tlogger          *slog.Logger\n\tconfig          agentHealthConfig\n\tstatusCollector status.StatusCollector\n}\n\nfunc (h *agentHealthHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {\n\trequireK8sConnectivity := h.config.AgentHealthRequireK8sConnectivity\n\tif v := r.Header.Get(\"require-k8s-connectivity\"); v != \"\" {\n\t\tres, err := strconv.ParseBool(v)\n\t\tif err != nil {\n\t\t\th.logger.Warn(\"require-k8s-connectivity should be bool\",\n\t\t\t\tlogfields.Value, v,","sourceCodeStart":104,"sourceCodeEnd":140,"githubUrl":"https://github.com/cilium/cilium/blob/ac7b90affa4baf0642e6685319d56907b3a73a6d/daemon/healthz/agenthealth.go#L104-L140","documentation":"registerAgentHealthHTTPService registers one healthz server job per configured address; 'available' counts how many jobs were actually registered. If zero servers were registered (nothing available to serve), the function returns this sentinel error instead of silently succeeding with no healthz endpoint.","triggerScenarios":"Calling registerAgentHealthHTTPService when the set of configured healthz addresses is empty or all candidates were skipped, so no job was added and available <= 0.","commonSituations":"Misconfigured or missing agent healthz listener configuration in Helm values/ConfigMap; feature flags disabling all healthz listeners while the registration path is still invoked; wiring/registration bug after a version upgrade.","solutions":["Ensure at least one agent healthz address/port is configured (agentHealthPort / healthz configuration in Helm values)","Verify the cell/job wiring registers the healthz server job in your Cilium version; check release notes for healthz config changes","Restart the agent after correcting configuration","If intentionally disabling healthz, remove/skip the registration call instead of registering zero servers"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if len(healthzListenAddrs) == 0 {\n\treturn errors.New(\"no healthz listen addresses configured; set agent healthz port/address\")\n}","typeGuard":null,"tryCatchPattern":"if err := registerAgentHealthHTTPService(params, ...); err != nil {\n\tif strings.Contains(err.Error(), \"no healthz status API server started\") {\n\t\tlog.Warn(\"healthz disabled by configuration; skipping\")\n\t}\n\treturn err\n}","preventionTips":["Always configure at least one healthz address/port","Tie registration to the same config flag that enables healthz","Add a startup self-check that GETs the healthz endpoint","Review config migrations after upgrades"],"tags":["healthz","configuration","startup"],"backgroundTag":"no-healthz-server-configured","analyzedSha":"ac7b90affa4baf0642e6685319d56907b3a73a6d","analyzedAt":"2026-08-31T18:27:15.868Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}