ECONNRESET(对等连接重置)

ECONNRESET(Connection reset by peer)
2021-02-23
  •  译文(汉语)
  •  原文(英语)

有人知道我收到此错误后会发生什么,我在此问题上锁定了几个小时.我的代码是:

HttpPost httpPost = new HttpPost(SERVICE_DATA_ADRESSE);
HttpResponse response = httpClient.execute(httpPost);
HttpEntity entity = response.getEntity();
Scanner sc = new Scanner(entity.getContent());

在服务器端,当我对其进行调试时,该方法调用运行良好(这是一台Csharp服务器)

当代码运行时,我收到此错误

ECONNRESET(Connection reset by peer)

但我不知道这到底是什么意思.有人可以将这个错误翻译给我吗?

谢谢,

艾略特

解决过程1

服务器要发送答案时,这是由于序列化问题.

Does someone know what happen when i receive this error, I am lock for some hours on this problem. My code is :

HttpPost httpPost = new HttpPost(SERVICE_DATA_ADRESSE);
HttpResponse response = httpClient.execute(httpPost);
HttpEntity entity = response.getEntity();
Scanner sc = new Scanner(entity.getContent());

On the server side the method call is working well when i debug it (It is a Csharp server)

When the code run i receive this error

ECONNRESET(Connection reset by peer)

but i have no idea what does it really mean. Does someone can translate to me this error ?

Thanks,

Eliott

Solutions1

It was due to a problem in serialisation when the server want to send the answer.

转载于:https://stackoverflow.com/questions/23733417/econnresetconnection-reset-by-peer

本人是.net程序员,因为英语不行,使用工具翻译,希望对有需要的人有所帮助
如果本文质量不好,还请谅解,毕竟这些操作还是比较费时的,英语较好的可以看原文

留言回复
我们只提供高质量资源,素材,源码,坚持 下了就能用 原则,让客户花了钱觉得值
上班时间 : 周一至周五9:00-17:30 期待您的加入