在docker中安装vsftpd,在启动vsftpd服务的时候,会出现下面的错误
1 | > vsftpd failed - probably invalid config |
查了很多的资料,找到了如下的说明和解决方案
message “vsftpd failed - probably invalid config.” is received during boot.
Yet the server started normally. This message is issued by /etc/init.d/vsftpd.
This message is not issued on every boot, only occasionally.This appears to be a timing problem. The server is started asynchronously
from this script. The script then immediately looks for the PID file; and if
it doesn’t find it issues the above error message. But the server may not yet
have had time to create the PID file.Adding “sleep 1” between
start-stop-daemon –start –background -m –oknodo –pidfile /var/run/vsftpd/vsftpd.pid –exec ${DAEMON}
and
_PID=”$(if [ -e /var/run/vsftpd/vsftpd.pid ]; then cat /var/run/vsftpd/vsftpd.pid; fi)”
seems to fix the problem for me.
同时还有一个现成的解决的例子
其中的详细的代码