我在aws环境中将Tomcat与Apache httpd一起使用。我在使用管理器部署应用程序时遇到问题。我可以通过上传ROOT.war手动进行部署,该应用程序可以正常运行。
我从Tomcat和Apache中获得以下错误:
SEVERE [ajp-nio-8009-exec-4] org.apache.catalina.core.ApplicationContext.log HTMLManager: FAIL - Deploy Upload Failed, Exception: [org.apache.tomcat.util.http.fileupload.FileUploadBase$IOFileUploadException: Proc
essing of multipart/form-data request failed. null]
java.io.IOException: org.apache.tomcat.util.http.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. null
at org.apache.catalina.connector.Request.parseParts(Request.java:2950)
at org.apache.catalina.connector.Request.parseParameters(Request.java:3242)
at org.apache.catalina.connector.Request.getParameter(Request.java:1136)
at org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:381)
at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:610)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:479)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.tomcat.util.http.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. null
at org.apache.tomcat.util.http.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:297)
at org.apache.catalina.connector.Request.parseParts(Request.java:2902)
... 29 more
Caused by: java.io.EOFException
at org.apache.coyote.ajp.AjpProcessor.read(AjpProcessor.java:1279)
at org.apache.coyote.ajp.AjpProcessor.readMessage(AjpProcessor.java:618)
at org.apache.coyote.ajp.AjpProcessor.receive(AjpProcessor.java:580)
at org.apache.coyote.ajp.AjpProcessor.refillReadBuffer(AjpProcessor.java:688)
at org.apache.coyote.ajp.AjpProcessor$SocketInputBuffer.doRead(AjpProcessor.java:1390)
at org.apache.coyote.Request.doRead(Request.java:581)
at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:343)
at org.apache.catalina.connector.InputBuffer.checkByteBufferEof(InputBuffer.java:659)
at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:366)
at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:183)
at java.io.FilterInputStream.read(FilterInputStream.java:133)
at org.apache.tomcat.util.http.fileupload.util.LimitedInputStream.read(LimitedInputStream.java:132)
从apache httpd:
[proxy_ajp:error] [pid xxx] (70007)The timeout specified has expired: [client xx.xx.xx.xxx:xxxx] AH0XXXX: dialog with client x.x.x.x:xxxx failed, referer: https://hostname.com/manager/html
我尝试增加Tomcat中的connectionTimeout值和Apache中的proxyTimeout。但是,没有任何帮助。
有什么主意吗?
谢谢。
答案 0 :(得分:0)
您可能正在面对Apache的mod_reqtimeout。检查是否已加载:
$ apachectl -M
如果是,则可以尝试将RequestReadTimeout
设置为更大的值。请参见https://httpd.apache.org/docs/2.4/mod/mod_reqtimeout.html上的手册。
示例(使用默认值,根据需要对其进行调整):
<IfModule reqtimeout_module>
RequestReadTimeout header=20-40 body=20
</IfModule>
通常,这是在Apache VirtualHost配置中配置的。
请记住,将值设置为高于默认值可能会使服务器遭受Slowloris之类的攻击。</ p>