pysftp Exception: Expecting packet from (31,), got 94
来源:互联网 发布:电力负荷计算软件 编辑:程序博客网 时间:2024/05/29 06:57
好吧,我自问自答了
http://stackoverflow.com/questions/29223790/paramiko-ssh-exception-sshexception-expecting-packet-from-31-got-94/29257625#29257625
When I use pysftp-0.2.8 to send a Large files to my sftp service. it always got the same error:paramiko.ssh_exception.SSHException: Expecting packet from (31,), got 94
The file is about 1.5G , when it transfers at 500M, it break.code here:
import pysftpupftp=FTP(host=ftp_ip, user=ftp_name, passwd=ftp_passwd, acct=ftp_port, timeout=None)...try: upftp.storbinary('STOR %s'%obj[2], fp, 8192, self.callpecent) except Exception as error: fp.close() self.endit(upftp, 1, '%s,%s'%(obj[2],error), '%s,%s'%(obj[2],error)
)
the error message at here:
2015-03-24 09:43:05 DEBUG - Rekeying (hit 32729 packets, 536900100 bytes sent)2015-03-24 09:43:05 DEBUG - Ciphers agreed: local=aes128-ctr, remote=aes128-ctr2015-03-24 09:43:05 DEBUG - using kex diffie-hellman-group1-sha1; server key type ssh-rsa; cipher: local aes128-ctr, remote aes128-ctr; mac: local hmac-sha1, remote hmac-sha1; compression: local none, remote none2015-03-24 09:43:05 ERROR - Exception: Expecting packet from (31,), got 942015-03-24 09:43:05 ERROR - Traceback (most recent call last):2015-03-24 09:43:05 ERROR - File "D:\Python34\lib\site-packages\paramiko-1.14.0-py3.4.egg\paramiko\transport.py", line 1435, in run2015-03-24 09:43:05 ERROR - raise SSHException('Expecting packet from %r, got %d' % (self._expected_packet, ptype))2015-03-24 09:43:05 ERROR - paramiko.ssh_exception.SSHException: Expecting packet from (31,), got 942015-03-24 09:43:05 ERROR - 2015-03-24 09:43:05 DEBUG - Dropping user packet because connection is dead.2015-03-24 09:43:05 DEBUG - [chan 1] close(b'd40b000000000000')2015-03-24 09:43:05 INFO - [chan 1] sftp session closed.
I find somethings may be useful :)
in the paramiko/packet.pyREKEY_PACKETS = pow(2, 29)REKEY_BYTES = pow(2, 29)REKEY_PACKETS_OVERFLOW_MAX = pow(2, 29) # Allow receiving this many packets after a re-key request before terminatingREKEY_BYTES_OVERFLOW_MAX = pow(2, 29) # Allow receiving this many bytes after a re-key request before terminating
and
def _trigger_rekey(self): # outside code should check for this flag self.__need_rekey = True
when it use the re-key ,it goes wrong.
0 0
- pysftp Exception: Expecting packet from (31,), got 94
- Got an exception - expecting xxx found EOF
- java.sql.SQLException: Io exception:Got minus one from a read call
- Got a packet bigger than 'max_allowed_packet' bytes
- Got a packet bigger than 'max_allowed_packet' bytes
- Got a packet bigger than 'max_allowed_packet' bytes
- Gradle error: expecting anything but ”\n”; got it anyway
- ssh-host-config 28: syntax error: got (, expecting Newline
- app.json Expecting 'STRING','NUMBER','NULL','TRUE','FALSE','{','[',']', got INVALID
- Got my offer from GE
- Got my offer from GE
- mysql-Got a packet bigger than ‘max_allowed_packet’ bytes
- error: Got a packet bigger than ‘max_allowed_packet’ bytes
- MySQL Got a packet bigger than 'max_allowed_packet' bytes错误
- MySQL Got a packet bigger than 'max_allowed_packet' bytes错误
- Got a packet bigger than ‘max_allowed_packet’ bytes的解决方法
- MYSQL error: Got a packet bigger than ‘max_allowed_packet’ bytes
- MYSQL error: Got a packet bigger than ‘max_allowed_packet’ bytes
- 浏览器开发系列第一篇:如何获取最新chromium源码
- 实体对象的变更
- vim带你装逼带你飞(一)
- hdoj 1840 Equations
- 完美解决 未能打开编辑器:Unmatched braces in the pattern.
- pysftp Exception: Expecting packet from (31,), got 94
- [ 正则 ]正则表达式进阶!
- 阴影映射(Shadow Map)的研究(一)
- 直接链接字段的添加以及substring内存泄露的考虑
- activity生命周期
- 基于java反射知识的类查看器
- Hibernate缓存机制
- Decode ways--LeetCode
- 让Dev C++支持C++11