Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while registering letsencrypt #13

Closed
didasy opened this issue Oct 31, 2016 · 12 comments
Closed

Error while registering letsencrypt #13

didasy opened this issue Oct 31, 2016 · 12 comments
Assignees
Labels

Comments

@didasy
Copy link

didasy commented Oct 31, 2016

Got these errors while opening my site for the first time:

016/10/31 20:50:54 [INFO] acme: Registering account for
2016/10/31 20:50:58 [INFO][snro.worksinmagic.com] acme: Obtaining bundled SAN certificate
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0xc8 pc=0x6b8f43]

goroutine 37 [running]:
panic(0x75b740, 0xc42000e0e0)
        /home/dida/go/src/runtime/panic.go:500 +0x1a1
github.com/labstack/armor/vendor/github.com/rsc/letsencrypt/vendor/github.com/xenolf/lego/acme.(*Client).getChallenges.func1(0xc4204b0bd0, 0xc4204b5560, 0xc4204b5500, 0xc4200d1960, 0x15)
        /home/dida/lib/src/github.com/labstack/armor/vendor/github.com/rsc/letsencrypt/vendor/github.com/xenolf/lego/acme/client.go:406 +0x193
created by github.com/labstack/armor/vendor/github.com/rsc/letsencrypt/vendor/github.com/xenolf/lego/acme.(*Client).getChallenges
        /home/dida/lib/src/github.com/labstack/armor/vendor/github.com/rsc/letsencrypt/vendor/github.com/xenolf/lego/acme/client.go:419 +0x113
@vishr
Copy link
Member

vishr commented Oct 31, 2016

Can you try it with the new release?

@vishr vishr self-assigned this Oct 31, 2016
@didasy
Copy link
Author

didasy commented Oct 31, 2016

Well, it worked now. But gzip plugin throw me these error:

2016/11/01 05:42:11 http2: panic serving 120.188.3.36:8927: interface conversion: middleware.gzipResponseWriter is not http.CloseNotifier: missing method CloseNotify
goroutine 22 [running]:
net/http.(*http2serverConn).runHandler.func1(0xc4200222d8, 0xc420045f6f, 0xc42007cfc0)
    /home/dida/go/src/net/http/h2_bundle.go:4304 +0xd1
panic(0x75bc20, 0xc420450200)
    /home/dida/go/src/runtime/panic.go:458 +0x243
github.com/labstack/armor/vendor/github.com/labstack/echo.(*Response).CloseNotify(0xc42043c6c0, 0x94c100)
    /home/dida/lib/src/github.com/labstack/armor/vendor/github.com/labstack/echo/response.go:91 +0x5f
github.com/labstack/armor/vendor/github.com/labstack/echo.(*Response).CloseNotify(0xc42043c750, 0x7f2a00)
    /home/dida/lib/src/github.com/labstack/armor/vendor/github.com/labstack/echo/response.go:91 +0x73
net/http/httputil.(*ReverseProxy).ServeHTTP(0xc4204501c0, 0x94c100, 0xc42043c750, 0xc420367d10)
    /home/dida/go/src/net/http/httputil/reverseproxy.go:158 +0xac4
github.com/labstack/armor/plugin.(*Proxy).Process.func1(0x952180, 0xc420434b00, 0x3, 0x7bf35d)
    /home/dida/lib/src/github.com/labstack/armor/plugin/proxy.go:96 +0x11d
github.com/labstack/armor/vendor/github.com/labstack/echo.(*Echo).ServeHTTP.func1(0x952180, 0xc420434b00, 0xc420434b00, 0x20)
    /home/dida/lib/src/github.com/labstack/armor/vendor/github.com/labstack/echo/echo.go:504 +0x106
github.com/labstack/armor/vendor/github.com/labstack/echo.(*Echo).ServeHTTP(0xc4200e8180, 0x94c100, 0xc42043c6c0, 0xc420367d10)
    /home/dida/lib/src/github.com/labstack/armor/vendor/github.com/labstack/echo/echo.go:513 +0x1af
github.com/labstack/armor/http.Start.func2(0x952180, 0xc420434a80, 0x794e20, 0xc42043ae40)
    /home/dida/lib/src/github.com/labstack/armor/http/http.go:96 +0xde
github.com/labstack/armor/vendor/github.com/labstack/echo.(*Echo).add.func1(0x952180, 0xc420434a80, 0xc42043ae40, 0x94c600)
    /home/dida/lib/src/github.com/labstack/armor/vendor/github.com/labstack/echo/echo.go:422 +0x96
github.com/labstack/armor/vendor/github.com/labstack/echo/middleware.GzipWithConfig.func1.1(0x952180, 0xc420434a80, 0x0, 0x0)
    /home/dida/lib/src/github.com/labstack/armor/vendor/github.com/labstack/echo/middleware/compress.go:92 +0x3cc
github.com/labstack/armor/vendor/github.com/labstack/echo.(*Echo).ServeHTTP.func1(0x952180, 0xc420434a80, 0xc42002ec00, 0xc420436580)
    /home/dida/lib/src/github.com/labstack/armor/vendor/github.com/labstack/echo/echo.go:504 +0x106
github.com/labstack/armor/vendor/github.com/labstack/echo/middleware.HTTPSRedirectWithConfig.func1.1(0x952180, 0xc420434a80, 0x6, 0x7c1f92)
    /home/dida/lib/src/github.com/labstack/armor/vendor/github.com/labstack/echo/middleware/redirect.go:64 +0x155
github.com/labstack/armor/http.Start.func1.1(0x952180, 0xc420434a80, 0xc420434a80, 0x9)
    /home/dida/lib/src/github.com/labstack/armor/http/http.go:31 +0xa4
github.com/labstack/armor/vendor/github.com/labstack/echo.(*Echo).ServeHTTP(0xc4200e8000, 0x94c3c0, 0xc4200222d8, 0xc420367d10)
    /home/dida/lib/src/github.com/labstack/armor/vendor/github.com/labstack/echo/echo.go:513 +0x1af
net/http.serverHandler.ServeHTTP(0xc420074580, 0x94c3c0, 0xc4200222d8, 0xc420367d10)
    /home/dida/go/src/net/http/server.go:2202 +0x7d
net/http.initNPNRequest.ServeHTTP(0xc4200fe700, 0xc420074580, 0x94c3c0, 0xc4200222d8, 0xc420367d10)
    /home/dida/go/src/net/http/server.go:2670 +0x93
net/http.(*initNPNRequest).ServeHTTP(0xc420436440, 0x94c3c0, 0xc4200222d8, 0xc420367d10)
    <autogenerated>:288 +0x79
net/http.(Handler).ServeHTTP-fm(0x94c3c0, 0xc4200222d8, 0xc420367d10)
    /home/dida/go/src/net/http/h2_bundle.go:4084 +0x4d
net/http.(*http2serverConn).runHandler(0xc42007cfc0, 0xc4200222d8, 0xc420367d10, 0xc42043ade0)
    /home/dida/go/src/net/http/h2_bundle.go:4314 +0x89
created by net/http.(*http2serverConn).processHeaders
    /home/dida/go/src/net/http/h2_bundle.go:4092 +0x6e2

And this is part of my config:

{
  "tls": {
    "auto": true,
    "cache_file": "/home/dida/letsencrypt-cache/snro.cache"
  },
  "plugins": [
    { "name": "https-redirect" },
    { "name": "gzip", "level": 6 }
  ],

@vishr
Copy link
Member

vishr commented Oct 31, 2016

Does it work without gzip plugin?

@didasy
Copy link
Author

didasy commented Oct 31, 2016

Yes, it works without the gzip plugin.

@vishr
Copy link
Member

vishr commented Oct 31, 2016

I am not able to reproduce it with the latest binary. How are you running it? Any steps to reproduce?

@didasy
Copy link
Author

didasy commented Oct 31, 2016

I run it with sudo /path/to/armor -c /path/to/config.json and that's it.

I am using armor v0.2.0 and has go 1.7.3 when go get-ing.

@vishr
Copy link
Member

vishr commented Oct 31, 2016

Have you built the binary yourself?

@didasy
Copy link
Author

didasy commented Oct 31, 2016

No, I was using go get -u github.com/labstack/armor/cmd/armor

Should I just get it from release?

@vishr
Copy link
Member

vishr commented Oct 31, 2016

go get should work too. For debugging, can you download latest binary and try?

@didasy
Copy link
Author

didasy commented Oct 31, 2016

Nope, got the same error. Very strange indeed.

@vishr vishr added the bug label Oct 31, 2016
vishr added a commit to labstack/echo that referenced this issue Oct 31, 2016
Signed-off-by: Vishal Rana <vr@labstack.com>
@vishr
Copy link
Member

vishr commented Oct 31, 2016

Please do go get -u and verify the fix.

@vishr vishr closed this as completed Oct 31, 2016
vishr added a commit that referenced this issue Oct 31, 2016
Signed-off-by: Vishal Rana <vr@labstack.com>
@didasy
Copy link
Author

didasy commented Nov 1, 2016

It works now, thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants