clamd socket找不到錯誤解決

tengrid發表於2009-05-18
/var/log/maillog中有一段錯誤如下

Mar  7 14:41:40 bbn107 amavis[4899]: (04899-02) (!)ClamAV-clamd: Can't connect to UNIX socket /var/run/clamav/clamd: Connection refused, retrying (2)
Mar  7 14:41:46 bbn107 amavis[4899]: (04899-02) (!)run_av (ClamAV-clamd, built-in i/f): Too many retries to talk to /var/run/clamav/clamd (Can't connect to UNIX socket /var/run/clamav/clamd: Connection refused) at (eval 98) line 310.
Mar  7 14:41:46 bbn107 amavis[4899]: (04899-02) (!!)ClamAV-clamd av-scanner FAILED: CODE(0x94bade8) Too many retries to talk to /var/run/clamav/clamd (Can't connect to UNIX socket /var/run/clamav/clamd: Connection refused) at (eval 98) line 310. at (eval 98) line 511.
Mar  7 14:41:46 bbn107 amavis[4899]: (04899-02) (!!)WARN: all primary virus scanners failed, considering backups

ps ax也找不到程式clamd
啟動/usr/local/sbin/clamd後,過一段時間clamd程式會消失.

/var/log/clamav/clamd.log中的錯誤資訊

root@bbn107:/var/log/clamav# grep -i "ERROR"  clamd.log
Mon Jan 28 00:00:25 2008 -> ERROR: Socket file /var/run/clamav/clamd is in use by another process.
Mon Jan 28 00:32:37 2008 -> ERROR: Socket file /var/run/clamav/clamd is in use by another process.
Wed Jan 30 11:49:01 2008 -> ERROR: Socket file /var/run/clamav/clamd is in use by another process.
Fri Mar  7 11:15:42 2008 -> ERROR: Socket file /var/run/clamav/clamd exists. Either remove it, or configure a different one.
Fri Mar  7 14:10:26 2008 -> ERROR: Socket file /var/run/clamav/clamd exists. Either remove it, or configure a different one.

其實錯誤資訊中已經提示如何處理了: 刪除socket檔案,然後重啟clamd程式就會重新建立一個.


處理過程:
1, #rm /var/run/clamav/clamd
2, #/usr/local/sbin/clamd

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/94384/viewspace-600325/,如需轉載,請註明出處,否則將追究法律責任。

相關文章