Issue 25278: Unexpected socket exception on SFTP 'STOR' command (original) (raw)

Created on 2015-09-30 13:20 by blanquier, last changed 2022-04-11 14:58 by admin.

Files
File name Uploaded Description Edit
ftp_client.jpg blanquier,2015-09-30 14:15
ftp_server.jpg blanquier,2015-09-30 14:15
gui_ftp.py blanquier,2015-09-30 15:10
Messages (10)
msg251933 - (view) Author: Blanquier (blanquier) Date: 2015-09-30 13:20
With Filezilla Server 0.9.53, SFTP activated (force SSL on login, allow explicit FTP over TLS). From the FTP client point of view: when I use ftp_id.storbinary( 'STOR file_name'...), a socket.error exception arrive sometime. It's a socket.error exception and the errno record value is 0 (zero). The full message is b'[Errno 0] Error'. If I want to obtain the real server answer, I MUST call ftp_id.getresp(). It looks like a desynchronisation between the command and the answer. Could you correct it please ? Best regards.
msg251938 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2015-09-30 13:33
Does this have anything to do with python itself and its standard library? From your description this sounds like a problem with filezilla and should be reported to them.
msg251939 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2015-09-30 13:35
(Note: issue 25278 with a small amount of additional info closed as a duplicate of this one).
msg251941 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2015-09-30 13:45
From the info in issue 25279, I'd say it's an error in your code. But to make sure it's not an error in the stdlib, can you show us your code? Without that, it's not possible to diagnose this any further.
msg251942 - (view) Author: Blanquier (blanquier) Date: 2015-09-30 14:15
Hi, If I use the Python FTP instead of Python SFTP, there is no problem. The Python library works fine as well as the Filezilla server. The exception occures inside ssl.py file (line 791) when running self.sslobj.shutdown() instruction. I understand that the problem could be due to Filezilla server as well as Python ftplib code and it's difficult to say who is wrong. I have done 2 snapshots: one on the client side and the second on the sever side (see attached document). On the client side, we can see that the problem occure with the /tnr_nemo_dico.pyc/ file. On the server size, the last line indicates that the transfert is succesfull. It's the reason why I think that the Python FTP lib could have a bug when SFTP is in usage. It's a random problem because previous uploads have been OK. Are you agree with me or do I make a mistake ? Best regards, Philippe Blanquier Le 30/09/2015 15:33, R. David Murray a écrit : > R. David Murray added the comment: > > Does this have anything to do with python itself and its standard library? From your description this sounds like a problem with filezilla and should be reported to them. > > ---------- > nosy: +r.david.murray > resolution: -> third party > stage: -> resolved > status: open -> pending > > _______________________________________ > Python tracker <report@bugs.python.org> > <http://bugs.python.org/issue25278> > _______________________________________ >
msg251944 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2015-09-30 14:43
As Eric said, we really can't diagnose this unless you show is your python code (as code, not as a partial screenshot).
msg251948 - (view) Author: Blanquier (blanquier) Date: 2015-09-30 15:10
Hi, I send you the file as attached document. I use the test_sftp_upload() as entry point. Le 30/09/2015 16:43, R. David Murray a écrit : > R. David Murray added the comment: > > As Eric said, we really can't diagnose this unless you show is your python code (as code, not as a partial screenshot). > > ---------- > > _______________________________________ > Python tracker <report@bugs.python.org> > <http://bugs.python.org/issue25278> > _______________________________________ >
msg252107 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2015-10-02 11:27
You'll need to reproduce this in a smaller piece of code that demonstrates the problem. The code you've included is very large, and imports libraries we don't have access to. Otherwise, we can't reproduce it and we can't help.
msg252222 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2015-10-03 15:51
I wonder if this has any relationship to issue 19500.
msg377409 - (view) Author: Lars Schellhas (larsschellhas) Date: 2020-09-23 16:55
I am pretty sure that it is connected to issue 19500. And somehow that issue still isn't resolved although there are already solutions provided.
History
Date User Action Args
2022-04-11 14:58:22 admin set github: 69465
2020-09-23 16:55:42 larsschellhas set nosy: + larsschellhasmessages: +
2015-10-03 15:51:13 r.david.murray set messages: +
2015-10-02 11:27:12 eric.smith set messages: +
2015-09-30 15:10:36 blanquier set files: + gui_ftp.pymessages: +
2015-09-30 14:43:34 r.david.murray set messages: +
2015-09-30 14:15:13 blanquier set files: + ftp_client.jpg, ftp_server.jpgstatus: pending -> openmessages: +
2015-09-30 13:45:48 eric.smith set status: open -> pending
2015-09-30 13:45:42 eric.smith set status: pending -> opennosy: + eric.smithmessages: +
2015-09-30 13:36:00 r.david.murray set status: open -> pending
2015-09-30 13:35:49 r.david.murray set status: pending -> openmessages: +
2015-09-30 13:34:27 r.david.murray link issue25279 superseder
2015-09-30 13:33:24 r.david.murray set status: open -> pendingnosy: + r.david.murraymessages: + resolution: third partystage: resolved
2015-09-30 13:20:44 blanquier create