java.net.sockettimeoutexception

750 views
Skip to first unread message

probas...@gmail.com

unread,
Nov 9, 2015, 5:10:30 AM11/9/15
to manydesigns-portofino
Hi all,

I'm getting this error (java.net.sockettimeoutexception) every time i want to edit a record on the database through a CRUD page from an android phone.

I experienced this kind of trouble before when editing a record where the foreign fiel of the table to edit was configured as a RADIO button. Changin it to a DropDown solved it from the computer. I don't use RADIO Buttons anymore in neither of the pages.

I've been reading that it could be a network problem that could be solved editing the connection timeout limit to something higher. How could i do it?. Or, if there is a better-easyier solution, what can i do?.
Sameway, the EDIT button does not work every time. It fails to show the edit form 4 times from 5 trys. Maybe this problem has any relation with the UPDATE button as well.

Thank you very much in advanced.
This is driving me crazy.

probas...@gmail.com

unread,
Nov 9, 2015, 6:00:34 AM11/9/15
to manydesigns-portofino, probas...@gmail.com
This is the full error:

Estado HTTP 500 - Could not construct request wrapper.
type Informe de Excepción
mensaje Could not construct request wrapper.
descripción El servidor encontró un error interno que hizo que no pudiera rellenar este requerimiento.
excepción
net.sourceforge.stripes.exception.StripesServletException: Could not construct request wrapper.
net.sourceforge.stripes.controller.StripesRequestWrapper.constructMultipartWrapper(StripesRequestWrapper.java:130)
net.sourceforge.stripes.controller.StripesRequestWrapper.<init>(StripesRequestWrapper.java:106)
net.sourceforge.stripes.controller.StripesFilter.wrapRequest(StripesFilter.java:295)
net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilter.java:244)
com.manydesigns.portofino.servlets.CleanupFilter.doFilter(CleanupFilter.java:46)
com.manydesigns.portofino.servlets.DispatcherFilter.doFilter(DispatcherFilter.java:61)
org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
com.manydesigns.elements.servlet.ElementsFilter.doHttpFilter(ElementsFilter.java:132)
com.manydesigns.elements.servlet.ElementsFilter.doFilter(ElementsFilter.java:83)
causa raíz
java.net.SocketTimeoutException
org.apache.tomcat.util.net.NioBlockingSelector.read(NioBlockingSelector.java:202)
org.apache.tomcat.util.net.NioSelectorPool.read(NioSelectorPool.java:250)
org.apache.tomcat.util.net.NioSelectorPool.read(NioSelectorPool.java:231)
org.apache.coyote.http11.InternalNioInputBuffer.fill(InternalNioInputBuffer.java:133)
org.apache.coyote.http11.InternalNioInputBuffer$SocketInputBuffer.doRead(InternalNioInputBuffer.java:177)
org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityInputFilter.java:110)
org.apache.coyote.http11.AbstractInputBuffer.doRead(AbstractInputBuffer.java:416)
org.apache.coyote.Request.doRead(Request.java:469)
org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:342)
org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:395)
org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:367)
org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:190)
java.io.FilterInputStream.read(FilterInputStream.java:133)
org.apache.commons.fileupload.util.LimitedInputStream.read(LimitedInputStream.java:134)
org.apache.commons.fileupload.MultipartStream$ItemInputStream.makeAvailable(MultipartStream.java:997)
org.apache.commons.fileupload.MultipartStream$ItemInputStream.read(MultipartStream.java:901)
sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
java.io.InputStreamReader.read(InputStreamReader.java:184)
java.io.Reader.read(Reader.java:140)
org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1364)
org.apache.commons.io.IOUtils.copy(IOUtils.java:1340)
org.apache.commons.io.IOUtils.copy(IOUtils.java:1315)
org.apache.commons.io.IOUtils.toString(IOUtils.java:525)
com.manydesigns.portofino.stripes.StreamingCommonsMultipartWrapper.build(StreamingCommonsMultipartWrapper.java:117)
net.sourceforge.stripes.controller.multipart.DefaultMultipartWrapperFactory.wrap(DefaultMultipartWrapperFactory.java:161)
net.sourceforge.stripes.controller.StripesRequestWrapper.constructMultipartWrapper(StripesRequestWrapper.java:127)
net.sourceforge.stripes.controller.StripesRequestWrapper.<init>(StripesRequestWrapper.java:106)
net.sourceforge.stripes.controller.StripesFilter.wrapRequest(StripesFilter.java:295)
net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilter.java:244)
com.manydesigns.portofino.servlets.CleanupFilter.doFilter(CleanupFilter.java:46)
com.manydesigns.portofino.servlets.DispatcherFilter.doFilter(DispatcherFilter.java:61)
org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
com.manydesigns.elements.servlet.ElementsFilter.doHttpFilter(ElementsFilter.java:132)
com.manydesigns.elements.servlet.ElementsFilter.doFilter(ElementsFilter.java:83)
nota La traza completa de la causa de este error se encuentra en los archivos de diario de Apache Tomcat/8.0.26.

Alessio Stalla

unread,
Nov 10, 2015, 5:13:57 AM11/10/15
to manydesign...@googlegroups.com, probas...@gmail.com
Hi, can you provide more details about your environment? Java version, OS, network setup, that kind of stuff.

--
You received this message because you are subscribed to the Google Groups "manydesigns-portofino" group.
To unsubscribe from this group and stop receiving emails from it, send an email to manydesigns-port...@googlegroups.com.
To post to this group, send email to manydesign...@googlegroups.com.
Visit this group at http://groups.google.com/group/manydesigns-portofino.
For more options, visit https://groups.google.com/d/optout.

probas...@gmail.com

unread,
Nov 10, 2015, 5:58:50 AM11/10/15
to manydesigns-portofino, probas...@gmail.com
Hi, can you provide more details about your environment? Java version, OS, network setup, that kind of stuff.

Hi, I'm running:
  • Linux Mint 17.2 Rafaela.
  • java version "1.8.0_66". Java(TM) SE Runtime Environment (build 1.8.0_66-b17). Java HotSpot(TM) Server VM (build 25.66-b17, mixed mode).
  • The local network is a Gigabit LAN with an AP for wifi.
  • I have an Ubuntu server 14.04.3 LTS for Backups and it has a VPN configured through pptpd and vpnc.
  • And a cisco EPC3928 with a 200M internet cable connection.

The Mint machine runs a postgres 9.3 database and the portofino framework 4.2.

Computers in the LAN works fairy well with portofino, i can access and modify data from any of them with no problems most of the times. As i said in the first post i had some problems with the radio buttons in the forms that sometimes gave me a timeout error like described, and other like "bad constructed request" or something like this. But this is working fine now.

The problem comes when trying to edit or add a new record to the database from an android device.

Connected to the wifi, it works 2 from 10 times when editing a record.

Reading the records works perfectly every time.


When i connect to the vpn from the internet, it doesn't matter if it is from another wifi, or through 3g. I still can access the data with no problem, but when updating a record, i always get the timeout error.

Tried from diferent phones and tablets with android versions from 4.2 to 5.1.1


It looks strange. I've red that java 8 was android tested and the default timeout for the connection in tomecat should be at least 30 to 60 seconds....but and edit never takes me more than 20 seconds.

When i press the edit button from the detail view of one record, sometimes it just reloads the page. After 2 or 3 presses it takes me to the edit form and when edited, i press update and there breaks discarting all the changes i've made.


Thank you Alessio very much for taking some of your time on this. I really apreciate it. ^_^

probas...@gmail.com

unread,
Nov 12, 2015, 6:20:41 AM11/12/15
to manydesigns-portofino, probas...@gmail.com
Hi,

I've tested it from a php crud page with apache2 webserver from android through VPN and it works. So the problem is isolated to tomcat, java and portofino. Please let me know if you have any ideas on how to solve this issue.

Thank you very much.

Alessio Stalla

unread,
Nov 20, 2015, 5:38:51 AM11/20/15
to manydesign...@googlegroups.com, Xes Mint
I don't know really, it smells like a configuration problem in your network, a faulty firewall, who knows. People use Portofino applications in Android just fine across the Internet. Edits and updates are simple HTTP POSTs and if no blobs are involved they haven't big payloads.

--

probas...@gmail.com

unread,
Apr 3, 2016, 6:33:00 PM4/3/16
to manydesigns-portofino, probas...@gmail.com
By the way, this problem has been solved with the new version of Tomcat and Portofino. Once the upgrade to 4.2.1 has been made, no more timeout exceptions and the edit of every record from every device works great.

Thanks.
Reply all
Reply to author
Forward
0 new messages