You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by je...@isaatc.ull.es on 2007/12/24 19:27:24 UTC

Re: Fw: Processing of multipart/form-data request failed. Socket read failed

Hi,

I have the same problem. I use Apache 2.2.3 (with APR 1.2.7) in front  
of Tomcat 5.5.20, both connected by AJP (mod_proxy_ajp module). The  
error is the same when unloading a file. It only works when:

  - The request is sent directly to tomcat.

  or

  - If I disable using libtcnative (the tomcat JNI wrapper for APR) in tomcat.

I do not know any other solution to this problem.


Regards
Jesús

Respondiendo a Boom <pe...@slac.stanford.edu>:

>
> Hi,
> I have the same setup (apache ajp - tomcat) and got the same error when
> uploading a file. Have you figured out what causes it? The same upload works
> if the request is sent directly to tomcat and not through apache. Going
> through apache only works if the request comes in from the same domain.
> Thanks.
> Boom
>
>
> 宋杨 wrote:
>>
>> Hi all:
>>
>>     I use ajp between Apache2.2.6 and tomcat5.5.25, when I upload a file
>> Exception occurred like below, anybody could tell me why? Thanks.
>>     I think the key is  "java.io.IOException: Socket read failed
>> org.apache.coyote.ajp.AjpAprProcessor.read(AjpAprProcessor.java:1037)"
>>     Is it a Apr error when I install apache and tomcat? I'm not sure about
>> it.
>>
>>
>> Regards
>> Derek
>>
>> ----------------------------------------------------------------------------------------------------------------------------
>> HTTP Status 500 -
>>
>>
>>
>> type Exception report
>> message
>> description The server encountered an internal error () that prevented it
>> from fulfilling this request.
>> exception
>> javax.servlet.ServletException: Processing of multipart/form-data request
>> failed. Socket read failed
>> org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286)
>> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
>> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>> org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:77)
>> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
>>
>> root cause
>> javax.servlet.ServletException: Processing of multipart/form-data request
>> failed. Socket read failed
>> org.apache.struts.upload.CommonsMultipartRequestHandler.handleRequest(CommonsMultipartRequestHandler.java:194)
>> org.apache.struts.util.RequestUtils.populate(RequestUtils.java:405)
>> org.apache.struts.chain.commands.servlet.PopulateActionForm.populate(PopulateActionForm.java:50)
>> org.apache.struts.chain.commands.AbstractPopulateActionForm.execute(AbstractPopulateActionForm.java:60)
>> org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
>> org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
>> org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
>> org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
>> org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
>> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
>> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>> org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:77)
>> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
>>
>> root cause
>> org.apache.commons.fileupload.FileUploadBase$IOFileUploadException:
>> Processing of multipart/form-data request failed. Socket read failed
>> org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:359)
>> org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:302)
>> org.apache.struts.upload.CommonsMultipartRequestHandler.handleRequest(CommonsMultipartRequestHandler.java:185)
>> org.apache.struts.util.RequestUtils.populate(RequestUtils.java:405)
>> org.apache.struts.chain.commands.servlet.PopulateActionForm.populate(PopulateActionForm.java:50)
>> org.apache.struts.chain.commands.AbstractPopulateActionForm.execute(AbstractPopulateActionForm.java:60)
>> org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
>> org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
>> org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
>> org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
>> org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
>> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
>> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>> org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:77)
>> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
>>
>> root cause
>> java.io.IOException: Socket read failed
>> org.apache.coyote.ajp.AjpAprProcessor.read(AjpAprProcessor.java:1037)
>> org.apache.coyote.ajp.AjpAprProcessor.readMessage(AjpAprProcessor.java:1158)
>> org.apache.coyote.ajp.AjpAprProcessor.receive(AjpAprProcessor.java:1090)
>> org.apache.coyote.ajp.AjpAprProcessor.refillReadBuffer(AjpAprProcessor.java:1129)
>> org.apache.coyote.ajp.AjpAprProcessor.access$000(AjpAprProcessor.java:59)
>> org.apache.coyote.ajp.AjpAprProcessor$SocketInputBuffer.doRead(AjpAprProcessor.java:1232)
>> org.apache.coyote.Request.doRead(Request.java:419)
>> org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:265)
>> org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:403)
>> org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:280)
>> org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:193)
>> org.apache.commons.fileupload.MultipartStream$ItemInputStream.makeAvailable(MultipartStream.java:959)
>> org.apache.commons.fileupload.MultipartStream$ItemInputStream.read(MultipartStream.java:887)
>> java.io.InputStream.read(InputStream.java:89)
>> org.apache.commons.fileupload.util.Streams.copy(Streams.java:94)
>> org.apache.commons.fileupload.util.Streams.copy(Streams.java:64)
>> org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:354)
>> org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:302)
>> org.apache.struts.upload.CommonsMultipartRequestHandler.handleRequest(CommonsMultipartRequestHandler.java:185)
>> org.apache.struts.util.RequestUtils.populate(RequestUtils.java:405)
>> org.apache.struts.chain.commands.servlet.PopulateActionForm.populate(PopulateActionForm.java:50)
>> org.apache.struts.chain.commands.AbstractPopulateActionForm.execute(AbstractPopulateActionForm.java:60)
>> org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
>> org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
>> org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
>> org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
>> org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
>> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
>> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>> org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:77)
>> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
>>
>> note The full stack trace of the root cause is available in the Apache
>> Tomcat/5.5.25 logs.
>>
>>
>>
>> Apache Tomcat/5.5.25
>>
>>
>
> --
> View this message in context:   
> http://www.nabble.com/Fw%3A-Processing-of-multipart-form-data-request-failed.-Socket-read-failed-tp14210197p14428925.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
>



-- 

// Jesús Miguel Torres Jorge - jesus en isaatc.ull.es
// Dpto.  de  Ingeniería  de  Sistemas  y  Automática
// y  Arquitectura   y  Tecnología  de   Computadores
// Universidad  de   La  Laguna   -  Tenerife,  Spain
// Linux  Counter  Registered  User #247255  -  GULiC
// www.gulic.org  -  OpenXML  no  debe  ser ISO 29500
// http://www.openxml.info/

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Fw: Processing of multipart/form-data request failed. Socket read failed

Posted by Alex Jacoby <ae...@icpsr.umich.edu>.
Similar problem here - only seeing it with Safari, only going through apache,
only on the first try (canceling upload and trying again always works).

Any solutions yet?

tomcat 5.5.26, apache 2.2.6

Thanks,
Alex

ps- I did a tomcat thread dump when it hung.  Here's where it appears to be
stuck:

"TP-Processor8" daemon prio=1 tid=0x0981fec0 nid=0x2437 runnable
[0x0359b000..0x0359ce20]
	at java.net.SocketInputStream.socketRead0(Native Method)
	at java.net.SocketInputStream.read(SocketInputStream.java:129)
	at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
	at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
	at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
	- locked <0xaa7e6150> (a java.io.BufferedInputStream)
	at org.apache.jk.common.ChannelSocket.read(ChannelSocket.java:626)
	at org.apache.jk.common.ChannelSocket.receive(ChannelSocket.java:564)
	at org.apache.jk.common.JkInputStream.receive(JkInputStream.java:200)
	at
org.apache.jk.common.JkInputStream.refillReadBuffer(JkInputStream.java:265)
	at org.apache.jk.common.JkInputStream.doRead(JkInputStream.java:183)
	at org.apache.coyote.Request.doRead(Request.java:419)
	at
org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:264)
	at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:403)
	at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:279)
	at
org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:193)
	at
org.apache.wicket.util.upload.MultipartFormInputStream.readBodyData(MultipartFormInputStream.java:553)



Jesús Torres wrote:
> 
> 
> Hi,
> 
> I have the same problem. I use Apache 2.2.3 (with APR 1.2.7) in front  
> of Tomcat 5.5.20, both connected by AJP (mod_proxy_ajp module). The  
> error is the same when unloading a file. It only works when:
> 
>   - The request is sent directly to tomcat.
> 
>   or
> 
>   - If I disable using libtcnative (the tomcat JNI wrapper for APR) in
> tomcat.
> 
> I do not know any other solution to this problem.
> 
> 
> Regards
> Jesús
> 
> Respondiendo a Boom <pe...@slac.stanford.edu>:
> 
>>
>> Hi,
>> I have the same setup (apache ajp - tomcat) and got the same error when
>> uploading a file. Have you figured out what causes it? The same upload
>> works
>> if the request is sent directly to tomcat and not through apache. Going
>> through apache only works if the request comes in from the same domain.
>> Thanks.
>> Boom
>>
>>
>> 宋杨 wrote:
>>>
>>> Hi all:
>>>
>>>     I use ajp between Apache2.2.6 and tomcat5.5.25, when I upload a file
>>> Exception occurred like below, anybody could tell me why? Thanks.
>>>     I think the key is  "java.io.IOException: Socket read failed
>>> org.apache.coyote.ajp.AjpAprProcessor.read(AjpAprProcessor.java:1037)"
>>>     Is it a Apr error when I install apache and tomcat? I'm not sure
>>> about
>>> it.
>>>
>>>
>>> Regards
>>> Derek
>>>
>>> ----------------------------------------------------------------------------------------------------------------------------
>>> HTTP Status 500 -
>>>
>>>
>>>
>>> type Exception report
>>> message
>>> description The server encountered an internal error () that prevented
>>> it
>>> from fulfilling this request.
>>> exception
>>> javax.servlet.ServletException: Processing of multipart/form-data
>>> request
>>> failed. Socket read failed
>>> org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286)
>>> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
>>> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>>> org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:77)
>>> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
>>>
>>> root cause
>>> javax.servlet.ServletException: Processing of multipart/form-data
>>> request
>>> failed. Socket read failed
>>> org.apache.struts.upload.CommonsMultipartRequestHandler.handleRequest(CommonsMultipartRequestHandler.java:194)
>>> org.apache.struts.util.RequestUtils.populate(RequestUtils.java:405)
>>> org.apache.struts.chain.commands.servlet.PopulateActionForm.populate(PopulateActionForm.java:50)
>>> org.apache.struts.chain.commands.AbstractPopulateActionForm.execute(AbstractPopulateActionForm.java:60)
>>> org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
>>> [SNIP]
> 

-- 
View this message in context: http://www.nabble.com/Fw%3A-Processing-of-multipart-form-data-request-failed.-Socket-read-failed-tp14210197p16942797.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org