记帮同事解决vsftp安装后无法启动的过程

一、环境: centos7
二、过程:
yum install vsftpd 之后显示安装成功
然后systemctl start vsftpd报错


[root@VM_0_2_centos /]# 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.
    

按照提示查看 systemctl status vsftpd


[root@VM_0_2_centos /]# systemctl status vsftpd
 vsftpd.service - Vsftpd ftp daemon
   Loaded: loaded (/usr/lib/systemd/system/vsftpd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Wed 2017-12-27 15:39:59 CST; 16s ago
  Process: 19267 ExecStart=/usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf (code=exited, status=2)

Dec 27 15:39:59 VM_0_2_centos systemd[1]: Starting Vsftpd ftp daemon...
Dec 27 15:39:59 VM_0_2_centos systemd[1]: vsftpd.service: control process exited, code=exited status=2
Dec 27 15:39:59 VM_0_2_centos systemd[1]: Failed to start Vsftpd ftp daemon.
Dec 27 15:39:59 VM_0_2_centos systemd[1]: Unit vsftpd.service entered failed state.
Dec 27 15:39:59 VM_0_2_centos systemd[1]: vsftpd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

三、解决:
首先查看端口是否被占用:


[root@VM_0_2_centos /]# lsof -i:21
COMMAND     PID USER   FD   TYPE  DEVICE SIZE/OFF NODE NAME
pure-ftpd 16235 root    4u  IPv4 1014289      0t0  TCP *:ftp (LISTEN)
pure-ftpd 16235 root    5u  IPv6 1014290      0t0  TCP *:ftp (LISTEN)
[root@VM_0_2_centos /]# kill -9 16235
[root@VM_0_2_centos /]# lsof -i:21

再接下来查看配置文件
IPv4 ipv6 不能同时listen.
再启动


[root@VM_0_2_centos /]# systemctl start vsftpd
[root@VM_0_2_centos /]# systemctl status vsftpd
● vsftpd.service - Vsftpd ftp daemon
   Loaded: loaded (/usr/lib/systemd/system/vsftpd.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2017-12-27 15:43:59 CST; 3s ago
  Process: 19444 ExecStart=/usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf (code=exited, status=0/SUCCESS)
 Main PID: 19445 (vsftpd)
   CGroup: /system.slice/vsftpd.service
           └─19445 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf

Dec 27 15:43:59 VM_0_2_centos systemd[1]: Starting Vsftpd ftp daemon...
Dec 27 15:43:59 VM_0_2_centos systemd[1]: Started Vsftpd ftp daemon.
白发渔樵

白发渔樵

发表评论

电子邮件地址不会被公开。 必填项已用*标注