0.9.1 corrupt gzip?

Step 3 : RUN curl "https://caddyserver.com/download/build?os=linux&arch=amd64&features=cors%2Cfilemanager%2Cgit%2Chugo%2Cipfilter%2Cjwt%2Clocale%2Cmailout%2Cminify%2Cprometheus%2Cratelimit%2Crealip%2Csearch%2Cupload%2Ccloudflare%2Cdigitalocean%2Cdnsimple%2Cdyn%2Cgandi%2Cgooglecloud%2Cnamecheap%2Crfc2136%2Croute53%2Cvultr"     | tar --no-same-owner -C /usr/bin/ -xz caddy
 ---> Running in d124b81e7713
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0gzip: invalid magic
100    22  100    22    0     0     10      0  0:00:02  0:00:02 --:--:--    10
tar: Child returned status 1
tar: Error is not recoverable: exiting now

Am I doing something wrong or there is something wrong with the download?

1 Like

Oops, the build failed due to (guess) dependencies. I need to update a few of them. Will do that when I get back to my computer.

2 Likes

Thanks for the quick reply!

Should be fixed now. Thanks!

1 Like

I can now successfully build docker images with the custom builds.

However, when trying to launch caddy, it panics immediately. Any ideas why?

caddy_1   | panic: runtime error: index out of range
caddy_1   |
caddy_1   | goroutine 1 [running]:
caddy_1   | panic(0xd26a40, 0xc420010060)
caddy_1   |     /usr/local/go/src/runtime/panic.go:500 +0x1a1
caddy_1   | github.com/mholt/caddy/caddytls.stapleOCSP(0xc420233248, 0xc4202d2000, 0x4f5, 0x6f5, 0x0, 0x0)
caddy_1   |     /tmp/custombuild_5228_457587680/src/github.com/mholt/caddy/caddytls/crypto.go:92 +0xa33
caddy_1   | github.com/mholt/caddy/caddytls.makeCertificate(0xc4202d2000, 0x4f5, 0x6f5, 0xc42020e400, 0x6a8, 0x8a8, 0x0, 0x0, 0x0, 0x0, ...)
caddy_1   |     /tmp/custombuild_5228_457587680/src/github.com/mholt/caddy/caddytls/certificates.go:187 +0x30c
caddy_1   | github.com/mholt/caddy/caddytls.makeCertificateFromDisk(0xc4202bee00, 0x11, 0xc4202bee40, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
caddy_1   |     /tmp/custombuild_5228_457587680/src/github.com/mholt/caddy/caddytls/certificates.go:152 +0x126
caddy_1   | github.com/mholt/caddy/caddytls.cacheUnmanagedCertificatePEMFile(0xc4202bee00, 0x11, 0xc4202bee40, 0x11, 0xc420051e98, 0xc4202a7c01)

caddy_1   |     /tmp/custombuild_5228_457587680/src/github.com/mholt/caddy/caddytls/certificates.go:118 +0x6a
caddy_1   | github.com/mholt/caddy/caddytls.setupTLS(0xc420092fc0, 0x4, 0xe26e1b)
caddy_1   |     /tmp/custombuild_5228_457587680/src/github.com/mholt/caddy/caddytls/setup.go:175 +0x159d
caddy_1   | github.com/mholt/caddy.executeDirectives(0xc4202c0b60, 0x7fff73f23f77, 0xe, 0x17eccc0, 0x26, 0x26, 0xc420263600, 0x3, 0x4, 0x0, ...)

caddy_1   |     /tmp/custombuild_5228_457587680/src/github.com/mholt/caddy/caddy.go:557 +0x597
caddy_1   | github.com/mholt/caddy.startWithListenerFds(0x1751240, 0xc420237900, 0xc4202c0b60, 0x0, 0x64, 0x0)
caddy_1   |     /tmp/custombuild_5228_457587680/src/github.com/mholt/caddy/caddy.go:455 +0x39a
caddy_1   | github.com/mholt/caddy.Start(0x1751240, 0xc420237900, 0x1751240, 0xc420237900, 0x0)
caddy_1   |     /tmp/custombuild_5228_457587680/src/github.com/mholt/caddy/caddy.go:423 +0xff
caddy_1   | github.com/mholt/caddy/caddy/caddymain.Run()
caddy_1   |     /tmp/custombuild_5228_457587680/src/github.com/mholt/caddy/caddy/caddymain/run.go:125 +0x26b
caddy_1   | main.main()
caddy_1   |     /tmp/custombuild_5228_457587680/src/github.com/mholt/caddy/caddy/main.go:13 +0x1b

Not sure if it helps: I tried without any plugin selected, same error.

Woah, what’s your Caddyfile? Something’s weird about the certificate being used.

errr, it’s a self-signed cert. confirmed it’s my cert. works with tls self_signed

I’ll try re-generating a cert.
Thank you!

And, working again after regenerating the cert. Not sure why the previous one that used to work stopped working.

It’s because the certificate had no names – something I frankly didn’t expect when I wrote some 0.9.1 code. I’ll code in a check, since Caddy should never panic, but, glad you fixed your certificate. :wink:

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.