开发者社区> 问答> 正文

oss下载经常出现 远程主机强迫关闭了一个现有的连接

我们开发的软件使用的是 Aliyun.OSS.dll (2.5.1)库,个别用户会出现以下错误,重启程序也不能改变这个结果。


在出现该错误时,其他网络方面的连接都是正常的(imap连接、mqtt连接、Socket连接都是正常)。


有没有高手指导下如何解决这样的错误?十分感谢。



System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.IO.IOException: Unable to read data from the transport connection: 远程主机强迫关闭了一个现有的连接。. ---> System.Net.Sockets.SocketException: 远程主机强迫关闭了一个现有的连接。
   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   --- End of inner exception stack trace ---
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   at System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead)
   --- End of inner exception stack trace ---
   at Aliyun.OSS.Common.Communication.ServiceClientImpl.HandleException(WebException ex)
   at Aliyun.OSS.Common.Communication.ServiceClientImpl.SendCore(ServiceRequest serviceRequest, ExecutionContext context)
   at Aliyun.OSS.Common.Communication.ServiceClient.Send(ServiceRequest request, ExecutionContext context)
   at Aliyun.OSS.Common.Communication.RetryableServiceClient.SendImpl(ServiceRequest request, ExecutionContext context, Int32 retryTimes)
   at Aliyun.OSS.Common.Communication.RetryableServiceClient.Send(ServiceRequest request, ExecutionContext context)
   at Aliyun.OSS.Commands.OssCommand.Execute()
   at Aliyun.OSS.Commands.OssCommand`1.Execute()
   at Aliyun.OSS.OssClient.GetObject(GetObjectRequest getObjectRequest)
   at Aliyun.OSS.OssClient.GetObject(String bucketName, String key)


展开
收起
自命不凡 2018-07-26 10:32:28 4572 0
1 条回答
写回答
取消 提交回答
  • 大佬 后来有解决的方案了吗

    2022-08-02 16:09:30
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
OSS运维进阶实战手册 立即下载
《OSS运维基础实战手册》 立即下载
OSS运维基础实战手册 立即下载