Tuesday, December 30, 2014

ProFTPd in standalone mode stopped unexpectedly


Symptom:
- ProFTPd service running on Ubuntu 14.04 (also with Ubuntu 14.04.1) will stop unexpectedly
- Log file will show expected shutdown message:

# tail /var/log/proftpd/proftpd.log.1
...
... ProFTPD killed (signal 15)
... ProFTPD 1.3.5rc3 standalone mode SHUTDOWN

- ProFTPd cannot be restarted by means of
# service proftpd restart
On the other hand the service can be resumed by separating the stop-start commands explicitly:
# service proftpd stop
# service proftpd start

Cause:
Some suggested that the service is not restarting after certain log rotation operations

Solution:
Edit the line found in file "/etc/init.d/proftpd"
start-stop-daemon --stop --signal $SIGNAL --quiet --pidfile "$PIDFILE"

Change to below by adding a --retry option:
start-stop-daemon --stop --signal $SIGNAL --retry 1 --quiet --pidfile "$PIDFILE"

Note there are two similar lines, I can solve the problem by only changing the first appearance of the pattern "start-stop-daemon --stop"

Reference:
http://stackoverflow.com/questions/23666697/proftpd-killed-signal-15-error-how-to-fix-logrotate-restart-error

No comments:

Post a Comment