ProFTPD被杀死(信号15)错误 - 如何修复logrotate重启错误?

joe*_*son 29 cron logrotate proftpd

Ubuntu上的ProFTPD意外被杀死.

日志消息:

$ tail /var/log/proftpd/proftpd.log.1
...
... ProFTPD killed (signal 15)
... ProFTPD 1.3.5rc3 standalone mode SHUTDOWN
Run Code Online (Sandbox Code Playgroud)

诊断:消息的时间与cron运行logrotate命令的时间相同.

由于日志文件,日志轮换和ProFTPD服务器无法重启,Google搜索会显示有关ProFTPD在基于Debian的系统上出现故障的各种信息.

我将为此解决方案添加赏金.我也发布了一个解决方案的答案,以防它对其他人有帮助.

joe*_*son 56

以下是https://bugs.launchpad.net/ubuntu/+source/proftpd-dfsg/+bug的解决方案解决方案

问题是由于ProFTPD没有及时停止重新启动.

解决方法是编辑服务文件,以添加重试.

/etc/init.d/proftpd
Run Code Online (Sandbox Code Playgroud)

找到这一行:

start-stop-daemon --stop --signal $SIGNAL --quiet --pidfile "$PIDFILE"
Run Code Online (Sandbox Code Playgroud)

改为:

start-stop-daemon --stop --signal $SIGNAL --retry 1 --quiet --pidfile "$PIDFILE"
Run Code Online (Sandbox Code Playgroud)

这个改变为我解决了.

欢迎提出改进建议.