{"record":{"id":"34e6dd6889a4e589","repo":"nats-io/nats-server","slug":"no-available-ocsp-servers-34e6dd","errorCode":null,"errorMessage":"no available ocsp servers","messagePattern":"no available ocsp servers","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/ocsp.go","lineNumber":219,"sourceCode":"\t\t\treturn nil, fmt.Errorf(\"non-ok http status on POST request (reqlen=%d): %d\", len(body), resp.StatusCode)\n\t\t}\n\t\treturn io.ReadAll(resp.Body)\n\t}\n\n\t// Request documentation:\n\t// https://tools.ietf.org/html/rfc6960#appendix-A.1\n\n\treqDER, err := ocsp.CreateRequest(oc.Leaf, oc.Issuer, nil)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\tresponders := oc.Leaf.OCSPServer\n\tif len(overrideURLs) > 0 {\n\t\tresponders = overrideURLs\n\t}\n\tif len(responders) == 0 {\n\t\treturn nil, nil, fmt.Errorf(\"no available ocsp servers\")\n\t}\n\n\toc.mu.Lock()\n\thc := oc.hc\n\toc.mu.Unlock()\n\n\tvar raw []byte\n\tfor _, u := range responders {\n\t\tvar postErr, getErr error\n\t\tu = strings.TrimSuffix(u, \"/\")\n\t\t// Prefer to make POST requests first.\n\t\traw, postErr = postRequestBytes(u, reqDER, hc)\n\t\tif postErr == nil {\n\t\t\terr = nil\n\t\t\tbreak\n\t\t} else {\n\t\t\t// Fallback to use a GET request.\n\t\t\traw, getErr = getRequestBytes(u, reqDER, hc)","sourceCodeStart":201,"sourceCodeEnd":237,"githubUrl":"https://github.com/nats-io/nats-server/blob/3a66a489d262bf89b71a71c955c94920394532f3/server/ocsp.go#L201-L237","documentation":"getRemoteStatus guard: after applying any configured override URLs, the certificate's OCSPServer AIA list is empty, so there is no responder to query for stapling status.","triggerScenarios":"Thrown at server/ocsp.go:219 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reissue the TLS certificate with an OCSP responder URL in its AIA extension","Configure OCSP override URLs in the server's OCSP options"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3a66a489d262bf89b71a71c955c94920394532f3","analyzedAt":"2026-09-02T04:41:54.247Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}