间歇性连接被对方错误的Android重置连接到.NET REST端点 [英] Intermittent Connection Reset by Peer errors in Android connecting to .NET REST endpoint
问题描述
我是从通过SSL连接到我的IIS REST服务设备越来越间歇性错误。 我的应用程序工作得很好,但有时我得到这个例外。它被妥善处理,不会搞垮应用程序。
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我不知道这是什么意思,如果有什么办法可以解决?目前,它会导致retreived数据延迟。此外,洪水日志,我真的不能忽视它。我不知道如果我能更好的这种情况。
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.
这是我应该想到,当我处理REST服务? 我的服务器是在Amazon EC2上。
Is this something I should expect when I deal with REST services? My server is on Amazon EC2.
读取错误:SSL = 0x1211a88:系统调用,连接在I / O错误 通过对复位
Read error: ssl=0x1211a88: I/O error during system call, Connection reset by peer
javax.net.ssl.SSLException:读取错误:SSL = 0x1211a88:I / O错误 系统调用过程中,连接在复位端 org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_read(母语 法)以 org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl$SSLInputStream.read(OpenSSLSocketImpl.java:671) 在libcore.io.Streams.readSingleByte(Streams.java:41)在 org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl$SSLInputStream.read(OpenSSLSocketImpl.java:655) 在libcore.io.Streams.readAsciiLine(Streams.java:201)在 libcore.net.http.HttpEngine.readResponseHeaders(HttpEngine.java:544) 在libcore.net.http.HttpEngine.readResponse(HttpEngine.java:784)在 libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:274) 在 libcore.net.http.HttpURLConnectionImpl.getResponseMessage(HttpURLConnectionImpl.java:475) 在libcore.net.http.HttpsURLConnectionImpl.getResponseMessage
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
这是不是我可以重现。没有权限或onaything这样。这是间歇性问题。我每天都看到有关1000的从200台设备连接的每一分钟。
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.
推荐答案
这似乎是在客户端上导致了这个异常的服务器端发生的超时问题。我已经看到这种情况发生在一个上传的方法我有我的服务,因为它需要一段时间来上传文件的机会在移动将网络之间移动的可能是相当高的,而且可能会导致此问题。
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.
这篇关于间歇性连接被对方错误的Android重置连接到.NET REST端点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!