關於vsftp啟動報錯的解決辦法

2021-08-21 20:43:06 字數 3406 閱讀 9096

[root@localhost vsftpd]# systemctl restart 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@localhost vsftpd]# journalctl -xe

jul 29 04:47:23 localhost.localdomain systemd[1]: vsftpd.service: control process exited, code=exited st

jul 29 04:47:23 localhost.localdomain systemd[1]: failed to start vsftpd ftp daemon.

– subject: unit vsftpd.service has failed

– defined-by: systemd

– the result is failed.

jul 29 04:47:23 localhost.localdomain systemd[1]: unit vsftpd.service entered failed state.

jul 29 04:47:23 localhost.localdomain systemd[1]: vsftpd.service failed.

jul 29 04:47:23 localhost.localdomain polkitd[674]: unregistered authentication agent for unix-process:7

jul 29 04:47:59 localhost.localdomain polkitd[674]: registered authentication agent for unix-process:746

jul 29 04:47:59 localhost.localdomain systemd[1]: starting vsftpd ftp daemon…

– subject: unit vsftpd.service has begun start-up

– defined-by: systemd

– unit vsftpd.service has begun starting up.

jul 29 04:47:59 localhost.localdomain systemd[1]: vsftpd.service: control process exited, code=exited st

jul 29 04:47:59 localhost.localdomain systemd[1]: failed to start vsftpd ftp daemon.

– subject: unit vsftpd.service has failed

– defined-by: systemd

– the result is failed.

jul 29 04:47:59 localhost.localdomain systemd[1]: unit vsftpd.service entered failed state.

jul 29 04:47:59 localhost.localdomain systemd[1]: vsftpd.service failed.

jul 29 04:47:59 localhost.localdomain polkitd[674]: unregistered authentication agent for unix-process:7

1.出現錯誤的原因是:由於centos7中vsftp的配置檔案預設將 listen_ipv6=yes 這一行沒有注釋掉,而我們目前的網路環境還不支援ipv6,從而導致出現錯誤無法啟動,所以解決方法是將 listen_ipv6=yes更改為:listen_ipv6=no,或將這一行注釋掉

2.檢查對比/etc/vsftpd/下vsftpd.conf配置檔案

[root@localhost vsftpd]# cat vsftpd.conf

anonymous_enable=yes

local_enable=yes

write_enable=yes

local_umask=022

anon_upload_enable=yes

anon_mkdir_write_enable=yes

anon_other_write_enable=yes

dirmessage_enable=yes

xferlog_enable=yes

connect_from_port_20=yes

xferlog_std_format=yes

listen=yes

listen_ipv6=no

再次重啟[root@localhost vsftpd]#systemctl restart vsftpd成功

檢視埠:

[root@localhost vsftpd]# netstat -antp

active internet connections (servers and established)

proto recv-q send-q local address foreign address state pid/program name

tcp 0 0 0.0.0.0:111 0.0.0.0:* listen 1/systemd

tcp 0 0 0.0.0.0:21 0.0.0.0: listen 7583/vsftpd*

tcp 0 0 192.168.122.1:53 0.0.0.0:* listen 1226/dnsmasq

tcp 0 0 0.0.0.0:22 0.0.0.0:* listen 1009/sshd

tcp 0 0 127.0.0.1:631 0.0.0.0:* listen 1008/cupsd

tcp 0 0 127.0.0.1:25 0.0.0.0:* listen 1114/master

tcp 0 52 192.168.183.110:22 192.168.183.1:52922 established 2774/sshd: root@pts

tcp6 0 0 :::111 :::* listen 1/systemd

tcp6 0 0 :::22 :::* listen 1009/sshd

tcp6 0 0 ::1:631 :::* listen 1008/cupsd

tcp6 0 0 ::1:25 :::* listen 1114/master

gem install redis報錯解決辦法

redis cluster安裝需要通過gem install redis來安裝相關依賴。否則報錯。通過gem install redis會報如下錯誤1 error loading command install loaderror cannot load such file zlib error w...

關於部分Unity發布IOS報錯的解決辦法

近期前公司的一直在用unity開發只發布android的專案,現在想發布ios專案,遇到了一些問題在此分享以下。用unity做專案就免不了接入不少第三方外掛程式,有的時候只實現了安卓方面的功能。但是不少第三方外掛程式都是同時支援android與ios,甚至有些第三方外掛程式直接寫好了ios互動的ap...

pycharm 安裝scrapy報錯解決辦法

如果你遇到的問題是 microsoft visual c 14.0 is required,那麼你來對地方了!出現這個錯誤可能並不是真的缺少c 庫,你可能缺少twisted包,這個包是scrapy的基礎。twisted 18.4.0 cp36 cp36m win32.whl我把它放在d twiste...