问题描述:启动vsftpd进程时报错Job for vsftpd.service failed,如下所示:
系统:rhel 7.3
1、异常重现
[root@leo-827mgr-master local]# systemctl start vsftpd
Job for vsftpd.service failed because the control process exited with error code. See "systemctl status vsftpd.service" and "journalctl -xe" for details.
[root@leo-827mgr-master local]# systemctl status vsftpd.service
● vsftpd.service - Vsftpd ftp daemon
Loaded: loaded (/usr/lib/systemd/system/vsftpd.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sun 2023-10-22 17:48:06 CST; 17s ago
Process: 61236 ExecStart=/usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf (code=exited, status=2)
Oct 22 17:48:06 leo-827mgr-master systemd[1]: Starting Vsftpd ftp daemon...
Oct 22 17:48:06 leo-827mgr-master systemd[1]: vsftpd.service: control process exited, code=exited status=2
Oct 22 17:48:06 leo-827mgr-master systemd[1]: Failed to start Vsftpd ftp daemon.
Oct 22 17:48:06 leo-827mgr-master systemd[1]: Unit vsftpd.service entered failed state.
Oct 22 17:48:06 leo-827mgr-master systemd[1]: vsftpd.service failed.
2、解决过程
2.1、端口确认
--查看21端口是否被占用.
[root@leo-827mgr-master vsftpd]# lsof -i:21
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
vsftpd 61387 root 3u IPv6 296056 0t0 TCP *:ftp (LISTEN)
[root@leo-827mgr-master vsftpd]# netstat -antup | grep 21
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1211/sshd
tcp6 0 0 :::21 :::* LISTEN 61387/vsftpd
tcp6 0 0 :::22 :::* LISTEN 1211/sshd
说明:先kill占用端口的进程号.
2.2、修改配置文件
[root@leo-827mgr-master vsftpd]# vi /etc/vsftpd/vsftpd.conf
.....
chroot_local_user=YES
chroot_list_enable=NO
# (default follows)
chroot_list_file=/etc/vsftpd/chroot_list
......
2.3、重启vsftpd进程
[root@leo-827mgr-master vsftpd]# systemctl start vsftpd.service
[root@leo-827mgr-master vsftpd]# systemctl status vsftpd.service
● vsftpd.service - Vsftpd ftp daemon
Loaded: loaded (/usr/lib/systemd/system/vsftpd.service; disabled; vendor preset: disabled)
Active: active (running) since Sun 2023-10-22 17:56:41 CST; 5s ago
Process: 61386 ExecStart=/usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf (code=exited, status=0/SUCCESS)
Main PID: 61387 (vsftpd)
CGroup: /system.slice/vsftpd.service
└─61387 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf
Oct 22 17:56:41 leo-827mgr-master systemd[1]: Starting Vsftpd ftp daemon...
Oct 22 17:56:41 leo-827mgr-master systemd[1]: Started Vsftpd ftp daemon.
说明:将(default follows)注释掉后成功开启vsftpd进程.
参考网址:https://blog.csdn.net/weixin_43891901/article/details/124930083
标签:22,service,827mgr,leo,vsftpd,Job,master
From: https://blog.51cto.com/u_12991611/7978141