proFTPD 由於套接字綁定錯誤而無法工作
我正在嘗試在我的一台執行的設備上設置一個 FTP 伺服器,
DietPi
並且我選擇proFTPD
了它作為伺服器。我已經安裝了軟體並按照我在這裡找到的一些設置資訊進行操作。但後來我注意到該服務沒有執行。在試圖通過
ps aux | grep proftpd
我找到它之後,我沒有成功。發出後:
systemclt status proftpd.service
我得到以下資訊:● proftpd.service - LSB: Starts ProFTPD daemon Loaded: loaded (/etc/init.d/proftpd; generated) Active: failed (Result: exit-code) since Tue 2021-04-13 22:58:49 BST; 9s ago Docs: man:systemd-sysv-generator(8) Process: 26998 ExecStart=/etc/init.d/proftpd start (code=exited, status=1/FAILURE) Apr 13 22:58:48 DietPi systemd[1]: Starting LSB: Starts ProFTPD daemon... Apr 13 22:58:49 DietPi proftpd[26998]: Starting ftp server: proftpd2021-04-13 22:58:49,163 DietPi proftpd[2700 5]: mod_ctrls/0.9.5: error: unable to bind to local socket: Address already in use Apr 13 22:58:49 DietPi proftpd[26998]: 2021-04-13 22:58:49,242 DietPi proftpd[27005]: error: unable to stat() /var/log/proftpd: No such file or directory Apr 13 22:58:49 DietPi proftpd[26998]: 2021-04-13 22:58:49,244 DietPi proftpd[27005]: mod_ctrls/0.9.5: unable to open ControlsLog '/var/log/proftpd/controls.log': No such file or directory Apr 13 22:58:49 DietPi proftpd[26998]: 2021-04-13 22:58:49,246 DietPi proftpd[27005]: fatal: ControlsLog: unab le to open '/var/log/proftpd/controls.log': No such file or directory on line 68 of '/etc/proftpd/proftpd.conf' Apr 13 22:58:49 DietPi proftpd[26998]: failed! Apr 13 22:58:49 DietPi systemd[1]: proftpd.service: Control process exited, code=exited, s tatus=1/FAILURE Apr 13 22:58:49 DietPi systemd[1]: proftpd.service: Failed with result 'exit-code'. Apr 13 22:58:49 DietPi systemd[1]: Failed to start LSB: Starts ProFTPD daemon.
所以我在這裡挖了一點,結果發現沒有其他程序在 port 上執行或綁定
21
。那麼,這裡的服務失敗可能是什麼問題?此外,通過發布
sudo lsof -i tcp:21
我沒有得到任何回應。此外,通過
nmap
我得到以下資訊:PORT STATE SERVICE 22/tcp open ssh 53/tcp open domain 80/tcp open http
這裡沒有
21/tcp
港口。
proftpd -nd10
通過cl調試:roftpd -nd10 2021-04-14 08:13:45,498 DietPi proftpd[951]: using PCRE 8.39 2016-06-14 2021-04-14 08:13:45,508 DietPi proftpd[951]: using TCP receive buffer size of 131072 bytes 2021-04-14 08:13:45,510 DietPi proftpd[951]: using TCP send buffer size of 16384 bytes 2021-04-14 08:13:45,513 DietPi proftpd[951]: testing Unix domain socket using S_ISFIFO 2021-04-14 08:13:45,517 DietPi proftpd[951]: testing Unix domain socket using S_ISSOCK 2021-04-14 08:13:45,519 DietPi proftpd[951]: using S_ISSOCK macro for Unix domain socket detection 2021-04-14 08:13:45,528 DietPi proftpd[951]: mod_ctrls/0.9.5: error: unable to bind to local socket: Address already in use 2021-04-14 08:13:45,532 DietPi proftpd[951]: using 'UTF-8' as local charset for UTF-8 conversion 2021-04-14 08:13:45,535 DietPi proftpd[951]: ROOT PRIVS at mod_core.c:376 2021-04-14 08:13:45,537 DietPi proftpd[951]: RELINQUISH PRIVS at mod_core.c:378 2021-04-14 08:13:45,541 DietPi proftpd[951]: ROOT PRIVS at mod_core.c:385 2021-04-14 08:13:45,544 DietPi proftpd[951]: ROOT PRIVS at parser.c:1187 2021-04-14 08:13:45,549 DietPi proftpd[951]: mod_dso/0.5: loading 'mod_ctrls_admin.c' 2021-04-14 08:13:45,554 DietPi proftpd[951]: mod_dso/0.5: loaded module 'mod_ctrls_admin' (from '/usr/lib/proftpd/mod_ctrls_admin.so', last modified on Tue Mar 10 23:03:08 2020) 2021-04-14 08:13:45,558 DietPi proftpd[951]: mod_dso/0.5: loading 'mod_tls.c' 2021-04-14 08:13:45,562 DietPi proftpd[951]: mod_dso/0.5: loaded module 'mod_tls' (from '/usr/lib/proftpd/mod_tls.so', last modified on Tue Mar 10 23:03:08 2020) 2021-04-14 08:13:45,565 DietPi proftpd[951]: mod_tls/2.7: using OpenSSL 1.1.1d 10 Sep 2019 2021-04-14 08:13:45,587 DietPi proftpd[951]: mod_dso/0.5: loading 'mod_radius.c' 2021-04-14 08:13:45,591 DietPi proftpd[951]: mod_dso/0.5: loaded module 'mod_radius' (from '/usr/lib/proftpd/mod_radius.so', last modified on Tue Mar 10 23:03:08 2020) 2021-04-14 08:13:45,594 DietPi proftpd[951]: mod_dso/0.5: loading 'mod_quotatab.c' 2021-04-14 08:13:45,599 DietPi proftpd[951]: mod_dso/0.5: loaded module 'mod_quotatab' (from '/usr/lib/proftpd/mod_quotatab.so', last modified on Tue Mar 10 23:03:08 2020) 2021-04-14 08:13:45,602 DietPi proftpd[951]: mod_dso/0.5: loading 'mod_quotatab_file.c' 2021-04-14 08:13:45,607 DietPi proftpd[951]: mod_dso/0.5: loaded module 'mod_quotatab_file' (from '/usr/lib/proftpd/mod_quotatab_file.so', last modified on Tue Mar 10 23:03:08 2020) 2021-04-14 08:13:45,609 DietPi proftpd[951]: mod_dso/0.5: loading 'mod_quotatab_radius.c' 2021-04-14 08:13:45,612 DietPi proftpd[951]: mod_dso/0.5: loaded module 'mod_quotatab_radius' (from '/usr/lib/proftpd/mod_quotatab_radius.so', last modified on Tue Mar 10 23:03:08 2020) 2021-04-14 08:13:45,617 DietPi proftpd[951]: mod_dso/0.5: loading 'mod_wrap.c' 2021-04-14 08:13:45,625 DietPi proftpd[951]: mod_dso/0.5: loaded module 'mod_wrap' (from '/usr/lib/proftpd/mod_wrap.so', last modified on Tue Mar 10 23:03:08 2020) 2021-04-14 08:13:45,628 DietPi proftpd[951]: mod_dso/0.5: loading 'mod_rewrite.c' 2021-04-14 08:13:45,633 DietPi proftpd[951]: mod_dso/0.5: loaded module 'mod_rewrite' (from '/usr/lib/proftpd/mod_rewrite.so', last modified on Tue Mar 10 23:03:08 2020) 2021-04-14 08:13:45,636 DietPi proftpd[951]: mod_dso/0.5: loading 'mod_load.c' 2021-04-14 08:13:45,639 DietPi proftpd[951]: mod_dso/0.5: loaded module 'mod_load' (from '/usr/lib/proftpd/mod_load.so', last modified on Tue Mar 10 23:03:08 2020) 2021-04-14 08:13:45,643 DietPi proftpd[951]: mod_dso/0.5: loading 'mod_ban.c' 2021-04-14 08:13:45,648 DietPi proftpd[951]: mod_dso/0.5: loaded module 'mod_ban' (from '/usr/lib/proftpd/mod_ban.so', last modified on Tue Mar 10 23:03:08 2020) 2021-04-14 08:13:45,651 DietPi proftpd[951]: mod_dso/0.5: loading 'mod_wrap2.c' 2021-04-14 08:13:45,656 DietPi proftpd[951]: mod_dso/0.5: loaded module 'mod_wrap2' (from '/usr/lib/proftpd/mod_wrap2.so', last modified on Tue Mar 10 23:03:08 2020) 2021-04-14 08:13:45,660 DietPi proftpd[951]: mod_dso/0.5: loading 'mod_wrap2_file.c' 2021-04-14 08:13:45,664 DietPi proftpd[951]: mod_dso/0.5: loaded module 'mod_wrap2_file' (from '/usr/lib/proftpd/mod_wrap2_file.so', last modified on Tue Mar 10 23:03:08 2020) 2021-04-14 08:13:45,668 DietPi proftpd[951]: mod_dso/0.5: loading 'mod_dynmasq.c' 2021-04-14 08:13:45,673 DietPi proftpd[951]: mod_dso/0.5: loaded module 'mod_dynmasq' (from '/usr/lib/proftpd/mod_dynmasq.so', last modified on Tue Mar 10 23:03:08 2020) 2021-04-14 08:13:45,675 DietPi proftpd[951]: mod_dso/0.5: loading 'mod_exec.c' 2021-04-14 08:13:45,681 DietPi proftpd[951]: mod_dso/0.5: loaded module 'mod_exec' (from '/usr/lib/proftpd/mod_exec.so', last modified on Tue Mar 10 23:03:08 2020) 2021-04-14 08:13:45,683 DietPi proftpd[951]: mod_dso/0.5: loading 'mod_shaper.c' 2021-04-14 08:13:45,688 DietPi proftpd[951]: mod_dso/0.5: loaded module 'mod_shaper' (from '/usr/lib/proftpd/mod_shaper.so', last modified on Tue Mar 10 23:03:08 2020) 2021-04-14 08:13:45,692 DietPi proftpd[951]: mod_dso/0.5: loading 'mod_ratio.c' 2021-04-14 08:13:45,696 DietPi proftpd[951]: mod_dso/0.5: loaded module 'mod_ratio' (from '/usr/lib/proftpd/mod_ratio.so', last modified on Tue Mar 10 23:03:08 2020) 2021-04-14 08:13:45,699 DietPi proftpd[951]: mod_dso/0.5: loading 'mod_site_misc.c' 2021-04-14 08:13:45,704 DietPi proftpd[951]: mod_dso/0.5: loaded module 'mod_site_misc' (from '/usr/lib/proftpd/mod_site_misc.so', last modified on Tue Mar 10 23:03:08 2020) 2021-04-14 08:13:45,706 DietPi proftpd[951]: mod_dso/0.5: loading 'mod_sftp.c' 2021-04-14 08:13:45,722 DietPi proftpd[951]: mod_dso/0.5: loaded module 'mod_sftp' (from '/usr/lib/proftpd/mod_sftp.so', last modified on Tue Mar 10 23:03:08 2020) 2021-04-14 08:13:45,725 DietPi proftpd[951]: mod_sftp/1.0.0: using OpenSSL 1.1.1d 10 Sep 2019 2021-04-14 08:13:45,737 DietPi proftpd[951]: mod_dso/0.5: loading 'mod_sftp_pam.c' 2021-04-14 08:13:45,741 DietPi proftpd[951]: mod_dso/0.5: loaded module 'mod_sftp_pam' (from '/usr/lib/proftpd/mod_sftp_pam.so', last modified on Tue Mar 10 23:03:08 2020) 2021-04-14 08:13:45,744 DietPi proftpd[951]: mod_dso/0.5: loading 'mod_facl.c' 2021-04-14 08:13:45,749 DietPi proftpd[951]: mod_dso/0.5: loaded module 'mod_facl' (from '/usr/lib/proftpd/mod_facl.so', last modified on Tue Mar 10 23:03:08 2020) 2021-04-14 08:13:45,752 DietPi proftpd[951]: mod_dso/0.5: loading 'mod_unique_id.c' 2021-04-14 08:13:45,757 DietPi proftpd[951]: mod_dso/0.5: loaded module 'mod_unique_id' (from '/usr/lib/proftpd/mod_unique_id.so', last modified on Tue Mar 10 23:03:08 2020) 2021-04-14 08:13:45,762 DietPi proftpd[951]: mod_dso/0.5: loading 'mod_copy.c' 2021-04-14 08:13:45,768 DietPi proftpd[951]: mod_dso/0.5: loaded module 'mod_copy' (from '/usr/lib/proftpd/mod_copy.so', last modified on Tue Mar 10 23:03:08 2020) 2021-04-14 08:13:45,773 DietPi proftpd[951]: mod_dso/0.5: loading 'mod_deflate.c' 2021-04-14 08:13:45,787 DietPi proftpd[951]: mod_dso/0.5: loaded module 'mod_deflate' (from '/usr/lib/proftpd/mod_deflate.so', last modified on Tue Mar 10 23:03:08 2020) 2021-04-14 08:13:45,789 DietPi proftpd[951]: mod_deflate/0.5.7: using zlib 1.2.11 2021-04-14 08:13:45,792 DietPi proftpd[951]: mod_dso/0.5: loading 'mod_ifversion.c' 2021-04-14 08:13:45,798 DietPi proftpd[951]: mod_dso/0.5: loaded module 'mod_ifversion' (from '/usr/lib/proftpd/mod_ifversion.so', last modified on Tue Mar 10 23:03:08 2020) 2021-04-14 08:13:45,800 DietPi proftpd[951]: mod_dso/0.5: loading 'mod_memcache.c' 2021-04-14 08:13:45,805 DietPi proftpd[951]: mod_dso/0.5: loaded module 'mod_memcache' (from '/usr/lib/proftpd/mod_memcache.so', last modified on Tue Mar 10 23:03:08 2020) 2021-04-14 08:13:45,809 DietPi proftpd[951]: mod_memcache/0.1: using libmemcached-1.0.18 2021-04-14 08:13:45,812 DietPi proftpd[951]: mod_dso/0.5: loading 'mod_tls_memcache.c' 2021-04-14 08:13:45,815 DietPi proftpd[951]: mod_dso/0.5: loaded module 'mod_tls_memcache' (from '/usr/lib/proftpd/mod_tls_memcache.so', last modified on Tue Mar 10 23:03:08 2020) 2021-04-14 08:13:45,815 DietPi proftpd[951]: mod_dso/0.5: loading 'mod_readme.c' 2021-04-14 08:13:45,823 DietPi proftpd[951]: mod_dso/0.5: loaded module 'mod_readme' (from '/usr/lib/proftpd/mod_readme.so', last modified on Tue Mar 10 23:03:08 2020) 2021-04-14 08:13:45,825 DietPi proftpd[951]: mod_dso/0.5: loading 'mod_ifsession.c' 2021-04-14 08:13:45,831 DietPi proftpd[951]: mod_dso/0.5: loaded module 'mod_ifsession' (from '/usr/lib/proftpd/mod_ifsession.so', last modified on Tue Mar 10 23:03:08 2020) 2021-04-14 08:13:45,835 DietPi proftpd[951]: RELINQUISH PRIVS at parser.c:1190 2021-04-14 08:13:45,838 DietPi proftpd[951]: RELINQUISH PRIVS at mod_core.c:388 2021-04-14 08:13:45,844 DietPi proftpd[951]: DenyFilter: compiling regex '\*.*/' 2021-04-14 08:13:45,857 DietPi proftpd[951]: retrieved UID 1000 for user 'dietpi' 2021-04-14 08:13:45,862 DietPi proftpd[951]: retrieved GID 1000 for group 'dietpi' 2021-04-14 08:13:45,866 DietPi proftpd[951]: <IfModule>: using 'mod_quotatab.c' section at line 53 2021-04-14 08:13:45,868 DietPi proftpd[951]: <IfModule>: using 'mod_ratio.c' section at line 57 2021-04-14 08:13:45,871 DietPi proftpd[951]: <IfModule>: using 'mod_delay.c' section at line 61 2021-04-14 08:13:45,873 DietPi proftpd[951]: <IfModule>: using 'mod_ctrls.c' section at line 65 2021-04-14 08:13:45,874 DietPi proftpd[951]: ROOT PRIVS at mod_ctrls.c:114 2021-04-14 08:13:45,877 DietPi proftpd[951]: RELINQUISH PRIVS at mod_ctrls.c:117 2021-04-14 08:13:45,878 DietPi proftpd[951]: <IfModule>: using 'mod_ctrls_admin.c' section at line 73 2021-04-14 08:13:45,879 DietPi proftpd[951]: ROOT PRIVS at mod_core.c:376 2021-04-14 08:13:45,879 DietPi proftpd[951]: RELINQUISH PRIVS at mod_core.c:378 2021-04-14 08:13:45,879 DietPi proftpd[951]: ROOT PRIVS at mod_core.c:385 2021-04-14 08:13:45,879 DietPi proftpd[951]: processing configuration directory '/etc/proftpd/conf.d/' 2021-04-14 08:13:45,880 DietPi proftpd[951]: RELINQUISH PRIVS at mod_core.c:388 2021-04-14 08:13:45,907 DietPi proftpd[951]: UseReverseDNS off, returning IP address instead of DNS name 2021-04-14 08:13:45,907 DietPi proftpd[951] 127.0.0.1: 2021-04-14 08:13:45,907 DietPi proftpd[951] 127.0.0.1: Config for DietPi FTP: 2021-04-14 08:13:45,908 DietPi proftpd[951] 127.0.0.1: IdentLookups 2021-04-14 08:13:45,908 DietPi proftpd[951] 127.0.0.1: DeferWelcome 2021-04-14 08:13:45,908 DietPi proftpd[951] 127.0.0.1: MultilineRFC2228 2021-04-14 08:13:45,908 DietPi proftpd[951] 127.0.0.1: DefaultServer 2021-04-14 08:13:45,908 DietPi proftpd[951] 127.0.0.1: ShowSymlinks 2021-04-14 08:13:45,908 DietPi proftpd[951] 127.0.0.1: AllowRetrieveRestart 2021-04-14 08:13:45,908 DietPi proftpd[951] 127.0.0.1: AllowStoreRestart 2021-04-14 08:13:45,909 DietPi proftpd[951] 127.0.0.1: TimeoutNoTransfer 2021-04-14 08:13:45,909 DietPi proftpd[951] 127.0.0.1: TimeoutStalled 2021-04-14 08:13:45,909 DietPi proftpd[951] 127.0.0.1: TimeoutIdle 2021-04-14 08:13:45,909 DietPi proftpd[951] 127.0.0.1: DisplayLogin 2021-04-14 08:13:45,909 DietPi proftpd[951] 127.0.0.1: DisplayChdir 2021-04-14 08:13:45,909 DietPi proftpd[951] 127.0.0.1: ListOptions 2021-04-14 08:13:45,909 DietPi proftpd[951] 127.0.0.1: DenyFilter 2021-04-14 08:13:45,909 DietPi proftpd[951] 127.0.0.1: DefaultRoot 2021-04-14 08:13:45,910 DietPi proftpd[951] 127.0.0.1: RootLogin 2021-04-14 08:13:45,910 DietPi proftpd[951] 127.0.0.1: UserID 2021-04-14 08:13:45,910 DietPi proftpd[951] 127.0.0.1: UserName 2021-04-14 08:13:45,910 DietPi proftpd[951] 127.0.0.1: GroupID 2021-04-14 08:13:45,910 DietPi proftpd[951] 127.0.0.1: GroupName 2021-04-14 08:13:45,910 DietPi proftpd[951] 127.0.0.1: Umask 2021-04-14 08:13:45,910 DietPi proftpd[951] 127.0.0.1: DirUmask 2021-04-14 08:13:45,910 DietPi proftpd[951] 127.0.0.1: AllowOverwrite 2021-04-14 08:13:45,911 DietPi proftpd[951] 127.0.0.1: TransferLog 2021-04-14 08:13:45,911 DietPi proftpd[951] 127.0.0.1: SystemLog 2021-04-14 08:13:45,911 DietPi proftpd[951] 127.0.0.1: WtmpLog 2021-04-14 08:13:45,911 DietPi proftpd[951] 127.0.0.1: QuotaEngine 2021-04-14 08:13:45,911 DietPi proftpd[951] 127.0.0.1: Ratios 2021-04-14 08:13:45,911 DietPi proftpd[951] 127.0.0.1: DelayEngine 2021-04-14 08:13:45,912 DietPi proftpd[951] 127.0.0.1: mod_facl/0.6: registered 'facl' FS 2021-04-14 08:13:45,921 DietPi proftpd[951] 127.0.0.1: mod_tls/2.7: generating initial TLS session ticket key 2021-04-14 08:13:45,924 DietPi proftpd[951] 127.0.0.1: ROOT PRIVS at mod_tls.c:4815 2021-04-14 08:13:45,927 DietPi proftpd[951] 127.0.0.1: RELINQUISH PRIVS at mod_tls.c:4818 2021-04-14 08:13:45,930 DietPi proftpd[951] 127.0.0.1: mod_tls/2.7: scheduling new TLS session ticket key every 3600 secs 2021-04-14 08:13:45,935 DietPi proftpd[951] 127.0.0.1: mod_lang/1.1: binding to text domain 'proftpd' using locale path '/usr/share/locale' 2021-04-14 08:13:45,936 DietPi proftpd[951] 127.0.0.1: mod_lang/1.1: using locale files in '/usr/share/locale' 2021-04-14 08:13:45,939 DietPi proftpd[951] 127.0.0.1: mod_lang/1.1: skipping possible language 'ko_KR': not supported by setlocale(3); see `locale -a' 2021-04-14 08:13:45,943 DietPi proftpd[951] 127.0.0.1: mod_lang/1.1: skipping possible language 'bg_BG': not supported by setlocale(3); see `locale -a' 2021-04-14 08:13:45,945 DietPi proftpd[951] 127.0.0.1: mod_lang/1.1: skipping possible language 'ja_JP': not supported by setlocale(3); see `locale -a' 2021-04-14 08:13:45,948 DietPi proftpd[951] 127.0.0.1: mod_lang/1.1: skipping possible language 'en_US': not supported by setlocale(3); see `locale -a' 2021-04-14 08:13:45,951 DietPi proftpd[951] 127.0.0.1: mod_lang/1.1: skipping possible language 'fr_FR': not supported by setlocale(3); see `locale -a' 2021-04-14 08:13:45,954 DietPi proftpd[951] 127.0.0.1: mod_lang/1.1: skipping possible language 'es_ES': not supported by setlocale(3); see `locale -a' 2021-04-14 08:13:45,958 DietPi proftpd[951] 127.0.0.1: mod_lang/1.1: skipping possible language 'zh_TW': not supported by setlocale(3); see `locale -a' 2021-04-14 08:13:45,960 DietPi proftpd[951] 127.0.0.1: mod_lang/1.1: skipping possible language 'zh_CN': not supported by setlocale(3); see `locale -a' 2021-04-14 08:13:45,964 DietPi proftpd[951] 127.0.0.1: mod_lang/1.1: skipping possible language 'it_IT': not supported by setlocale(3); see `locale -a' 2021-04-14 08:13:45,968 DietPi proftpd[951] 127.0.0.1: mod_lang/1.1: skipping possible language 'ru_RU': not supported by setlocale(3); see `locale -a' 2021-04-14 08:13:45,971 DietPi proftpd[951] 127.0.0.1: ROOT PRIVS at mod_log.c:2151 2021-04-14 08:13:45,974 DietPi proftpd[951] 127.0.0.1: RELINQUISH PRIVS at mod_log.c:2154 2021-04-14 08:13:45,976 DietPi proftpd[951] 127.0.0.1: ROOT PRIVS at mod_rlimit.c:555 2021-04-14 08:13:45,978 DietPi proftpd[951] 127.0.0.1: RELINQUISH PRIVS at mod_rlimit.c:558 2021-04-14 08:13:45,980 DietPi proftpd[951] 127.0.0.1: set core resource limits for daemon 2021-04-14 08:13:45,981 DietPi proftpd[951] 127.0.0.1: ROOT PRIVS at mod_auth_unix.c:1338 2021-04-14 08:13:45,986 DietPi proftpd[951] 127.0.0.1: RELINQUISH PRIVS at mod_auth_unix.c:1341 2021-04-14 08:13:45,989 DietPi proftpd[951] 127.0.0.1: retrieved group ID: 1000 2021-04-14 08:13:45,991 DietPi proftpd[951] 127.0.0.1: setting group ID: 1000 2021-04-14 08:13:45,993 DietPi proftpd[951] 127.0.0.1: SETUP PRIVS at main.c:2594 2021-04-14 08:13:45,994 DietPi proftpd[951] 127.0.0.1: ROOT PRIVS at main.c:1862 2021-04-14 08:13:45,995 DietPi proftpd[951] 127.0.0.1: deleting existing scoreboard '/run/proftpd.scoreboard' 2021-04-14 08:13:45,996 DietPi proftpd[951] 127.0.0.1: opening scoreboard '/run/proftpd.scoreboard' 2021-04-14 08:13:45,998 DietPi proftpd[951] 127.0.0.1: RELINQUISH PRIVS at main.c:1889 2021-04-14 08:13:46,002 DietPi proftpd[951] 127.0.0.1: ROOT PRIVS at mod_ctrls_admin.c:1632 2021-04-14 08:13:46,002 DietPi proftpd[951] 127.0.0.1: opening scoreboard '/run/proftpd.scoreboard' 2021-04-14 08:13:46,005 DietPi proftpd[951] 127.0.0.1: RELINQUISH PRIVS at mod_ctrls_admin.c:1634 2021-04-14 08:13:46,007 DietPi proftpd[951] 127.0.0.1: ROOT PRIVS at inet.c:409 2021-04-14 08:13:46,008 DietPi proftpd[951] 127.0.0.1: RELINQUISH PRIVS at inet.c:459 2021-04-14 08:13:46,009 DietPi proftpd[951] 127.0.0.1: Failed binding to ::, port 21: Address already in use 2021-04-14 08:13:46,011 DietPi proftpd[951] 127.0.0.1: Check the ServerType directive to ensure you are configured correctly 2021-04-14 08:13:46,011 DietPi proftpd[951] 127.0.0.1: Check to see if inetd/xinetd, or another proftpd instance, is already using ::, port 21 2021-04-14 08:13:46,011 DietPi proftpd[951] 127.0.0.1: Unable to start proftpd; check logs for more details
通過調試
strace proftpd | grep -E "SOCKET|sock"
getpeername(0, 0xbe8a6c1c, [16]) = -1 ENOTSOCK (Socket operation on non-socket) socket(AF_UNIX, SOCK_DGRAM, 0) = 3 socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3 connect(3, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory) socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3 connect(3, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory) socket(AF_INET, SOCK_STREAM, IPPROTO_TCP) = 4 getsockopt(4, SOL_SOCKET, SO_RCVBUF, [131072], [4]) = 0 getsockopt(4, SOL_SOCKET, SO_SNDBUF, [16384], [4]) = 0 socket(AF_UNIX, SOCK_STREAM, 0) = 4 bind(4, {sa_family=AF_UNIX, sun_path="/run/test.sock"}, 110) = 0 unlink("/run/test.sock") = 0 socket(AF_UNIX, SOCK_STREAM, 0) = 4 bind(4, {sa_family=AF_UNIX, sun_path="/run/proftpd.sock"}, 110) = -1 EADDRINUSE (Address already in use) write(2, "2021-04-14 11:08:40,739 DietPiHo"..., 1292021-04-14 11:08:40,739 DietPi proftpd[2682]: mod_ctrls/0.9.5: error: unable to bind to local socket: Address already in use socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 6 connect(6, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory) socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 6 connect(6, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory) socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 5 connect(5, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory) socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 5 connect(5, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory) socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 4 connect(4, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory) socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 4 connect(4, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory) socket(AF_NETLINK, SOCK_RAW|SOCK_CLOEXEC, NETLINK_ROUTE) = 4 getsockname(4, {sa_family=AF_NETLINK, nl_pid=2682, nl_groups=00000000}, [12]) = 0 socket(AF_INET, SOCK_DGRAM|SOCK_CLOEXEC, IPPROTO_IP) = 4 getsockname(4, {sa_family=AF_INET, sin_port=htons(44402), sin_addr=inet_addr("127.0.0.1")}, [28->16]) = 0 getsockname(4, {sa_family=AF_INET, sin_port=htons(40796), sin_addr=inet_addr("127.0.0.1")}, [28->16]) = 0 socket(AF_INET, SOCK_DGRAM|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_IP) = 4
strace
輸出表明錯誤是由嘗試創建 引起的,/run/proftpd.sock
這顯然已經存在。嘗試
fuser /run/proftpd.sock
查看是否有任何程序在保留它;它將報告任何此類程序的 PID 編號。然後用於ps -fp <PID number here>
獲取有關相關過程的更多資訊。如果是
systemd
,您可能需要做一些類似的事情systemctl stop proftpd.socket; systemctl disable proftpd.socket
來擺脫它。(在這種情況下,DietPi 的預設 ProFTPD 配置可能已經定制為使用systemd
’s套接字啟動機制 - 本質上是一種可以替代經典inetd
/xinetd
僅按需執行 FTP 守護程序的機制。因為您似乎希望將 ProFTPD 作為經典的獨立服務,您需要禁用systemd
它的套接字。)如果是其他程序,您可能想要殺死它並弄清楚如何防止它再次啟動。
但是,如果
fuser
根本沒有列出任何程序,那可能/run/proftpd.sock
只是早期測試執行的遺留問題,它沒有正確啟動;在這種情況下,執行rm /run/proftpd.sock
並重試systemctl start proftpd.service
。