1. The problem I’m having:
I’ve been using the Bunny CDN DNS module for 5 months now. But I’m not sure exactly when, maybe some days ago, it seems its broken or something, because I have not changed anything in the configs lately.
2. Error messages and/or full log output:
I’m seeing this error in the logs.
{
"level": "info",
"ts": 1734024513.6386855,
"msg": "panic: certificate worker: runtime error: index out of range [0] with length 0\ngoroutine 51 [running]:\ngithub.com/caddyserver/certmagic.(*jobManager).worker.func1()\n\tgithub.com/caddyserver/certmagic@v0.21.3/async.go:58 +0x65\npanic({0x1869600?, 0xc0007c4ed0?})\n\truntime/panic.go:770 +0x132\ngithub.com/libdns/bunny.getZoneID({0x1e767c8, 0xc00077ee40}, {0xc00043e550, 0x48}, {0xc0002f19b0?, 0x0?})\n\tgithub.com/libdns/bunny@v0.1.0/client.go:82 +0x1ac\ngithub.com/libdns/bunny.createRecord({0x1e767c8, 0xc00077ee40}, {0xc00043e550, 0x48}, {0xc0002f19b0, 0x20}, {{0x0, 0x0}, {0x19424f1, 0x3}, ...})\n\tgithub.com/libdns/bunny@v0.1.0/client.go:122 +0x85\ngithub.com/libdns/bunny.(*Provider).AppendRecords(0xc000500b70, {0x1e767c8, 0xc00077ee40}, {0xc0002f19b0, 0x21}, {0xc000712780?, 0x168cc00?, 0x1?})\n\tgithub.com/libdns/bunny@v0.1.0/provider.go:31 +0x26a\ngithub.com/caddyserver/certmagic.(*DNSManager).createRecord(0xc0002c0d20, {0x1e767c8, 0xc00077ee40}, {0xc0003d6f00, 0x20}, {0x19424f1, 0x3}, {0xc0002f18c0, 0x2b})\n\tgithub.com/caddyserver/certmagic@v0.21.3/solvers.go:401 +0x815\ngithub.com/caddyserver/certmagic.(*DNS01Solver).Present(0xc0002c0d20, {0x1e767c8, 0xc00077ee40}, {{0xc0002b1a68, 0x6}, {0xc000736840, 0x54}, {0xc0002b1a70, 0x7}, {0x0, ...}, ...})\n\tgithub.com/caddyserver/certmagic@v0.21.3/solvers.go:265 +0x19e\ngithub.com/caddyserver/certmagic.solverWrapper.Present({{0x1e6d848?, 0xc0002c0d20?}}, {0x1e767c8, 0xc00077ee40}, {{0xc0002b1a68, 0x6}, {0xc000736840, 0x54}, {0xc0002b1a70, 0x7}, ...})\n\tgithub.com/caddyserver/certmagic@v0.21.3/solvers.go:827 +0x22e\ngithub.com/mholt/acmez/v2.(*Client).presentForNextChallenge(0xc0008be2c0, {0x1e767c8, 0xc00077ee40}, 0xc00097b340)\n\tgithub.com/mholt/acmez/v2@v2.0.1/client.go:410 +0x7ab\ngithub.com/mholt/acmez/v2.(*Client).solveChallenges(_, {_, _}, {{0xc000714d38, 0x5}, {0x0, 0x0, 0x0}, 0x1, {0x0, ...}, ...}, ...)\n\tgithub.com/mholt/acmez/v2@v2.0.1/client.go:361 +0x26d\ngithub.com/mholt/acmez/v2.(*Client).ObtainCertificate(0xc0008be2c0, {0x1e767c8, 0xc00077ee40}, {{{0xc000714d38, 0x5}, {0x0, 0x0, 0x0}, 0x1, {0x0, ...}, ...}, ...})\n\tgithub.com/mholt/acmez/v2@v2.0.1/client.go:136 +0x598\ngithub.com/caddyserver/certmagic.(*ACMEIssuer).doIssue(0xc0008b7e00, {0x1e767c8, 0xc00077ee40}, 0xc0006bc008, 0x0)\n\tgithub.com/caddyserver/certmagic@v0.21.3/acmeissuer.go:477 +0x648\ngithub.com/caddyserver/certmagic.(*ACMEIssuer).Issue(0xc0008b7e00, {0x1e767c8, 0xc00077ee40}, 0xc0006bc008)\n\tgithub.com/caddyserver/certmagic@v0.21.3/acmeissuer.go:371 +0xa7\ngithub.com/caddyserver/caddy/v2/modules/caddytls.(*ACMEIssuer).Issue(0x2a89150?, {0x1e767c8?, 0xc00077ee40?}, 0xc0008be190?)\n\tgithub.com/caddyserver/caddy/v2@v2.8.4/modules/caddytls/acmeissuer.go:248 +0x25\ngithub.com/caddyserver/certmagic.(*Config).obtainCert.func2({0x1e767c8, 0xc00077ee40})\n\tgithub.com/caddyserver/certmagic@v0.21.3/config.go:620 +0xc84\ngithub.com/caddyserver/certmagic.doWithRetry({0x1e76800, 0xc00040b0e0}, 0xc00071c800, 0xc000787998)\n\tgithub.com/caddyserver/certmagic@v0.21.3/async.go:104 +0x233\ngithub.com/caddyserver/certmagic.(*Config).obtainCert(0xc00080b880, {0x1e76800, 0xc00040b0e0}, {0xc000418258, 0x12}, 0x0)\n\tgithub.com/caddyserver/certmagic@v0.21.3/config.go:694 +0x729\ngithub.com/caddyserver/certmagic.(*Config).ObtainCertAsync(...)\n\tgithub.com/caddyserver/certmagic@v0.21.3/config.go:499\ngithub.com/caddyserver/certmagic.(*Config).manageOne.func1()\n\tgithub.com/caddyserver/certmagic@v0.21.3/config.go:409 +0x73\ngithub.com/caddyserver/certmagic.(*jobManager).worker(0x2aa8220)\n\tgithub.com/caddyserver/certmagic@v0.21.3/async.go:73 +0x11b\ncreated by github.com/caddyserver/certmagic.(*jobManager).Submit in goroutine 1\n\tgithub.com/caddyserver/certmagic@v0.21.3/async.go:50 +0x279"
}
After this I see this type of error all the time non-stop:
{
"level": "error",
"ts": 1734024513.7185519,
"logger": "tls.issuance.acme.acme_client",
"msg": "validating authorization",
"identifier": "mysite.com",
"problem": {
"type": "urn:ietf:params:acme:error:tls",
"title": "",
"detail": "84.17.63.178: remote error: tls: no application protocol",
"instance": "",
"subproblems": []
},
"order": "https://acme-staging-v02.api.letsencrypt.org/acme/order/158696983/21239318364",
"attempt": 1,
"max_attempts": 3
}
3. Caddy version:
Docker caddy:latest
4. How I installed and ran Caddy:
This is my current Caddyfile config:
(tls) {
tls {
dns bunny API_TOKEN
}
}
*.mysite.com {
root * /srv/mysite
file_server
php_fastcgi unix//run/php/php-fpm.sock {
root /var/www/html
}
import tls
}