Getting ClosedChannelException on file download with http2

Solution Verified - Updated -

Issue

  • Observing connection loss during file download

    ERROR [my.company..servlet.DownloadServlet] (default task-31) null: java.nio.channels.ClosedChannelException 
    at io.undertow.channels.DetachableStreamSinkChannel.write(DetachableStreamSinkChannel.java:177) 
    at io.undertow.server.HttpServerExchange$WriteDispatchChannel.write(HttpServerExchange.java:2028) 
    at org.xnio.channels.Channels.writeBlocking(Channels.java:152) 
    at io.undertow.servlet.spec.ServletOutputStreamImpl.writeTooLargeForBuffer(ServletOutputStreamImpl.java:194) 
    at io.undertow.servlet.spec.ServletOutputStreamImpl.write(ServletOutputStreamImpl.java:142) 
    at io.undertow.servlet.spec.ServletOutputStreamImpl.write(ServletOutputStreamImpl.java:125) 
    at my.company.servlet.DownloadServlet.doGet(DownloadServlet.java:60) 
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) 
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) 
    at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) 
    at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)  
    at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)  
    at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityCo
    

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 7.1.0
  • http2

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content