tonsky / grumpy

Minimalistic blog engine
http://grumpy.website
148 stars 14 forks source link

Get rid of “broken pipe” exception in Pedestal #32

Closed tonsky closed 5 years ago

tonsky commented 5 years ago
15:10:50.543 ERROR i.p.http.impl.servlet-interceptor: {:msg "error-stylobate triggered", :context {:response {:status 200, :headers {"X-Frame-Options" "DENY", "X-XSS-Protection" "1; mode=block", "Last-Modified" "Sun, 12 May 2019 21:
40:17 GMT", "X-Download-Options" "noopen", "Strict-Transport-Security" "max-age=31536000; includeSubdomains", "X-Permitted-Cross-Domain-Policies" "none", "Cache-Control" "max-age=315360000", "Content-Length" "9647", "X-Content-Type-
Options" "nosniff", "Content-Security-Policy" "object-src 'none'; script-src 'self' 'unsafe-inline' 'unsafe-eval'", "Content-Type" "image/jpeg"}, :body #object[sun.net.www.protocol.jar.JarURLConnection$JarURLInputStream 0x5dc965dc "
sun.net.www.protocol.jar.JarURLConnection$JarURLInputStream@5dc965dc"]}, :io.pedestal.interceptor.chain/stack (#Interceptor{:name :io.pedestal.http.impl.servlet-interceptor/terminator-injector}), :request {:protocol "HTTP/1.1", :asy
nc-supported? true, :remote-addr "127.0.0.1", :servlet-response #object[io.undertow.servlet.spec.HttpServletResponseImpl 0x397fb1c1 "io.undertow.servlet.spec.HttpServletResponseImpl@397fb1c1"], :servlet #object[io.pedestal.http.serv
let.FnServlet 0x49d267a "io.pedestal.http.servlet.FnServlet@49d267a"], :headers {"referer" "https://grumpy.website/", "accept-language" "en-GB,en;q=0.5", "connection" "close", "host" "127.0.0.1:7000", "dnt" "1", "accept-encoding" "g
zip, deflate, br", "accept" "image/webp,*/*", "user-agent" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0"}, :server-port 7000, :servlet-request #object[io.undertow.servlet.spec.HttpServletRequestImp
l 0x3904eb6e "HttpServletRequestImpl [ GET /static/nikitonsky.jpg ]"], :path-info "/static/nikitonsky.jpg", :url-for #object[clojure.lang.Delay 0x6b40c391 {:status :pending, :val nil}], :uri "/static/nikitonsky.jpg", :server-name "1
27.0.0.1", :query-string nil, :path-params {:path "nikitonsky.jpg"}, :body #object[io.undertow.servlet.spec.ServletInputStreamImpl 0x1b447269 "io.undertow.servlet.spec.ServletInputStreamImpl@1b447269"], :scheme :http, :request-method :get, :context-path ""}, :bindings {#'io.pedestal.http.route/*url-for* #object[clojure.lang.Delay 0x6b40c391 {:status :pending, :val nil}]}, :enter-async [#object[io.pedestal.http.impl.servlet_interceptor$start_servlet_async 0x6cdfe65e "io.pedestal.http.impl.servlet_interceptor$start_servlet_async@6cdfe65e"]], :io.pedestal.interceptor.chain/terminators (#object[io.pedestal.http.impl.servlet_interceptor$terminator_inject$fn__17139 0x5eea08d4 "io.pedestal.http.impl.servlet_interceptor$terminator_inject$fn__17139@5eea08d4"]), :servlet-response #object[io.undertow.servlet.spec.HttpServletResponseImpl 0x397fb1c1 "io.undertow.servlet.spec.HttpServletResponseImpl@397fb1c1"], :route {:path "/static/*path", :method :get, :path-constraints {:path "(.*)"}, :path-re #"/\Qstatic\E/(.*)", :path-parts ["static" :path], :interceptors [#Interceptor{:name } #Interceptor{:name }], :route-name :get:/static/*path, :path-params {:path "nikitonsky.jpg"}, :matcher #object[io.pedestal.http.route.linear_search$matcher$fn__12878 0x100a854a "io.pedestal.http.route.linear_search$matcher$fn__12878@100a854a"]}, :servlet #object[io.pedestal.http.servlet.FnServlet 0x49d267a "io.pedestal.http.servlet.FnServlet@49d267a"], :servlet-request #object[io.undertow.servlet.spec.HttpServletRequestImpl 0x3904eb6e "HttpServletRequestImpl [ GET /static/nikitonsky.jpg ]"], :url-for #object[clojure.lang.Delay 0x6b40c391 {:status :pending, :val nil}], :io.pedestal.interceptor.chain/execution-id 146, :servlet-config #object[io.undertow.servlet.spec.ServletConfigImpl 0x57ae1680 "io.undertow.servlet.spec.ServletConfigImpl@57ae1680"], :async? #object[io.pedestal.http.impl.servlet_interceptor$servlet_async_QMARK_ 0x336d6e69 "io.pedestal.http.impl.servlet_interceptor$servlet_async_QMARK_@336d6e69"]}, :line 242}
clojure.lang.ExceptionInfo: java.io.IOException in Interceptor :io.pedestal.http.impl.servlet-interceptor/ring-response - Broken pipe
        at io.pedestal.interceptor.chain$throwable__GT_ex_info.invokeStatic(chain.clj:35) ~[na:na]
        at io.pedestal.interceptor.chain$throwable__GT_ex_info.invoke(chain.clj:32) ~[na:na]
        at io.pedestal.interceptor.chain$try_f.invokeStatic(chain.clj:57) ~[na:na]
        at io.pedestal.interceptor.chain$try_f.invoke(chain.clj:44) ~[na:na]
        at io.pedestal.interceptor.chain$leave_all_with_binding.invokeStatic(chain.clj:254) [na:na]
        at io.pedestal.interceptor.chain$leave_all_with_binding.invoke(chain.clj:237) [na:na]
        at io.pedestal.interceptor.chain$leave_all$fn__12228.invoke(chain.clj:268) [na:na]
        at clojure.lang.AFn.applyToHelper(AFn.java:152) [grumpy.jar:na]
        at clojure.lang.AFn.applyTo(AFn.java:144) [grumpy.jar:na]
        at clojure.core$apply.invokeStatic(core.clj:665) [grumpy.jar:na]
        at clojure.core$with_bindings_STAR_.invokeStatic(core.clj:1973) [grumpy.jar:na]
        at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1973) [grumpy.jar:na]
        at clojure.lang.RestFn.invoke(RestFn.java:425) [grumpy.jar:na]
        at io.pedestal.interceptor.chain$leave_all.invokeStatic(chain.clj:266) [na:na]
        at io.pedestal.interceptor.chain$leave_all.invoke(chain.clj:260) [na:na]
        at io.pedestal.interceptor.chain$execute.invokeStatic(chain.clj:379) [na:na]
        at io.pedestal.interceptor.chain$execute.invoke(chain.clj:352) [na:na]
        at io.pedestal.interceptor.chain$execute.invokeStatic(chain.clj:389) [na:na]
        at io.pedestal.interceptor.chain$execute.invoke(chain.clj:352) [na:na]
        at io.pedestal.http.impl.servlet_interceptor$interceptor_service_fn$fn__17164.invoke(servlet_interceptor.clj:351) [na:na]
        at io.pedestal.http.servlet.FnServlet.service(servlet.clj:28) [na:na]
        at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) [grumpy.jar:na]
        at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129) [grumpy.jar:na]
        at org.projectodd.wunderboss.web.async.websocket.WebSocketHelpyHelpertonFilter.doFilter(WebSocketHelpyHelpertonFilter.java:80) [grumpy.jar:na]
        at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [grumpy.jar:na]
        at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [grumpy.jar:na]
        at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84) [grumpy.jar:na]
        at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) [grumpy.jar:na]
        at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [grumpy.jar:na]
        at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) [grumpy.jar:na]
        at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) [grumpy.jar:na]
        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [grumpy.jar:na]
        at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) [grumpy.jar:na]
        at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) [grumpy.jar:na]
        at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60) [grumpy.jar:na]
        at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77) [grumpy.jar:na]
Caused by: java.io.IOException: Broken pipe
        at sun.nio.ch.FileDispatcherImpl.writev0(Native Method) ~[na:1.8.0_77]
        at sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:51) ~[na:1.8.0_77]
        at sun.nio.ch.IOUtil.write(IOUtil.java:148) ~[na:1.8.0_77]
        at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:504) ~[na:1.8.0_77]
        at org.xnio.nio.NioSocketConduit.write(NioSocketConduit.java:161) ~[grumpy.jar:na]
        at io.undertow.server.protocol.http.HttpResponseConduit.processStatefulWrite(HttpResponseConduit.java:472) ~[grumpy.jar:na]
        at io.undertow.server.protocol.http.HttpResponseConduit.processWrite(HttpResponseConduit.java:214) ~[grumpy.jar:na]
        at io.undertow.server.protocol.http.HttpResponseConduit.write(HttpResponseConduit.java:632) ~[grumpy.jar:na]
        at io.undertow.conduits.AbstractFixedLengthStreamSinkConduit.write(AbstractFixedLengthStreamSinkConduit.java:148) ~[grumpy.jar:na]
        at org.xnio.conduits.ConduitStreamSinkChannel.write(ConduitStreamSinkChannel.java:158) ~[grumpy.jar:na]
        at io.undertow.channels.DetachableStreamSinkChannel.write(DetachableStreamSinkChannel.java:179) ~[grumpy.jar:na]
        at io.undertow.server.HttpServerExchange$WriteDispatchChannel.write(HttpServerExchange.java:2014) ~[grumpy.jar:na]
        at org.xnio.channels.Channels.writeBlocking(Channels.java:152) ~[grumpy.jar:na]
        at io.undertow.servlet.spec.ServletOutputStreamImpl.writeTooLargeForBuffer(ServletOutputStreamImpl.java:193) ~[grumpy.jar:na]
        at io.undertow.servlet.spec.ServletOutputStreamImpl.write(ServletOutputStreamImpl.java:141) ~[grumpy.jar:na]
        at clojure.java.io$fn__11534.invokeStatic(io.clj:307) ~[grumpy.jar:na]
        at clojure.java.io$fn__11534.invoke(io.clj:302) ~[grumpy.jar:na]
        at clojure.lang.MultiFn.invoke(MultiFn.java:239) ~[grumpy.jar:na]
        at clojure.java.io$copy.invokeStatic(io.clj:406) ~[grumpy.jar:na]
        at clojure.java.io$copy.doInvoke(io.clj:391) ~[grumpy.jar:na]
        at clojure.lang.RestFn.invoke(RestFn.java:425) [grumpy.jar:na]
        at io.pedestal.http.impl.servlet_interceptor$eval16797$fn__16800.invoke(servlet_interceptor.clj:78) ~[na:na]
        at io.pedestal.http.impl.servlet_interceptor$eval16761$fn__16762$G__16752__16769.invoke(servlet_interceptor.clj:38) ~[na:na]
        at io.pedestal.http.impl.servlet_interceptor$write_body.invokeStatic(servlet_interceptor.clj:93) ~[na:na]
        at io.pedestal.http.impl.servlet_interceptor$write_body.invoke(servlet_interceptor.clj:91) ~[na:na]
        at io.pedestal.http.impl.servlet_interceptor$send_response.invokeStatic(servlet_interceptor.clj:170) ~[na:na]
        at io.pedestal.http.impl.servlet_interceptor$send_response.invoke(servlet_interceptor.clj:162) ~[na:na]
        at io.pedestal.http.impl.servlet_interceptor$leave_ring_response.invokeStatic(servlet_interceptor.clj:229) ~[na:na]
        at io.pedestal.http.impl.servlet_interceptor$leave_ring_response.invoke(servlet_interceptor.clj:218) ~[na:na]
        at io.pedestal.interceptor.chain$try_f.invokeStatic(chain.clj:54) ~[na:na]
        ... 51 common frames omitted
tonsky commented 5 years ago

Fixed by c6bbcc9590394243e37c2a72a4e569a7c506be7d