系统调用期间发生I/O错误,S3客户端的对等问题重置了连接 [英] I/O error during system call, Connection reset by peer issue with S3 client

查看:442
本文介绍了系统调用期间发生I/O错误,S3客户端的对等问题重置了连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试将文件(图像,音频)上传到S3时,偶尔会遇到此异常.有什么解决办法吗?

I got this exception occasionally when try to upload files (image, audio) to S3. Is there any solution for this?

配置:Android 4x,5x,aws-android-sdk-s3版本2.2.14.

Configuration: Android 4x, 5x, aws-android-sdk-s3 version 2.2.14.

Unable to execute HTTP request: Write error: ssl=0x9ab52680: I/O error during system call, Connection reset by peer
javax.net.ssl.SSLException: Write error: ssl=0x9ab52680: I/O error during system call, Connection reset by peer
    at com.android.org.conscrypt.NativeCrypto.SSL_write(Native Method)
    at com.android.org.conscrypt.OpenSSLSocketImpl$SSLOutputStream.write(OpenSSLSocketImpl.java:766)
    at com.android.okhttp.okio.Okio$1.write(Okio.java:76)
    at com.android.okhttp.okio.AsyncTimeout$1.write(AsyncTimeout.java:155)
    at com.android.okhttp.okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.java:176)
    at com.android.okhttp.okio.RealBufferedSink.write(RealBufferedSink.java:46)
    at com.android.okhttp.internal.http.HttpConnection$FixedLengthSink.write(HttpConnection.java:302)
    at com.android.okhttp.okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.java:176)
    at com.android.okhttp.okio.RealBufferedSink$1.write(RealBufferedSink.java:198)
    at com.amazonaws.http.UrlHttpClient.write(UrlHttpClient.java:172)
    at com.amazonaws.http.UrlHttpClient.writeContentToConnection(UrlHttpClient.java:129)
    at com.amazonaws.http.UrlHttpClient.execute(UrlHttpClient.java:65)
    at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:360)
    at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:199)
    at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4221)
    at com.amazonaws.services.s3.AmazonS3Client.putObject(AmazonS3Client.java:1628)
    at net.tandem.ext.aws.AmazonUtil.uploadFile(AmazonUtil.java:131)
    at net.tandem.ext.aws.AmazonUtil.uploadFile(AmazonUtil.java:65)
    at net.tandem.service.MessageService$2.doInBackground(MessageService.java:323)
    at net.tandem.service.MessageService$2.doInBackground(MessageService.java:315)
    at android.os.AsyncTask$2.call(AsyncTask.java:295)
    at java.util.concurrent.FutureTask.run(FutureTask.java:237)
    at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
    at java.lang.Thread.run(Thread.java:818)

推荐答案

解决方案是重试该请求.

The solution is to retry the request.

对等方重置连接理论上是指由于通信故障或内部错误而导致远端服务器重置连接,尽管实际上,中间设备(尤其是防火墙和NAT/PAT设备)也可以制作响应数据包会产生同样的错误.

Connection reset by peer theoretically means the far end server reset the connection, due to a fault in the communication or an internal error, though in practice, intermediate equipment (particularly firewalls and NAT/PAT devices) can also craft a response packet that generates this same error.

通常,这可以解释为流量穿​​越Internet的结果-有时出问题了,超出了您的控制范围.

Usually this though be interpreted as a consequence of traffic traversing the Internet -- sometimes things go wrong, outside your control.

这种情况仅应表明您在其他请求成功的同时,同一请求反复抛出错误时,您做错了(可以纠正的事情).

This condition should only indicate you're doing something wrong (something you can correct) if the same request repeatedly throws an error while other requests are succeeding.

这篇关于系统调用期间发生I/O错误,S3客户端的对等问题重置了连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆