enram / data-repository

Data quality assessment
https://enram.github.io/data-repository/
MIT License
3 stars 1 forks source link

Data transfer: frequent timeout in FTPConnector.__del__ #59

Closed niconoe closed 1 year ago

niconoe commented 4 years ago

While working on #58, I noticed quite frequently the following exception:

Exception ignored in: <bound method FTPConnector.__del__ of <datamover.connectors.FTPConnector object at 0x7ff706714320>>
Traceback (most recent call last):
  File "/home/ubuntu/data-repository/file_transfer/datamover/connectors.py", line 281, in __del__
    self._ftp.quit()
  File "/home/ubuntu/miniconda2/envs/enramtransfer/lib/python3.5/ftplib.py", line 664, in quit
    resp = self.voidcmd('QUIT')
  File "/home/ubuntu/miniconda2/envs/enramtransfer/lib/python3.5/ftplib.py", line 277, in voidcmd
    return self.voidresp()
  File "/home/ubuntu/miniconda2/envs/enramtransfer/lib/python3.5/ftplib.py", line 250, in voidresp
    resp = self.getresp()
  File "/home/ubuntu/miniconda2/envs/enramtransfer/lib/python3.5/ftplib.py", line 243, in getresp
    raise error_temp(resp)
ftplib.error_temp: 421 Timeout.

This always seems to happen during FTPConnector.__del__: does that mean the transfer itself is successful and just the disconnect fails? In that case, can we safely ignore this error?

niconoe commented 4 years ago

Update: the FTP disconnect shouldn't probably happen in __del__ since there's no guarantee when/if this method will be called. So:

peterdesmet commented 1 year ago

This should be investigated a part of vptstools, closing here.