FTP connections can sometimes be stuck in CLOSE_WAIT #1398
Labels
bug
Something isn't working
crasher
Crashes entire app.
Priority 4 - Strategic
would benefit multiple use cases if resolved
ReliabilityRecovery
improve behaviour in failure situations.
It seems like for some servers, FTP connections aren't able to close connections properly.
When I try to setup a manual FTP connection to this same server, it will fail on the
ftp.quit()
and the FTP connection will remain in theCLOSE_WAIT
state .I verified the same commands with another server, to confirm that the problem wasn't isolated to the sr3 code, and we didn't get the same problem on the
ftp.quit()
.Looking online, it looks like sometimes FTP servers will return a
EOFError
when the trying to close the connection.https://post.bytes.com/forum/topic/python/710163-ftplib-returns-eoferror
https://stackoverflow.com/questions/50914835/eoferror-uploading-csv-file-using-ftplib/50930474#50930474
Current sr3 code isn't able handle this. We'd likely need to add an attempt to
ftp.close()
and change the except toexcept EOFError
sarracenia/sarracenia/transfer/ftp.py
Lines 183 to 195 in 3234451
The text was updated successfully, but these errors were encountered: