對這文章發表回應
發表限制: 非會員 可以發表
發表者: 冷日 發表時間: 2011/12/29 2:52:30
2010-04-03 15:12 Starting Dovecot Imap: Fatal: listen(995) failed: Address already in use
這是我在重新啟動 CentOS 4 所遇到的錯誤訊息,POP3 服務起不來。怪哉!之前都沒這訊息,怎會突然出現呢?Address already in use,直覺就是 IP 位址已被使用了。不過,它應該是說 port 995 被使用了才對啦!
確認一下 port 995 是給哪個服務用的,檢視一下 /etc/services 檔的內容,發現原來是 POP3S。
pop3s 995/tcp # POP-3 over SSL
pop3s 995/udp # POP-3 over SSL
再來就是執行一下 netstat 來做確認:
# netstat -naltp 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:32768 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:2049 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:995 0.0.0.0:* LISTEN 3359/rpc.rquotad tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 3492/mysqld tcp 0 0 0.0.0.0:779 0.0.0.0:* LISTEN 3141/rpc.statd |
哈!終於找到兇手了,原來是 rpc.rquotad 佔掉啦!上網查了一下看如何解決,找到了一篇 更改 NFS 埠的文章。就依裡面的說法,在
/etc/sysconfig/nfs 加了一行:
RQUOTAD_PORT=14900
重新啟動 NFS 服務後,再執行 netstat 來檢視狀況:
# netstat -naltp 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:2049 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:32774 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 3492/mysqld tcp 0 0 0.0.0.0:779 0.0.0.0:* LISTEN 3141/rpc.statd tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 3121/portmap tcp 0 0 0.0.0.0:10000 0.0.0.0:* LISTEN 4030/perl tcp 0 0 0.0.0.0:14900 0.0.0.0:* LISTEN 4737/rpc.rquotad tcp 0 0 0.0.0.0:693 0.0.0.0:* LISTEN 4754/rpc.mountd |
哈! rpc.rquotad 果然換 listen port 14900。這樣就把問題解決了。
P.S. 後來我有測試重新啟動 NFS 服務,那個 listen port 也會變更啦!
原文出處: Starting Dovecot Imap: Fatal: listen(995) failed: Address already in use @ 暉獲無度的步烙閣 :: 隨意窩 Xuite日誌