zoukankan      html  css  js  c++  java
  • 关于vsftp出现Restarting vsftpd (via systemctl): Job for vsftpd.service failed because the control 的解决办法

    转载于:http://blog.csdn.net/it_dream_er/article/details/50783111

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

    1. [root@www /home/zhoupan]# systemctl start vsftpd.service  
    2. Job for vsftpd.service failed because the control process exited with error code. See "systemctl status vsftpd.service" and "journalctl -xe" for details.  
    3. [root@www /home/zhoupan]# /etc/init.d/vsftpd start  
    4. 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.  
    5.                                                            [FAILED]  
    6. [root@www /home/zhoupan]# systemctl status vsftpd.service   
    7. ● vsftpd.service - Vsftpd ftp daemon  
    8.    Loaded: loaded (/usr/lib/systemd/system/vsftpd.service; disabled; vendor preset: disabled)  
    9.    Active: failed (Result: exit-code) since  2016-03-02 08:09:50 EST; 18s ago  
    10.   Process: 17087 ExecStart=/usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf (code=exited, status=2)  
    11.  Main PID: 16908 (code=killed, signal=TERM)  
    12.     
    13. 3 02 08:09:50 www.dreamchasinger.cn systemd[1]: Starting Vsftpd ftp daemon...  
    14. 3 02 08:09:50 www.dreamchasinger.cn systemd[1]: vsftpd.service: control process exited, code=exited status=2  
    15. 3 02 08:09:50 www.dreamchasinger.cn systemd[1]: Failed to start Vsftpd ftp daemon.  
    16. 3 02 08:09:50 www.dreamchasinger.cn systemd[1]: Unit vsftpd.service entered failed state.  
    17. 3 02 08:09:50 www.dreamchasinger.cn systemd[1]: vsftpd.service failed.  
    18. [root@www /home/zhoupan]# journalctl -xe  
    19. 3 02 08:10:01 www.dreamchasinger.cn kernel: SELinux: initialized (dev tmpfs, type tmpfs), uses transition SIDs  
    20. 3 02 08:10:01 www.dreamchasinger.cn systemd[1]: Created slice user-0.slice.  
    21. -- Subject: Unit user-0.slice has finished start-up  
    22. -- Defined-By: systemd  
    23. -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel  
    24. --   
    25. -- Unit user-0.slice has finished starting up.  
    26. --   
    27. -- The start-up result is done.  
    28. 3 02 08:10:01 www.dreamchasinger.cn systemd[1]: Starting user-0.slice.  
    29. -- Subject: Unit user-0.slice has begun start-up  
    30. -- Defined-By: systemd  
    31. -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel  
    32. --   
    33. -- Unit user-0.slice has begun starting up.  
    34. 3 02 08:10:01 www.dreamchasinger.cn systemd[1]: Started Session 18 of user root.  
    35. -- Subject: Unit session-18.scope has finished start-up  
    36. -- Defined-By: systemd  
    37. -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel  
    38. --   
    39. -- Unit session-18.scope has finished starting up.  
    40. --   
    41. -- The start-up result is done.  
    42. 3 02 08:10:01 www.dreamchasinger.cn systemd[1]: Starting Session 18 of user root.  
    43. -- Subject: Unit session-18.scope has begun start-up  
    44. -- Defined-By: systemd  
    45. -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel  
    46. --   
    47. -- Unit session-18.scope has begun starting up.  
    48. 3 02 08:10:01 www.dreamchasinger.cn CROND[17093]: (root) CMD (/usr/lib64/sa/sa1 1 1)  
    49. 3 02 08:10:01 www.dreamchasinger.cn systemd[1]: Removed slice user-0.slice.  
    50. -- Subject: Unit user-0.slice has finished shutting down  
    51. -- Defined-By: systemd  
    52. -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel  
    53. --   
    54. -- Unit user-0.slice has finished shutting down.  
    55. 3 02 08:10:01 www.dreamchasinger.cn systemd[1]: Stopping user-0.slice.  
    56. -- Subject: Unit user-0.slice has begun shutting down  
    57. -- Defined-By: systemd  
    58. -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel  
    59. --   
    60. -- Unit user-0.slice has begun shutting down.  
    61. 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  
    62. 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  
    63. 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  
    64. 3 02 08:10:07 www.dreamchasinger.cn systemd[1]:  

    我的配置文件内容为:

    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  

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

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

  • 相关阅读:
    selenium开发-C#/java/Python
    Web循环监控Java调用 / Java调用.net wcf接口
    网站循环加载监控-C#
    串口通信分析
    windows环境jar包部署到linux服务器,一键操作
    windows环境jar包部署到linux服务器,一键操作(帮助说明)
    Git+TortoiseGit使用帮助
    安装Docker
    MySQL报错信息:Warning: (1366, "Incorrect string value: '\xD6\xD0\xB9\xFA\xB1\xEA...' for column 'VARIABLE_VALUE' at row 489")
    txt文档中文乱码
  • 原文地址:https://www.cnblogs.com/xulele/p/5246782.html
Copyright © 2011-2022 走看看