Caddy v2.8.4 started printing an error for one domain:
Jul 27 12:06:59 caddy-proxy-sbg7 caddy[1208]: {"level":"info","ts":1722074819.7958932,"logger":"tls.on_demand","msg":"obtaining new certificate","remote_ip":"77.141.97.142","remote_port":"49984","server_name":"server.example.com"}
Jul 27 12:06:59 caddy-proxy-sbg7 caddy[1208]: {"level":"error","ts":1722074819.8085268,"logger":"tls.on_demand","msg":"loading newly-obtained certificate from storage","remote_ip":"77.141.97.142","remote_port":"49984","server_name":"server.example.com","error":"no matching certificate to load for server.example.com: decoding certificate metadata: invalid character '}' after top-level value"}
{
"sans": [
"server.example.com"
],
"issuer_data": {
"url": "https://acme-v02.api.letsencrypt.org/acme/cert/042fb47e52c51ab43af43257f1ba5e8",
"ca": "https://acme-v02.api.letsencrypt.org/directory",
"renewal_info": {
"suggestedWindow": {
"start": "2024-09-23T06:58:45.333333334Z",
"end": "2024-09-25T06:58:45.333333334Z"
},
"_uniqueIdentifier": "kydGmAOpUWiOmNbEI.BC-0flLFGrQ69DL_idV_G6Xo",
"_retryAfter": "2024-07-27T09:40:01.93861755+02:00",
"_selectedTime": "2024-09-24T03:22:43Z"
}
}
}}
Removing the extra } at the bottom of the file /caddy/certificates/acme-v02.api.letsencrypt.org-directory/server.example.com/server.example.com.json fixes the error.
Caddy v2.8.4 started printing an error for one domain:
Removing the extra
}at the bottom of the file/caddy/certificates/acme-v02.api.letsencrypt.org-directory/server.example.com/server.example.com.jsonfixes the error.