I'm getting intermittent errors from devices connecting to my IIS REST service via SSL. My app works just fine, but sometimes I get this exception. It is handled properly and does not bring down app..
ut I wonder what does it mean and if there any way to fix it? Currently it causes delays in data retreived. Also, it floods logs and I can't really ignore it.. I wonder if I can better this situation.
Is this something I should expect when I deal with REST services? My server is on Amazon EC2.
Read error: ssl=0x1211a88: I/O error during system call, Connection reset by peer
javax.net.ssl.SSLException: Read error: ssl=0x1211a88: I/O error during system call, Connection reset by peer at org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_read(Native Method) at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl$SSLInputStream.read(OpenSSLSocketImpl.java:671) at libcore.io.Streams.readSingleByte(Streams.java:41) at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl$SSLInputStream.read(OpenSSLSocketImpl.java:655) at libcore.io.Streams.readAsciiLine(Streams.java:201) at libcore.net.http.HttpEngine.readResponseHeaders(HttpEngine.java:544) at libcore.net.http.HttpEngine.readResponse(HttpEngine.java:784) at libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:274) at libcore.net.http.HttpURLConnectionImpl.getResponseMessage(HttpURLConnectionImpl.java:475) at libcore.net.http.HttpsURLConnectionImpl.getResponseMessage
This is NOT something I can reproduce. Not permissions or onaything like this. This is intermittent problem. I see about 1000 of those every day from 200 devices connecting every minute.
The error message "Connection reset by peer" appears, if the web services client was waiting for a SOAP response from the remote web services provider and the connection was closed prematurely. One of the most common causes for this error is a firewall in the middle closing the connection.
java.io.IOException: Connection reset by peer. The other side has abruptly aborted the connection in midst of a transaction. That can have many causes which are not controllable from the server side on.
It seems like a timeout issue occurring on the client side causing for this exception on your server side. I've seen this happening on an upload method I have on my service, since it takes sometime to upload the file the chances the mobile will move between networks are quite high and that might cause this issue.
I would examine the following solutions:
Please update if you have any further details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With