Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
File Upload Times Out in Liferay 5.2.3 + Tomcat 6 + Redhat Linux
Hi
I have experienced an odd situation that Vaadin 6.2.7 file upload times out for ~30kb and larger files in Liferay 5.2.3 + Tomcat 6 + Redhat Linux and JDK 1.6. It works without problems when executed in local windows workstation with the same stack.
The stack trace:
com.vaadin.ui.Upload$UploadException: Upload failed
at com.vaadin.ui.Upload.receiveUpload(Upload.java:222)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleFileUpload(AbstractCommunicationManager.java:440)
at com.vaadin.terminal.gwt.server.CommunicationManager.handleFileUpload(CommunicationManager.java:242)
at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:434)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
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.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:746)
at org.apache.coyote.http11.InternalInputBuffer$InputStreamInputBuffer.doRead(InternalInputBuffer.java:776)
at org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityInputFilter.java:116)
at org.apache.coyote.http11.InternalInputBuffer.doRead(InternalInputBuffer.java:705)
at org.apache.coyote.Request.doRead(Request.java:428)
at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:304)
at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:405)
at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:327)
at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:193)
at com.vaadin.external.org.apache.commons.fileupload.MultipartStream$ItemInputStream.makeAvailable(Unknown Source)
at com.vaadin.external.org.apache.commons.fileupload.MultipartStream$ItemInputStream.read(Unknown Source)
at java.io.InputStream.read(InputStream.java:85)
at com.vaadin.ui.Upload.receiveUpload(Upload.java:182)
... 16 more
Best regards,
Tommi Laukkanen
Sounds like a operating system level problem. Try to upload the same file to the Liferay's CMS outside your own (Vaadin based) application to ensure that the problem is related to Vaadin + Liferay combination on this environment.
Hi Joonas
You are correct the problem repeats identically with Liferay Image Gallery. Liferay discussion forums contain message thread with similar problems. Even more strange is that this problem is only present when accessing the environment from our internal network. When the same is done from Internet the upload works. This has been tested from a couple of computers and at least one of them did not have proxies configured. I am not certain whether this issue is caused by problem in network, a bug in Liferay + Tomcat bundle or a combination of these. The problem repeats each time when file upload is tried so we need to further investigate the cause.
Regards,
Tommi