{"record":{"id":"f5328da6fb324713","repo":"kubernetes/kops","slug":"error-listing-endpoints-v","errorCode":null,"errorMessage":"Error listing endpoints: %v","messagePattern":"Error listing endpoints: (.+?)","errorType":"http","errorClass":null,"httpStatus":500,"severity":"error","filePath":"discovery/pkg/discovery/oidc.go","lineNumber":44,"sourceCode":"\tapi \"k8s.io/kops/discovery/apis/discovery.kops.k8s.io/v1alpha1\"\n)\n\nfunc (s *Server) handleOIDCDiscovery(w http.ResponseWriter, r *http.Request) {\n\tctx := r.Context()\n\tlog := klog.FromContext(ctx)\n\n\tuniverseID := r.PathValue(\"universe\")\n\n\thost := r.Host\n\tif host == \"\" {\n\t\tlog.Info(\"Cannot determine host for OIDC discovery\")\n\t\thttp.Error(w, \"Cannot determine host\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\tendpoints, err := s.Store.ListDiscoveryEndpoints(r.Context(), universeID)\n\tif err != nil {\n\t\thttp.Error(w, fmt.Sprintf(\"Error listing endpoints: %v\", err), http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\tissuerURL := \"https://\" + host + \"/\" + universeID + \"/\"\n\n\tvar oidcSpec *api.OIDCSpec\n\tfor _, ep := range endpoints {\n\t\tif ep.Spec.OIDC != nil {\n\t\t\toidcSpec = ep.Spec.OIDC\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif oidcSpec == nil {\n\t\thttp.NotFound(w, r)\n\t\treturn\n\t}\n","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/discovery/pkg/discovery/oidc.go#L26-L62","documentation":"In handleOIDCDiscovery, s.Store.ListDiscoveryEndpoints failed while enumerating DiscoveryEndpoint objects for the universe. The server returns 500 with the underlying store error embedded in the message. This is a backend/storage failure, not a client error.","triggerScenarios":"GET /{universe}/.well-known/openid-configuration where the Store implementation (e.g. etcd/db/file backend) returns an error: backend unreachable, universe not found at store level, permission denied, or corrupt data.","commonSituations":"Discovery store database down or misconfigured; network partition between discovery server and store; wrong universe name; RBAC/credentials for the store expired.","solutions":["Check the discovery server logs for the underlying store error detail.","Verify the store backend (etcd/db) is reachable and healthy from the server.","Confirm the universe exists and credentials/permissions for the store are valid.","Retry the discovery request once the backend recovers."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"resp, err := client.Get(url)\nif err != nil || resp.StatusCode == http.StatusInternalServerError {\n    // retry with backoff; check server/store health\n    time.Sleep(backoff)\n    return retry()\n}","preventionTips":["Monitor the discovery store backend health","Alert on 500s from the discovery service","Cache previously fetched discovery docs client-side"],"tags":["http","oidc","storage","internal-server-error"],"backgroundTag":"backend-store-unavailable","analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}