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

Webpages not rendering completly when using error pages #5385

Closed
1 of 2 tasks
Leosirth opened this issue Sep 14, 2019 · 12 comments
Closed
1 of 2 tasks

Webpages not rendering completly when using error pages #5385

Leosirth opened this issue Sep 14, 2019 · 12 comments
Assignees
Labels
area/middleware kind/bug/possible a possible bug that needs analysis before it is confirmed or fixed. priority/P1 need to be fixed in next release status/5-frozen-due-to-age
Milestone

Comments

@Leosirth
Copy link

Do you want to request a feature or report a bug?

Bug

Did you try using a 1.7.x configuration for the version 2.0?

  • Yes
  • No

What did you do?

Updated traefik from 1.7.14 to 1.7.16

What did you expect to see?

Correct loading of web pages

What did you see instead?

When loading webpages through traefik not all objects are rendered, i.e. images or CSS.
i.e. getting heimdall, sometimes images are missing:

image

hitting F5 get different behaviour, but always not rendering everything:

image

But hitting CTRL+F5 in order to force a full refresh from website get a correct render of the page.

This is happening with all the backends (heimdall is only an example) and with every web browsers.
Going back to version 1.7.14 fix the issue.

This is happening also with version 1.7.15

Output of traefik version: (What version of Traefik are you using?)

v1.7.16 / maroilles

If applicable, please paste the log output in DEBUG level (--log.level=DEBUG switch)

I can't spot any differences on the logs, let me know what would be needed since I need to clean from personal data.

@traefiker

This comment has been minimized.

@Leosirth
Copy link
Author

I don't think this is a configuration problem since it's not happening on previous version

@ldez
Copy link
Member

ldez commented Sep 14, 2019

Hello,

There is no change in the code on this subject.

You can check by yourself: v1.7.14...v1.7.16

@Leosirth
Copy link
Author

Hi @ldez

maybe this, I make use of custom error pages:

753d173

I have not made any changes as well, I can replicate easly with every backends.

@ldez
Copy link
Member

ldez commented Sep 14, 2019

Could you provide your whole configuration (traefik.toml, docker-compose, ...)

@Leosirth
Copy link
Author

Removing the custom error page fix the problem:

traefik.frontend.errors.network.backend | nginx-1
traefik.frontend.errors.network.query | /{status}.html
traefik.frontend.errors.network.status | 404

@ldez
Copy link
Member

ldez commented Sep 15, 2019

Could you provide a minimal reproducible case?

@ldez ldez assigned mpl Sep 15, 2019
@ldez ldez reopened this Sep 15, 2019
@ldez ldez added area/middleware kind/bug/possible a possible bug that needs analysis before it is confirmed or fixed. priority/P1 need to be fixed in next release and removed kind/question a question labels Sep 15, 2019
@applusplus

This comment has been minimized.

@ldez ldez changed the title Webpages not rendering completly Webpages not rendering completly when using error pages Sep 16, 2019
@mpl
Copy link
Collaborator

mpl commented Sep 16, 2019

@Leosirth I cannot reproduce for now, even with error pages enabled. Do you see any errors in the chrome developper tools console?

@ldez
Copy link
Member

ldez commented Sep 16, 2019

@Leosirth Could you provide your whole configuration (traefik.toml, docker-compose, ...) and/or a minimal reproducible case?

@Leosirth
Copy link
Author

Hi @mpl @ldez

I made some more test and I can see that Firefox 70.0b6 (64-bit) and IE 11.356.18362.0 are the ones more affected, nearly all the backends with custom error pages suffer this issue.

Going to Chrome 77.0.3865.75 I can reproduce the issue consistently with only one backend: nodered

I can't see any relevant on browser console, sometimes the site doesn't load at all without anything logged in console, sometimes it is partially loaded and I can see the following:

Resource interpreted as Stylesheet but transferred with MIME type text/plain: "https://nodered.examplecom/vendor/vendor.css".

I have also a grafana and huginn backends for which I'm unable to login (with every browser) getting an error 500 from traefik, but I can see that the request never reach the beackend, I can see the following in the traefik log for this (looks similar on the issue #5376 but I'm on 1.7.16):

traefik.log
{"log":"time=\"2019-09-16T19:14:51Z\" level=debug msg=\"request \u0026{Method:POST URL:/login Proto:HTTP/2.0 ProtoMajor:2 ProtoMinor:0 Header:map[Accept:[application/json, text/plain, */*] Accept-Encoding:[gzip, deflate, br] Accept-Language:[en-US,en;q=0.5] Content-Length:[49] Content-Type:[application/json;charset=utf-8] Dnt:[1] Origin:[https://grafana.example.com] Referer:[https://grafana.example.com/login] Te:[trailers] User-Agent:[Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0]] Body:0xc00068a4b0 GetBody:\u003cnil\u003e ContentLength:49 TransferEncoding:[] Close:false Host:grafana.example.com Form:map[] PostForm:map[] MultipartForm:\u003cnil\u003e Trailer:map[] RemoteAddr:192.168.1.1:52049 RequestURI:/login TLS:0xc0006fb080 Cancel:\u003cnil\u003e Response:\u003cnil\u003e ctx:0xc0005785a0} matched white list \u0026{[] [0xc000643650] false false} - passing\"\n","stream":"stdout","time":"2019-09-16T19:14:51.425600639Z"}
{"log":"time=\"2019-09-16T19:14:51Z\" level=debug msg=\"vulcand/oxy/roundrobin/rr: begin ServeHttp on request\" Request=\"{\\\"Method\\\":\\\"POST\\\",\\\"URL\\\":{\\\"Scheme\\\":\\\"\\\",\\\"Opaque\\\":\\\"\\\",\\\"User\\\":null,\\\"Host\\\":\\\"\\\",\\\"Path\\\":\\\"/login\\\",\\\"RawPath\\\":\\\"\\\",\\\"ForceQuery\\\":false,\\\"RawQuery\\\":\\\"\\\",\\\"Fragment\\\":\\\"\\\"},\\\"Proto\\\":\\\"HTTP/2.0\\\",\\\"ProtoMajor\\\":2,\\\"ProtoMinor\\\":0,\\\"Header\\\":{\\\"Accept\\\":[\\\"application/json, text/plain, */*\\\"],\\\"Accept-Encoding\\\":[\\\"gzip, deflate, br\\\"],\\\"Accept-Language\\\":[\\\"en-US,en;q=0.5\\\"],\\\"Content-Length\\\":[\\\"49\\\"],\\\"Content-Type\\\":[\\\"application/json;charset=utf-8\\\"],\\\"Dnt\\\":[\\\"1\\\"],\\\"Origin\\\":[\\\"https://grafana.example.com\\\"],\\\"Referer\\\":[\\\"https://grafana.example.com/login\\\"],\\\"Te\\\":[\\\"trailers\\\"],\\\"User-Agent\\\":[\\\"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0\\\"]},\\\"ContentLength\\\":49,\\\"TransferEncoding\\\":null,\\\"Host\\\":\\\"grafana.example.com\\\",\\\"Form\\\":null,\\\"PostForm\\\":null,\\\"MultipartForm\\\":null,\\\"Trailer\\\":null,\\\"RemoteAddr\\\":\\\"192.168.1.1:52049\\\",\\\"RequestURI\\\":\\\"/login\\\",\\\"TLS\\\":null}\"\n","stream":"stdout","time":"2019-09-16T19:14:51.426230924Z"}
{"log":"time=\"2019-09-16T19:14:51Z\" level=debug msg=\"vulcand/oxy/roundrobin/rr: Forwarding this request to URL\" Request=\"{\\\"Method\\\":\\\"POST\\\",\\\"URL\\\":{\\\"Scheme\\\":\\\"\\\",\\\"Opaque\\\":\\\"\\\",\\\"User\\\":null,\\\"Host\\\":\\\"\\\",\\\"Path\\\":\\\"/login\\\",\\\"RawPath\\\":\\\"\\\",\\\"ForceQuery\\\":false,\\\"RawQuery\\\":\\\"\\\",\\\"Fragment\\\":\\\"\\\"},\\\"Proto\\\":\\\"HTTP/2.0\\\",\\\"ProtoMajor\\\":2,\\\"ProtoMinor\\\":0,\\\"Header\\\":{\\\"Accept\\\":[\\\"application/json, text/plain, */*\\\"],\\\"Accept-Encoding\\\":[\\\"gzip, deflate, br\\\"],\\\"Accept-Language\\\":[\\\"en-US,en;q=0.5\\\"],\\\"Content-Length\\\":[\\\"49\\\"],\\\"Content-Type\\\":[\\\"application/json;charset=utf-8\\\"],\\\"Dnt\\\":[\\\"1\\\"],\\\"Origin\\\":[\\\"https://grafana.example.com\\\"],\\\"Referer\\\":[\\\"https://grafana.example.com/login\\\"],\\\"Te\\\":[\\\"trailers\\\"],\\\"User-Agent\\\":[\\\"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0\\\"]},\\\"ContentLength\\\":49,\\\"TransferEncoding\\\":null,\\\"Host\\\":\\\"grafana.example.com\\\",\\\"Form\\\":null,\\\"PostForm\\\":null,\\\"MultipartForm\\\":null,\\\"Trailer\\\":null,\\\"RemoteAddr\\\":\\\"192.168.1.1:52049\\\",\\\"RequestURI\\\":\\\"/login\\\",\\\"TLS\\\":null}\" ForwardURL=\"http://10.0.3.8:3000\"\n","stream":"stdout","time":"2019-09-16T19:14:51.426273289Z"}
{"log":"time=\"2019-09-16T19:14:51Z\" level=debug msg=\"vulcand/oxy/forward: begin ServeHttp on request\" Request=\"{\\\"Method\\\":\\\"POST\\\",\\\"URL\\\":{\\\"Scheme\\\":\\\"http\\\",\\\"Opaque\\\":\\\"\\\",\\\"User\\\":null,\\\"Host\\\":\\\"10.0.3.8:3000\\\",\\\"Path\\\":\\\"\\\",\\\"RawPath\\\":\\\"\\\",\\\"ForceQuery\\\":false,\\\"RawQuery\\\":\\\"\\\",\\\"Fragment\\\":\\\"\\\"},\\\"Proto\\\":\\\"HTTP/2.0\\\",\\\"ProtoMajor\\\":2,\\\"ProtoMinor\\\":0,\\\"Header\\\":{\\\"Accept\\\":[\\\"application/json, text/plain, */*\\\"],\\\"Accept-Encoding\\\":[\\\"gzip, deflate, br\\\"],\\\"Accept-Language\\\":[\\\"en-US,en;q=0.5\\\"],\\\"Content-Length\\\":[\\\"49\\\"],\\\"Content-Type\\\":[\\\"application/json;charset=utf-8\\\"],\\\"Dnt\\\":[\\\"1\\\"],\\\"Origin\\\":[\\\"https://grafana.example.com\\\"],\\\"Referer\\\":[\\\"https://grafana.example.com/login\\\"],\\\"Te\\\":[\\\"trailers\\\"],\\\"User-Agent\\\":[\\\"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0\\\"]},\\\"ContentLength\\\":49,\\\"TransferEncoding\\\":null,\\\"Host\\\":\\\"grafana.example.com\\\",\\\"Form\\\":null,\\\"PostForm\\\":null,\\\"MultipartForm\\\":null,\\\"Trailer\\\":null,\\\"RemoteAddr\\\":\\\"192.168.1.1:52049\\\",\\\"RequestURI\\\":\\\"/login\\\",\\\"TLS\\\":null}\"\n","stream":"stdout","time":"2019-09-16T19:14:51.42628362Z"}
{"log":"time=\"2019-09-16T19:14:51Z\" level=debug msg=\"vulcand/oxy/forward/http: begin ServeHttp on request\" Request=\"{\\\"Method\\\":\\\"POST\\\",\\\"URL\\\":{\\\"Scheme\\\":\\\"http\\\",\\\"Opaque\\\":\\\"\\\",\\\"User\\\":null,\\\"Host\\\":\\\"10.0.3.8:3000\\\",\\\"Path\\\":\\\"\\\",\\\"RawPath\\\":\\\"\\\",\\\"ForceQuery\\\":false,\\\"RawQuery\\\":\\\"\\\",\\\"Fragment\\\":\\\"\\\"},\\\"Proto\\\":\\\"HTTP/2.0\\\",\\\"ProtoMajor\\\":2,\\\"ProtoMinor\\\":0,\\\"Header\\\":{\\\"Accept\\\":[\\\"application/json, text/plain, */*\\\"],\\\"Accept-Encoding\\\":[\\\"gzip, deflate, br\\\"],\\\"Accept-Language\\\":[\\\"en-US,en;q=0.5\\\"],\\\"Content-Length\\\":[\\\"49\\\"],\\\"Content-Type\\\":[\\\"application/json;charset=utf-8\\\"],\\\"Dnt\\\":[\\\"1\\\"],\\\"Origin\\\":[\\\"https://grafana.example.com\\\"],\\\"Referer\\\":[\\\"https://grafana.example.com/login\\\"],\\\"Te\\\":[\\\"trailers\\\"],\\\"User-Agent\\\":[\\\"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0\\\"]},\\\"ContentLength\\\":49,\\\"TransferEncoding\\\":null,\\\"Host\\\":\\\"grafana.example.com\\\",\\\"Form\\\":null,\\\"PostForm\\\":null,\\\"MultipartForm\\\":null,\\\"Trailer\\\":null,\\\"RemoteAddr\\\":\\\"192.168.1.1:52049\\\",\\\"RequestURI\\\":\\\"/login\\\",\\\"TLS\\\":null}\"\n","stream":"stdout","time":"2019-09-16T19:14:51.426296318Z"}
{"log":"time=\"2019-09-16T19:14:51Z\" level=debug msg=\"vulcand/oxy/forward/http: completed ServeHttp on request\" Request=\"{\\\"Method\\\":\\\"POST\\\",\\\"URL\\\":{\\\"Scheme\\\":\\\"http\\\",\\\"Opaque\\\":\\\"\\\",\\\"User\\\":null,\\\"Host\\\":\\\"10.0.3.8:3000\\\",\\\"Path\\\":\\\"\\\",\\\"RawPath\\\":\\\"\\\",\\\"ForceQuery\\\":false,\\\"RawQuery\\\":\\\"\\\",\\\"Fragment\\\":\\\"\\\"},\\\"Proto\\\":\\\"HTTP/2.0\\\",\\\"ProtoMajor\\\":2,\\\"ProtoMinor\\\":0,\\\"Header\\\":{\\\"Accept\\\":[\\\"application/json, text/plain, */*\\\"],\\\"Accept-Encoding\\\":[\\\"gzip, deflate, br\\\"],\\\"Accept-Language\\\":[\\\"en-US,en;q=0.5\\\"],\\\"Content-Length\\\":[\\\"49\\\"],\\\"Content-Type\\\":[\\\"application/json;charset=utf-8\\\"],\\\"Dnt\\\":[\\\"1\\\"],\\\"Origin\\\":[\\\"https://grafana.example.com\\\"],\\\"Referer\\\":[\\\"https://grafana.example.com/login\\\"],\\\"Te\\\":[\\\"trailers\\\"],\\\"User-Agent\\\":[\\\"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0\\\"]},\\\"ContentLength\\\":49,\\\"TransferEncoding\\\":null,\\\"Host\\\":\\\"grafana.example.com\\\",\\\"Form\\\":null,\\\"PostForm\\\":null,\\\"MultipartForm\\\":null,\\\"Trailer\\\":null,\\\"RemoteAddr\\\":\\\"192.168.1.1:52049\\\",\\\"RequestURI\\\":\\\"/login\\\",\\\"TLS\\\":null}\"\n","stream":"stdout","time":"2019-09-16T19:14:51.42630592Z"}
{"log":"time=\"2019-09-16T19:14:51Z\" level=debug msg=\"vulcand/oxy/forward: completed ServeHttp on request\" Request=\"{\\\"Method\\\":\\\"POST\\\",\\\"URL\\\":{\\\"Scheme\\\":\\\"http\\\",\\\"Opaque\\\":\\\"\\\",\\\"User\\\":null,\\\"Host\\\":\\\"10.0.3.8:3000\\\",\\\"Path\\\":\\\"\\\",\\\"RawPath\\\":\\\"\\\",\\\"ForceQuery\\\":false,\\\"RawQuery\\\":\\\"\\\",\\\"Fragment\\\":\\\"\\\"},\\\"Proto\\\":\\\"HTTP/2.0\\\",\\\"ProtoMajor\\\":2,\\\"ProtoMinor\\\":0,\\\"Header\\\":{\\\"Accept\\\":[\\\"application/json, text/plain, */*\\\"],\\\"Accept-Encoding\\\":[\\\"gzip, deflate, br\\\"],\\\"Accept-Language\\\":[\\\"en-US,en;q=0.5\\\"],\\\"Content-Length\\\":[\\\"49\\\"],\\\"Content-Type\\\":[\\\"application/json;charset=utf-8\\\"],\\\"Dnt\\\":[\\\"1\\\"],\\\"Origin\\\":[\\\"https://grafana.example.com\\\"],\\\"Referer\\\":[\\\"https://grafana.example.com/login\\\"],\\\"Te\\\":[\\\"trailers\\\"],\\\"User-Agent\\\":[\\\"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0\\\"]},\\\"ContentLength\\\":49,\\\"TransferEncoding\\\":null,\\\"Host\\\":\\\"grafana.example.com\\\",\\\"Form\\\":null,\\\"PostForm\\\":null,\\\"MultipartForm\\\":null,\\\"Trailer\\\":null,\\\"RemoteAddr\\\":\\\"192.168.1.1:52049\\\",\\\"RequestURI\\\":\\\"/login\\\",\\\"TLS\\\":null}\"\n","stream":"stdout","time":"2019-09-16T19:14:51.426315414Z"}
{"log":"time=\"2019-09-16T19:14:51Z\" level=debug msg=\"vulcand/oxy/roundrobin/rr: completed ServeHttp on request\" Request=\"{\\\"Method\\\":\\\"POST\\\",\\\"URL\\\":{\\\"Scheme\\\":\\\"\\\",\\\"Opaque\\\":\\\"\\\",\\\"User\\\":null,\\\"Host\\\":\\\"\\\",\\\"Path\\\":\\\"/login\\\",\\\"RawPath\\\":\\\"\\\",\\\"ForceQuery\\\":false,\\\"RawQuery\\\":\\\"\\\",\\\"Fragment\\\":\\\"\\\"},\\\"Proto\\\":\\\"HTTP/2.0\\\",\\\"ProtoMajor\\\":2,\\\"ProtoMinor\\\":0,\\\"Header\\\":{\\\"Accept\\\":[\\\"application/json, text/plain, */*\\\"],\\\"Accept-Encoding\\\":[\\\"gzip, deflate, br\\\"],\\\"Accept-Language\\\":[\\\"en-US,en;q=0.5\\\"],\\\"Content-Length\\\":[\\\"49\\\"],\\\"Content-Type\\\":[\\\"application/json;charset=utf-8\\\"],\\\"Dnt\\\":[\\\"1\\\"],\\\"Origin\\\":[\\\"https://grafana.example.com\\\"],\\\"Referer\\\":[\\\"https://grafana.example.com/login\\\"],\\\"Te\\\":[\\\"trailers\\\"],\\\"User-Agent\\\":[\\\"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0\\\"]},\\\"ContentLength\\\":49,\\\"TransferEncoding\\\":null,\\\"Host\\\":\\\"grafana.example.com\\\",\\\"Form\\\":null,\\\"PostForm\\\":null,\\\"MultipartForm\\\":null,\\\"Trailer\\\":null,\\\"RemoteAddr\\\":\\\"192.168.1.1:52049\\\",\\\"RequestURI\\\":\\\"/login\\\",\\\"TLS\\\":null}\"\n","stream":"stdout","time":"2019-09-16T19:14:51.426326511Z"}
{"log":"time=\"2019-09-16T19:14:51Z\" level=error msg=\"Recovered from panic in HTTP handler [192.168.1.1:52049 - /login]: interface conversion: *errorpages.codeCatcher is not http.CloseNotifier: missing method CloseNotify\"\n","stream":"stdout","time":"2019-09-16T19:14:51.426335506Z"}
{"log":"time=\"2019-09-16T19:14:51Z\" level=error msg=\"Stack: goroutine 349216 [running]:\\ngithub.com/containous/traefik/middlewares.recoverFunc(0x7faeb5526a70, 0xc000180060, 0xc0002e4200)\\n\\t/go/src/github.com/containous/traefik/middlewares/recover.go:40 +0x1b9\\npanic(0x27d3b20, 0xc0010c0360)\\n\\t/usr/local/go/src/runtime/panic.go:522 +0x1b5\\ngithub.com/containous/traefik/middlewares.(*responseRecorder).CloseNotify(0xc000b44c40, 0x321ed00)\\n\\t/go/src/github.com/containous/traefik/middlewares/stats.go:69 +0x43\\ngithub.com/containous/traefik/vendor/github.com/vulcand/oxy/utils.(*ProxyWriter).CloseNotify(0xc0010c0300, 0xc000e38a80)\\n\\t/go/src/github.com/containous/traefik/vendor/github.com/vulcand/oxy/utils/netutils.go:79 +0x12b\\nnet/http/httputil.(*ReverseProxy).ServeHTTP(0xc00161e460, 0x3225240, 0xc0010c0300, 0xc000710c78)\\n\\t/usr/local/go/src/net/http/httputil/reverseproxy.go:199 +0x158f\\ngithub.com/containous/traefik/vendor/github.com/vulcand/oxy/forward.(*httpForwarder).serveHTTP(0xc0007dc5b0, 0x321ed00, 0xc000b44c40, 0xc0002e4800, 0xc000caa220)\\n\\t/go/src/github.com/containous/traefik/vendor/github.com/vulcand/oxy/forward/fwd.go:540 +0x333\\ngithub.com/containous/traefik/vendor/github.com/vulcand/oxy/forward.(*Forwarder).ServeHTTP(0xc00077fc60, 0x321ed00, 0xc000b44c40, 0xc0002e4800)\\n\\t/go/src/github.com/containous/traefik/vendor/github.com/vulcand/oxy/forward/fwd.go:283 +0xf8\\ngithub.com/containous/traefik/middlewares/pipelining.(*Pipelining).ServeHTTP(0xc000caa230, 0x321ed00, 0xc000b44c40, 0xc0002e4800)\\n\\t/go/src/github.com/containous/traefik/middlewares/pipelining/pipelining.go:24 +0x6f\\ngithub.com/containous/traefik/vendor/github.com/vulcand/oxy/roundrobin.(*RoundRobin).ServeHTTP(0xc0007dc620, 0x321ed00, 0xc000b44c40, 0xc0002e4500)\\n\\t/go/src/github.com/containous/traefik/vendor/github.com/vulcand/oxy/roundrobin/rr.go:147 +0xfe\\ngithub.com/containous/traefik/middlewares.(*EmptyBackendHandler).ServeHTTP(0xc000caa330, 0x321ed00, 0xc000b44c40, 0xc0002e4500)\\n\\t/go/src/github.com/containous/traefik/middlewares/empty_backend_handler.go:28 +0x119\\ngithub.com/containous/traefik/vendor/github.com/urfave/negroni.Wrap.func1(0x321ed00, 0xc000b44c40, 0xc0002e4500, 0xc000b45060)\\n\\t/go/src/github.com/containous/traefik/vendor/github.com/urfave/negroni/negroni.go:41 +0x4d\\ngithub.com/containous/traefik/vendor/github.com/urfave/negroni.HandlerFunc.ServeHTTP(0xc00077fec0, 0x321ed00, 0xc000b44c40, 0xc0002e4500, 0xc000b45060)\\n\\t/go/src/github.com/containous/traefik/vendor/github.com/urfave/negroni/negroni.go:24 +0x4e\\ngithub.com/containous/traefik/vendor/github.com/urfave/negroni.middleware.ServeHTTP(0x31ddf20, 0xc00077fec0, 0xc00077ff40, 0x321ed00, 0xc000b44c40, 0xc0002e4500)\\n\\t/go/src/github.com/containous/traefik/vendor/github.com/urfave/negroni/negroni.go:33 +0x9c\\nnet/http.HandlerFunc.ServeHTTP(...)\\n\\t/usr/local/go/src/net/http/server.go:1995\\ngithub.com/containous/traefik/middlewares.(*IPWhiteLister).handle(0xc00077fb20, 0x321ed00, 0xc000b44c40, 0xc0002e4500, 0xc000b44c80)\\n\\t/go/src/github.com/containous/traefik/middlewares/ip_whitelister.go:49 +0x1ef\\ngithub.com/containous/traefik/vendor/github.com/urfave/negroni.HandlerFunc.ServeHTTP(0xc000caa050, 0x321ed00, 0xc000b44c40, 0xc0002e4500, 0xc000b44c80)\\n\\t/go/src/github.com/containous/traefik/vendor/github.com/urfave/negroni/negroni.go:24 +0x4e\\ngithub.com/containous/traefik/middlewares.(*IPWhiteLister).ServeHTTP(0xc00077fb20, 0x321ed00, 0xc000b44c40, 0xc0002e4500, 0xc000b44c80)\\n\\t/go/src/github.com/containous/traefik/middlewares/ip_whitelister.go:53 +0x5b\\ngithub.com/containous/traefik/vendor/github.com/urfave/negroni.middleware.ServeHTTP(0x31d7f40, 0xc00077fb20, 0xc00077ff20, 0x321ed00, 0xc000b44c40, 0xc0002e4500)\\n\\t/go/src/github.com/containous/traefik/vendor/github.com/urfave/negroni/negroni.go:33 +0x9c\\ngithub.com/containous/traefik/middlewares.(*metricsMiddleware).ServeHTTP(0xc0009ff0e0, 0x321ed80, 0xc00161e000, 0xc0002e4500, 0xc000b44aa0)\\n\\t/go/src/github.com/containous/traefik/middlewares/metrics.go:66 +0x2e5\\ngithub.com/containous/traefik/vendor/github.com/urfave/negroni.middleware.ServeHTTP(0x31d8080, 0xc0009ff0e0, 0xc00077ff00, 0x321ed80, 0xc00161e000, 0xc0002e4500)\\n\\t/go/src/github.com/containous/traefik/vendor/github.com/urfave/negroni/negroni.go:33 +0x9c\\nnet/http.HandlerFunc.ServeHTTP(...)\\n\\t/usr/local/go/src/net/http/server.go:1995\\ngithub.com/containous/traefik/middlewares/errorpages.(*Handler).ServeHTTP(0xc0007dc540, 0x7faeb5526a70, 0xc000180070, 0xc0002e4500, 0xc000b44a60)\\n\\t/go/src/github.com/containous/traefik/middlewares/errorpages/error_pages.go:78 +0x131\\ngithub.com/containous/traefik/vendor/github.com/urfave/negroni.middleware.ServeHTTP(0x31d81e0, 0xc0007dc540, 0xc00077fee0, 0x7faeb5526a70, 0xc000180070, 0xc0002e4500)\\n\\t/go/src/github.com/containous/traefik/vendor/github.com/urfave/negroni/negroni.go:33 +0x9c\\ngithub.com/containous/traefik/vendor/github.com/urfave/negroni.(*Negroni).ServeHTTP(0xc000643800, 0x7faeb5526aa0, 0xc0002d6200, 0xc0002e4500)\\n\\t/go/src/github.com/containous/traefik/vendor/github.com/urfave/negroni/negroni.go:81 +0xec\\ngithub.com/containous/traefik/vendor/github.com/containous/mux.(*Router).ServeHTTP(0xc000c0b7a0, 0x7faeb5526aa0, 0xc0002d6200, 0xc0002e4500)\\n\\t/go/src/github.com/containous/traefik/vendor/github.com/containous/mux/mux.go:133 +0x105\\ngithub.com/containous/traefik/middlewares.(*HandlerSwitcher).ServeHTTP(0xc00000ea98, 0x7faeb5526aa0, 0xc0002d6200, 0xc0002e4300)\\n\\t/go/src/github.com/containous/traefik/middlewares/handlerSwitcher.go:24 +0x6f\\ngithub.com/containous/traefik/vendor/github.com/urfave/negroni.Wrap.func1(0x7faeb5526aa0, 0xc0002d6200, 0xc0002e4300, 0xc000b449e0)\\n\\t/go/src/github.com/containous/traefik/vendor/github.com/urfave/negroni/negroni.go:41 +0x4d\\ngithub.com/containous/traefik/vendor/github.com/urfave/negroni.HandlerFunc.ServeHTTP(0xc0008ee7e0, 0x7faeb5526aa0, 0xc0002d6200, 0xc0002e4300, 0xc000b449e0)\\n\\t/go/src/github.com/containous/traefik/vendor/github.com/urfave/negroni/negroni.go:24 +0x4e\\ngithub.com/containous/traefik/vendor/github.com/urfave/negroni.middleware.ServeHTTP(0x31ddf20, 0xc0008ee7e0, 0xc0008ee880, 0x7faeb5526aa0, 0xc0002d6200, 0xc0002e4300)\\n\\t/go/src/github.com/containous/traefik/vendor/github.com/urfave/negroni/negroni.go:33 +0x9c\\nnet/http.HandlerFunc.ServeHTTP(...)\\n\\t/usr/local/go/src/net/http/server.go:1995\\ngithub.com/containous/traefik/middlewares.(*RequestHost).ServeHTTP(0x546ec80, 0x7faeb5526aa0, 0xc0002d6200, 0xc0002e4200, 0xc000b44980)\\n\\t/go/src/github.com/containous/traefik/middlewares/request_host.go:20 +0x1c2\\ngithub.com/containous/traefik/vendor/github.com/urfave/negroni.middleware.ServeHTTP(0x31d7fc0, 0x546ec80, 0xc0008ee860, 0x7faeb5526aa0, 0xc0002d6200, 0xc0002e4200)\\n\\t/go/src/github.com/containous/traefik/vendor/github.com/urfave/negroni/negroni.go:33 +0x9c\\ngithub.com/containous/traefik/vendor/github.com/thoas/stats.(*Stats).ServeHTTP(0xc000117680, 0x321ed00, 0xc000b448c0, 0xc0002e4200, 0xc000b44920)\\n\\t/go/src/github.com/containous/traefik/vendor/github.com/thoas/stats/stats.go:88 +0xc5\\ngithub.com/containous/traefik/vendor/github.com/urfave/negroni.middleware.ServeHTTP(0x31da400, 0xc000117680, 0xc0008ee840, 0x321ed00, 0xc000b448c0, 0xc0002e4200)\\n\\t/go/src/github.com/containous/traefik/vendor/github.com/urfave/negroni/negroni.go:33 +0x9c\\ngithub.com/containous/traefik/middlewares.(*metricsMiddleware).ServeHTTP(0xc0005e8c80, 0x7faeb5526a70, 0xc000180060, 0xc0002e4200, 0xc000b44740)\\n\\t/go/src/github.com/containous/traefik/middlewares/metrics.go:66 +0x2e5\\ngithub.com/containous/traefik/vendor/github.com/urfave/negroni.middleware.ServeHTTP(0x31d8080, 0xc0005e8c80, 0xc0008ee820, 0x7faeb5526a70, 0xc000180060, 0xc0002e4200)\\n\\t/go/src/github.com/containous/traefik/vendor/github.com/urfave/negroni/negroni.go:33 +0x9c\\nnet/http.HandlerFunc.ServeHTTP(...)\\n\\t/usr/local/go/src/net/http/server.go:1995\\ngithub.com/containous/traefik/middlewares.NegroniRecoverHandler.func1(0x7faeb5526a70, 0xc000180060, 0xc0002e4200, 0xc000b446e0)\\n\\t/go/src/github.com/containous/traefik/middlewares/recover.go:24 +0x83\\ngithub.com/containous/traefik/vendor/github.com/urfave/negroni.HandlerFunc.ServeHTTP(0x2dca590, 0x7faeb5526a70, 0xc000180060, 0xc0002e4200, 0xc000b446e0)\\n\\t/go/src/github.com/containous/traefik/vendor/github.com/urfave/negroni/negroni.go:24 +0x4e\\ngithub.com/containous/traefik/vendor/github.com/urfave/negroni.middleware.ServeHTTP(0x31ddf20, 0x2dca590, 0xc0008ee800, 0x7faeb5526a70, 0xc000180060, 0xc0002e4200)\\n\\t/go/src/github.com/containous/traefik/vendor/github.com/urfave/negroni/negroni.go:33 +0x9c\\ngithub.com/containous/traefik/vendor/github.com/urfave/negroni.(*Negroni).ServeHTTP(0xc00095e690, 0x322f880, 0xc00000e008, 0xc0002e4200)\\n\\t/go/src/github.com/containous/traefik/vendor/github.com/urfave/negroni/negroni.go:81 +0xec\\ngithub.com/containous/traefik/vendor/github.com/containous/mux.(*Router).ServeHTTP(0xc00004fe60, 0x322f880, 0xc00000e008, 0xc0002e4200)\\n\\t/go/src/github.com/containous/traefik/vendor/github.com/containous/mux/mux.go:133 +0x105\\nnet/http.serverHandler.ServeHTTP(0xc000971a00, 0x322f880, 0xc00000e008, 0xc000bd8200)\\n\\t/usr/local/go/src/net/http/server.go:2774 +0xa8\\nnet/http.initNPNRequest.ServeHTTP(0xc00112a700, 0xc000971a00, 0x322f880, 0xc00000e008, 0xc000bd8200)\\n\\t/usr/local/go/src/net/http/server.go:3323 +0x8d\\nnet/http.(*http2serverConn).runHandler(0xc001565c80, 0xc00000e008, 0xc000bd8200, 0xc000580000)\\n\\t/usr/local/go/src/net/http/h2_bundle.go:5688 +0x89\\ncreated by net/http.(*http2serverConn).processHeaders\\n\\t/usr/local/go/src/net/http/h2_bundle.go:5422 +0x4f4\\n\"\n","stream":"stdout","time":"2019-09-16T19:14:51.426339733Z"}

Regarding my configuration please find below:

traefik.toml
logLevel="DEBUG"
defaultEntryPoints = ["https"]
################################################################
# API and dashboard configuration
################################################################
[api]
entrypoint="dashboard"
################################################################
# Docker configuration backend
################################################################
[docker]
endpoint = "tcp://localhost:2375"
domain = "example.com"
watch = true
exposedByDefault = false

[entryPoints]
  [entryPoints.http]
  address = ":80"
    [entryPoints.http.redirect]
    entryPoint = "https"
  [entryPoints.https]
  address = ":443"
  [entryPoints.dashboard]
  address = ":8181"
  [entryPoints.https.tls]

[acme]
acmeLogging = true
email = "admin@example.com"
storage = "/etc/traefik/acme/acme.json"
entryPoint = "https"
#onHostRule = true
#[acme.httpChallenge]
#entryPoint = "http"
[acme.dnsChallenge]
  provider = "acme-dns"
  delayBeforeCheck = 0
  disablePropagationCheck = true
[[acme.domains]]
  main = "*.example.com"
  sans = ["example.com"]

[metrics]
# To enable Traefik to export internal metrics to Prometheus
[metrics.prometheus]
  # Name of the related entry point
  #
  # Optional
  # Default: "traefik"
  #
  entryPoint = "dashboard"
  
  # Buckets for latency metrics
  #
  # Optional
  # Default: [0.1, 0.3, 1.2, 5.0]
  #
  buckets = [0.1,0.3,1.2,5.0]

I don't have a docker-compose to share, but nothing special configured on the containers.
About traefik labels I have this applied on every containers (with rule and port set accordingly):

name value
traefik.enable TRUE
traefik.frontend.errors.network.backend nginx-1
traefik.frontend.errors.network.query /{status}.html
traefik.frontend.errors.network.status 403
traefik.frontend.rule Host:nodered.example.com
traefik.frontend.whiteList.sourceRange 192.168.0.0/16
traefik.frontend.whiteList.useXForwardedFor FALSE
traefik.port 1880

traefiker pushed a commit to mpl/traefik that referenced this issue Sep 20, 2019
Before this change, the codeCatcher relied on the fact that Write would
always be called, and hence was in charge of actually sending the headers
that WriteHeader had "cached" when it had been called.

However, in the case of e.g. a 304, since the response should not have
any body, there is no reason for the caller (i.e. another proxy or
middleware in the chain of calls) to call the codeCatcher's Write.
Therefore, neither the headers, and hence nor the the response code,
were actually forwarded to the client.

Consequently, this change moves the responsibility of actually
forwarding the headers and response code to where it belongs, i.e. in
WriteHeader.

In addition, this change adds a wrapper of the codeCatcher, so that we
can satisfy the CloseNotify interface as well.

Fixes traefik#5385
@traefiker
Copy link
Contributor

Closed by #5404.

@traefiker traefiker added this to the 1.7 milestone Sep 20, 2019
@traefik traefik locked and limited conversation to collaborators Oct 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/middleware kind/bug/possible a possible bug that needs analysis before it is confirmed or fixed. priority/P1 need to be fixed in next release status/5-frozen-due-to-age
Projects
None yet
Development

No branches or pull requests

5 participants