Closed didasy closed 8 years ago
Can you try it with the new release?
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 }
],
Does it work without gzip plugin?
Yes, it works without the gzip plugin.
I am not able to reproduce it with the latest binary. How are you running it? Any steps to reproduce?
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.
Have you built the binary yourself?
No, I was using go get -u github.com/labstack/armor/cmd/armor
Should I just get it from release?
go get
should work too. For debugging, can you download latest binary and try?
Nope, got the same error. Very strange indeed.
Please do go get -u
and verify the fix.
It works now, thank you very much!
Got these errors while opening my site for the first time: