ConnectionResetError: [Errno 104] Connection reset by peer
来源:互联网 发布:linux zip 压缩 编辑:程序博客网 时间:2024/06/05 08:40
python socket 编程,sftp远程读日志文件,取最后的30行返回。收到ConnectionResetError: [Errno 104] Connection reset by peer报错。
最后找到原因是send的数据size太大,服务器端重置了连接
最后找到原因是send的数据size太大,服务器端重置了连接
Traceback (most recent call last):
File "s1.py", line 63, in <module>
data = tcpCliSock.recv(bufsize).decode()
ConnectionResetError: [Errno 104] Connection reset by peer
解决办法:把异常by pass
from socket import error as SocketError
import errno
try:
...
...
except SocketError as e:
if e.errno != errno.ECONNRESET:
raise
pass
阅读全文
0 0
- ConnectionResetError: [Errno 104] Connection reset by peer
- ConnectionResetError: [Errno 104] Connection reset by peer
- python [Errno socket error] [Errno 104] Connection reset by peer
- python httplib [Errno 104] Connection reset by peer问题
- Python 频繁请求问题: [Errno 104] Connection reset by peer
- linux errno 104 Connect reset by peer
- Gem::RemoteFetcher::FetchError: Errno::ECONNRESET: Connection reset by peer - SSL_connect
- gem install 出现Errno::ECONNRESET: Connection reset by peer - SSL_connect
- gem Errno::ECONNRESET: Connection reset by peer - SSL_connect
- Connection reset by peer
- Connection reset by peer
- Connection reset by peer
- Connection reset by peer
- python 爬虫 <class 'socket.error'>: [Errno 104] Connection reset by peer)
- Squid:(104) Connection reset by peer
- putty "connection reset by peer"
- ERROR:Connection reset by peer
- 再探Connection Reset By Peer
- GJJ的日常之沉迷数学
- (*´Д`*)超讨厌php的变量定义
- Java练习(方法调用)
- 快速幂求模+矩阵的快速幂
- 过山车
- ConnectionResetError: [Errno 104] Connection reset by peer
- HDU-2017中国大学生程序设计竞赛-网络选拔赛-1005-CaoHaha's staff
- corresponds to your MySQL server version for the right syntax to use near错误原因之一
- BZOJ 1086 [SCOI 2005] 王室联邦
- Java 中的锁 -Lock 接口解析
- java 控制台输入(标准输入法)以及Scanner的用法、以及Console的用法
- OSS之访问控制
- HDOJ1232 并查集入门题
- jvm源码阅读笔记[1]:如何触发一次CMS回收