ProFTPd not working after update

bway

Verified User
Joined
Jan 11, 2023
Messages
6
Hi everyone,

After updating a lot of our servers don't have working proFTPd anymore.

ProFTPd will start but would not bind to port 21:

Jan 11 09:15:14 servername.name.nl systemd[1]: Stopped ProFTPD FTP Server. Jan 11 09:15:14 servername.name.nl systemd[1]: Starting ProFTPD FTP Server... Jan 11 09:15:14 servername.name.nl proftpd[27200]: 2023-01-11 09:15:14,090 servername.name.nl proftpd[27200]: mod_tls/2.9.2: certificate '/etc/exim.cert': expired on Nov 6 09:03:44 2022 GMT Jan 11 09:15:14 servername.name.nl systemd[1]: Started ProFTPD FTP Server. Jan 11 09:15:14 servername.name.nl proftpd[27202]: *Ipaddr* - notice: 'ProFTPd' (0.0.0.0:21) already bound to 'ProFTPd' Jan 11 09:15:14 servername.name.nl proftpd[27202]: *Ipaddr* - bindings.c:1746: notice: unable to create ipbind '0.0.0.0#21': Address already in use Jan 11 09:15:14 servername.name.nl proftpd[27202]: *Ipaddr* - ProFTPD 1.3.8 (stable) (built Wed Jan 11 2023 09:14:17 CET) standalone mode STARTUP

When checking with netstat for running processes on port 21, there aren´t any

Rebuilding ProFTPd doesn't solve the problem.

Anyone encounterd the same problems?
 
Do you have any custom ProFTPd configuration in /usr/local/directadmin/custombuild/custom ?
 
Hi,

We don't have any custom ProFTPd configuration in
Code:
/usr/local/directadmin/custombuild/custom

One thing we noticed, when we change the Port in the proftpd.conf to 2021, proftpd would start and bind to port 21 and 2021.

It looks like it's only happening on our Centos 7 servers.
 
Seems the address is already in use by the server. Maybe proftpd did not shutdown properly or some pid file is stuck.
Jan 11 09:15:14 servername.name.nl proftpd[27202]: *Ipaddr* - bindings.c:1746: notice: unable to create ipbind '0.0.0.0#21': Address already in use

Try rebooting the server.
 
Seems the address is already in use by the server. Maybe proftpd did not shutdown properly or some pid file is stuck.


Try rebooting the server.

We already tried rebooting. Didn't help.

I created a support ticket.
When I receive the solution I will post it here.
 
The commands

Code:
netstat -ntpl | grep :21

and

Code:
lsof -i :21

should show what service is using :21 port.
 
should show what service is using :21 port.
The log already says that:
Jan 11 09:15:14 servername.name.nl proftpd[27202]: *Ipaddr* - notice: 'ProFTPd' (0.0.0.0:21) already bound to 'ProFTPd'
Looks to me like some kind of double starting of proftpd.

I thought of asking these commands too but since he's talking about "a lot of servers" with the same issue after updating....
 
My experience suggests than one should double check everything, especially things posted on the forums.

I've never seen the error before.
 
It seems like there was a bit of time where custombuild had the new VirtualHost for SFTP on port 23 written like
Code:
<VirtualHost 0.0.0.0>
        <IfModule mod_sftp.c>

instead of
Code:
<IfModule mod_sftp.c>
        <VirtualHost 0.0.0.0>

So if you updated at that time and didn't have mod_sftp.c added then this VirtualHost would cause it to try and open another connection on port 21 since it wouldn't actually apply any of the SFTP related configs inside it leading to the error and nothing listening on port 21.

If you update it to swap the IfModule and VirtualHost to match the new updated config in CustomBuild or just run `./build proftpd` so it regenerates the config then it seems to work like normal again.
 
It seems like there was a bit of time where custombuild had the new VirtualHost for SFTP on port 23 written like
Code:
<VirtualHost 0.0.0.0>
        <IfModule mod_sftp.c>

instead of
Code:
<IfModule mod_sftp.c>
        <VirtualHost 0.0.0.0>

So if you updated at that time and didn't have mod_sftp.c added then this VirtualHost would cause it to try and open another connection on port 21 since it wouldn't actually apply any of the SFTP related configs inside it leading to the error and nothing listening on port 21.

If you update it to swap the IfModule and VirtualHost to match the new updated config in CustomBuild or just run `./build proftpd` so it regenerates the config then it seems to work like normal again.

This is indeed the reply I received from Directadmin support.
ProFTPd works again after changing the proftpd.conf manualy to:

Code:
<IfModule mod_sftp.c>
        <VirtualHost 0.0.0.0>

After rebuilding with Custombuild, it build the "broken" config back.
As stated I don't use a custom ProFTPd config.

DirectAdmin support replied they are currently checking what the right action is to take for them.
 
Back
Top