如何配置JBoss 4.23以接受长超时连接?

时间:2012-09-26 12:54:45

标签: file-upload jboss httpwebrequest

ALL,我正在开发一个需要从.net上传大文件(200MB)到JBoss的项目。 到目前为止,我已经将属性设置为HttpWebRequest对象,但在JBOSS控制台中仍然出现异常

10:31:06,896 ERROR [DeployServlet] Failed to upload file.
org.apache.commons.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. null
     at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:359)
     at com.accela.deploy.servlet.RequestHandler.getUploadFileFromRequest(RequestHandler.java:86)
     at com.accela.deploy.servlet.DeployServlet.doPost(DeployServlet.java:118)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
     at com.accela.commom.filter.AuthFilter.doFilter(AuthFilter.java:99)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
     at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
     at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
     at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
     at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
     at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:615)
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
     at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:877)
     at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:594)
     at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1733)
     at java.lang.Thread.run(Thread.java:722)
Caused by: java.io.IOException
     at org.apache.coyote.http11.InternalAprInputBuffer.fill(InternalAprInputBuffer.java:801)
     at org.apache.coyote.http11.InternalAprInputBuffer$SocketInputBuffer.doRead(InternalAprInputBuffer.java:830)
     at org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityInputFilter.java:116)
     at org.apache.coyote.http11.InternalAprInputBuffer.doRead(InternalAprInputBuffer.java:738)
     at org.apache.coyote.Request.doRead(Request.java:427)
     at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:304)
     at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:419)
     at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:327)
     at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:193)
     at org.apache.commons.fileupload.MultipartStream$ItemInputStream.makeAvailable(MultipartStream.java:959)
     at org.apache.commons.fileupload.MultipartStream$ItemInputStream.read(MultipartStream.java:887)
     at java.io.InputStream.read(InputStream.java:101)
     at org.apache.commons.fileupload.util.Streams.copy(Streams.java:94)
     at org.apache.commons.fileupload.util.Streams.copy(Streams.java:64)
     at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:354)
     ... 26 more
10:31:07,973 INFO  [RequestHandler] Failed

我相信这是因为http请求超时问题。 是否有任何超时配置JBoss接受长时间的Http连接?感谢。

1 个答案:

答案 0 :(得分:1)

可能你已经跑进了this bug。如果您使用的是Tomcat Native库,请尝试停用它们以查看它是否有效。或者使用带有mod_proxy的Apache httpd服务器并使用JBoss服务器上的AJP连接器 - 如果它确实是HTTP连接器中的错误,那么这可能是一种解决方法。

但要回答有关超时的问题,请查看文件server/default/deploy/jboss-web.deployer/server.xml(如果需要,请使用您正在使用的配置替换default)。确保在元素<Connector port="8080" ...中将属性disableUploadTimeout设置为true。有关此属性和连接器配置的详细信息,请参阅docs