delfer / docker-alpine-ftp-server

Small and flexible docker image with vsftpd server
189 stars 130 forks source link

Random '500 OOPS: failed to open vsftpd log file:/proc/1/fd/1' #68

Closed anne-mrl closed 8 months ago

anne-mrl commented 8 months ago

Hi,

We are running docker image on either firewall side to perform FXP transfer. We also use "normal" FTP transfer client -> server through the same firewall. To achieve those tasks, we are using Python (3.X) ftplib, and so returned error is ftplib.error_perm('500 OOPS: failed to open vsftpd log file:/proc/1/fd/1').

Before enabling FXP, everything worked fine, but after FXP enabled, sometimes, and randomly, this error about vsftpd_log_file occurs. To perform FXP, pasv_promiscuous=YES has been added to vsftpd.conf on one firewall side, and port_promiscuous=YES has been added to vsftpd.conf to the other firewall side. Everything is ok on our sandbox, but not in prod environment.

Do you have any idea?

Thanks for your help!

--

EDIT: After a big multiple files transfer session:

I confirm that both errors randomly occur. Both of them seem to occur on FTP connection step, as you can see on following errors details:

_ftplib.errorperm details: (FTP transfer client -> serveur)

  File "/opt/director/workflows/drivers/ftp.py", line 25, in ftp_upload
    with FTP(host, user, password) as ftp, open(src, "rb") as file:
         ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/ftplib.py", line 121, in __init__
    self.connect(host)
  File "/usr/local/lib/python3.11/ftplib.py", line 162, in connect
    self.welcome = self.getresp()
                   ^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/ftplib.py", line 254, in getresp
    raise error_perm(resp)
ftplib.error_perm: 500 OOPS: failed to open vsftpd log file:/proc/1/fd/1

_ftplib.errorproto details: (FXP transfer)

  File "/opt/director/workflows/tasks/fxp_transfer_t1_t2.py", line 46, in fxp_transfer_t1_t2
    with FXP(src_host, src_username, src_password, dst_host, dst_username, dst_password) as fxp:
  File "/opt/director/workflows/drivers/fxp.py", line 30, in __enter__
    print(f"FTP src login: {self.src_ftp.login(self.src_username, self.src_password)}")
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/ftplib.py", line 412, in login
    resp = self.sendcmd('USER ' + user)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/ftplib.py", line 281, in sendcmd
    return self.getresp()
           ^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/ftplib.py", line 255, in getresp
    raise error_proto(resp)
ftplib.error_proto
anne-mrl commented 8 months ago

Hi @delfer,

I close this issue, according to this post, we were in krisFR answer case "2. Second test". Extend exposed ports range solved our problem.

Have a nice day!