关于vsftp出现Restarting vsftpd (via systemctl): Job for vsftpd.service failed because the control 的解决办法

关于vsftp出现Restarting vsftpd (via systemctl):  Job for vsftpd.service failed because the control 的解决办法

刚刚在搭建ftp服务器时,在配置好一切的参数之后,在我重启时,出现了无法启动的错误,将配置文件改了好多次都更改不好,终于在经过一阵查资料后,终于将问题定位了出来,下面先摆出错误信息:

[root@www /home/zhoupan]# systemctl start vsftpd.service  
Job for vsftpd.service failed because the control process exited with error code. See "systemctl status vsftpd.service" and "journalctl -xe" for details.  
[root@www /home/zhoupan]# /etc/init.d/vsftpd start  
Starting vsftpd (via systemctl):  Job for vsftpd.service failed because the control process exited with error code. See "systemctl status vsftpd.service" and "journalctl -xe" for details.  
                                                           [FAILED]  
[root@www /home/zhoupan]# 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 三 2016-03-02 08:09:50 EST; 18s ago  
  Process: 17087 ExecStart=/usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf (code=exited, status=2)  
 Main PID: 16908 (code=killed, signal=TERM)  
  
3月 02 08:09:50 www.dreamchasinger.cn systemd[1]: Starting Vsftpd ftp daemon...  
3月 02 08:09:50 www.dreamchasinger.cn systemd[1]: vsftpd.service: control process exited, code=exited status=2  
3月 02 08:09:50 www.dreamchasinger.cn systemd[1]: Failed to start Vsftpd ftp daemon.  
3月 02 08:09:50 www.dreamchasinger.cn systemd[1]: Unit vsftpd.service entered failed state.  
3月 02 08:09:50 www.dreamchasinger.cn systemd[1]: vsftpd.service failed.  
[root@www /home/zhoupan]# journalctl -xe  
3月 02 08:10:01 www.dreamchasinger.cn kernel: SELinux: initialized (dev tmpfs, type tmpfs), uses transition SIDs  
3月 02 08:10:01 www.dreamchasinger.cn systemd[1]: Created slice user-0.slice.  
-- Subject: Unit user-0.slice has finished start-up  
-- Defined-By: systemd  
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel  
--   
-- Unit user-0.slice has finished starting up.  
--   
-- The start-up result is done.  
3月 02 08:10:01 www.dreamchasinger.cn systemd[1]: Starting user-0.slice.  
-- Subject: Unit user-0.slice has begun start-up  
-- Defined-By: systemd  
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel  
--   
-- Unit user-0.slice has begun starting up.  
3月 02 08:10:01 www.dreamchasinger.cn systemd[1]: Started Session 18 of user root.  
-- Subject: Unit session-18.scope has finished start-up  
-- Defined-By: systemd  
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel  
--   
-- Unit session-18.scope has finished starting up.  
--   
-- The start-up result is done.  
3月 02 08:10:01 www.dreamchasinger.cn systemd[1]: Starting Session 18 of user root.  
-- Subject: Unit session-18.scope has begun start-up  
-- Defined-By: systemd  
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel  
--   
-- Unit session-18.scope has begun starting up.  
3月 02 08:10:01 www.dreamchasinger.cn CROND[17093]: (root) CMD (/usr/lib64/sa/sa1 1 1)  
3月 02 08:10:01 www.dreamchasinger.cn systemd[1]: Removed slice user-0.slice.  
-- Subject: Unit user-0.slice has finished shutting down  
-- Defined-By: systemd  
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel  
--   
-- Unit user-0.slice has finished shutting down.  
3月 02 08:10:01 www.dreamchasinger.cn systemd[1]: Stopping user-0.slice.  
-- Subject: Unit user-0.slice has begun shutting down  
-- Defined-By: systemd  
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel  
--   
-- Unit user-0.slice has begun shutting down.  
3月 02 08:10:03 www.dreamchasinger.cn systemd[1]: Configuration file /usr/lib/systemd/system/ebtables.service is marked executable. Please remove executable permission bits. Proceeding anywa  
3月 02 08:10:03 www.dreamchasinger.cn systemd[1]: Configuration file /usr/lib/systemd/system/wpa_supplicant.service is marked executable. Please remove executable permission bits. Proceeding  
3月 02 08:10:07 www.dreamchasinger.cn systemd[1]: Configuration file /usr/lib/systemd/system/ebtables.service is marked executable. Please remove executable permission bits. Proceeding anywa  
3月 02 08:10:07 www.dreamchasinger.cn systemd[1]:  

我的配置文件内容为:
[plain]  view plain  copy
 print ? 在CODE上查看代码片 派生到我的代码片
  1. [root@www /home/zhoupan]# cat /etc/vsftpd/vsftpd.conf | grep '^[^#]'  
  2. anonymous_enable=YES  
  3. local_enable=YES  
  4. write_enable=YES  
  5. local_umask=022  
  6. xferlog_enable=YES  
  7. connect_from_port_20=YES  
  8. xferlog_file=/var/log/xferlog  
  9. xferlog_std_format=YES  
  10. ftpd_banner=Welcome to blah FTP service.  
  11. listen=YES  
  12. listen_port=21  
  13. listen_ipv6=YES  
  14. pam_service_name=vsftpd  
  15. userlist_enable=YES  
  16. tcp_wrappers=YES  
  17. pasv_enable=YES  
  18. use_localtime=YES  

出现错误的原因是:由于centos7中vsftp的配置文件默认将 listen_ipv6=YES 这一行没有注释掉,而我们目前的网络环境还不支持ipv6,从而导致出现错误无法启动,所以解决方法是将 listen_ipv6=YES更改为:listen_ipv6=NO,或将这一行注释掉

按上面的方法注释掉 listen_ipv6=YES后,成功启动vsftp

[plain]  view plain  copy
 print ? 在CODE上查看代码片 派生到我的代码片
  1. [root@www /home/zhoupan]# /etc/init.d/vsftpd start  
  2. Starting vsftpd (via systemctl):                           [  OK  ]  


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值