{"record":{"id":"ccb28cd37c0bba81","repo":"nats-io/nats-server","slug":"failed-to-write-ocsp-status-w","errorCode":null,"errorMessage":"failed to write ocsp status: %w","messagePattern":"failed to write ocsp status: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/ocsp.go","lineNumber":260,"sourceCode":"\t\t\t\terr = errors.Join(postErr, getErr)\n\t\t\t}\n\t\t}\n\t}\n\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"exhausted ocsp servers: %w\", err)\n\t}\n\tresp, err := ocsp.ParseResponse(raw, oc.Issuer)\n\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"failed to get remote status: %w\", err)\n\t}\n\tif err := validOCSPResponse(resp); err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\tif storeDir := opts.StoreDir; storeDir != _EMPTY_ {\n\t\tkey := fmt.Sprintf(\"%x\", sha256.Sum256(oc.Leaf.Raw))\n\t\tif err := oc.writeOCSPStatus(storeDir, key, raw); err != nil {\n\t\t\treturn nil, nil, fmt.Errorf(\"failed to write ocsp status: %w\", err)\n\t\t}\n\t}\n\n\toc.mu.Lock()\n\toc.raw = raw\n\toc.resp = resp\n\toc.mu.Unlock()\n\n\treturn raw, resp, nil\n}\n\nfunc (oc *OCSPMonitor) run() {\n\ts := oc.srv\n\ts.mu.Lock()\n\tquitCh := s.quitCh\n\ts.mu.Unlock()\n\n\tvar doShutdown bool","sourceCodeStart":242,"sourceCodeEnd":278,"githubUrl":"https://github.com/nats-io/nats-server/blob/3a66a489d262bf89b71a71c955c94920394532f3/server/ocsp.go#L242-L278","documentation":"getRemoteStatus: after successfully fetching and parsing a fresh OCSP response, persisting it to the local cache under <store_dir>/jetstream/ocsp failed; the write error is wrapped with this context.","triggerScenarios":"Thrown at server/ocsp.go:260 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check disk space and permissions on the store_dir","Retry on the next monitor cycle once the filesystem issue is fixed"],"exampleFix":null,"handlingStrategy":"retry","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"}