Dovecot 聲稱連接埠正在使用中,netstat 不同意

Dovecot 聲稱連接埠正在使用中,netstat 不同意

試著啟動 dovecot 給了我這個:

Apr 28 13:37:00 master: Error: service(pop3-login): listen(*, 110) failed: Address already in use
Apr 28 13:37:00 master: Error: service(pop3-login): listen(*, 995) failed: Address already in use
Apr 28 13:37:00 master: Error: service(imap-login): listen(*, 143) failed: Address already in use
Apr 28 13:37:00 master: Error: service(imap-login): listen(*, 993) failed: Address already in use

'netstat -tulpn' 顯示如下:

tcp        0      0 0.0.0.0:25                  0.0.0.0:*                   LISTEN      3369/master
tcp        0      0 0.0.0.0:52125               0.0.0.0:*                   LISTEN      2396/rpc.statd
tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN      3244/mysqld
tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN      2375/rpcbind
tcp        0      0 :::22                       :::*                        LISTEN      2562/sshd
tcp        0      0 :::25                       :::*                        LISTEN      3369/master
tcp        0      0 :::443                      :::*                        LISTEN      3390/httpd
tcp        0      0 :::39631                    :::*                        LISTEN      2396/rpc.statd
tcp        0      0 :::111                      :::*                        LISTEN      2375/rpcbind
tcp        0      0 :::80                       :::*                        LISTEN      3390/httpd
udp        0      0 0.0.0.0:68                  0.0.0.0:*                               2236/dhclient
udp        0      0 0.0.0.0:111                 0.0.0.0:*                               2375/rpcbind
udp        0      0 10.0.82.190:123             0.0.0.0:*                               2589/ntpd
udp        0      0 127.0.0.1:123               0.0.0.0:*                               2589/ntpd
udp        0      0 0.0.0.0:123                 0.0.0.0:*                               2589/ntpd
udp        0      0 0.0.0.0:43243               0.0.0.0:*                               2396/rpc.statd
udp        0      0 0.0.0.0:854                 0.0.0.0:*                               2375/rpcbind
udp        0      0 127.0.0.1:876               0.0.0.0:*                               2396/rpc.statd
udp        0      0 :::111                      :::*                                    2375/rpcbind
udp        0      0 :::854                      :::*                                    2375/rpcbind
udp        0      0 :::54504                    :::*                                    2396/rpc.statd

知道我在這裡缺少什麼嗎?

更新:

selinux 已停用,發行版是 AWX Linux:

$ getenforce
Disabled

$ uname -a
Linux ip-10-0-82-190 4.14.268-139.500.amzn1.x86_64 #1 SMP Wed Mar 2 18:48:10 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

答案1

dovecot 似乎不知道 portreserve(相容)。

檢查 /etc/portreserve 中是否有保留您需要的連接埠的設定文件,並將它們從範圍中刪除(例如用 ~ 重命名它們)。或者,您可以將 portrelease 新增至 dovecot 初始化腳本中,以便在啟動 dovecot 之前釋放必要的連接埠。

值得注意的是這份勘誤表(https://access.redhat.com/errata/RHSA-2020:1062)導致此錯誤報告(“Dovecot 應使用 portrelease 以避免與 NFSv4 安裝的連接埠衝突”https://bugzilla.redhat.com/show_bug.cgi?id=1570283)。這些似乎使它更接近 NFSv4 所對抗的 portreseve 缺陷。我不清楚勘誤表是否真正解決了問題,因為錯誤報告僅提供了一些上下文,也許還提供了解決方法。

我認為這不能在鴿捨一側修復 - 並且修復 portreserve 應該可以解決這個問題。 SUNRPC 已知隨機分配rpc 連接埠665-1023 的缺點(嗯- 不是完全隨機- 它類似於6XX+pid,會導致某些系統上的993/995 連接埠經常出現問題) - 因此,當NFSv4 就位時,它沒有分配靜態端口,可以隨機佔用993/995端口。

相關內容