Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I need a bit of help figuring something out. First off, I'm not very well versed with FreeBSD servers, etc. but with some direction hopefully I can get this fixed.

I'm using FreeBSD and installed Monit so I could monitor some of the processes that run tomcat, apache, mysql, sendmail, clamav. So far, I'm only successful in getting apache & mysql to be monitored.

I'm getting this error for clamav in the log file for /var/log/monit.log

'clamavd' failed, cannot open a connection to UNIX[/usr/local/etc/rc.d/clamav-clamd]

My config file for clamav in /etc/monitrc is:

####################################################################
# CLAMAV Virus Checks
####################################################################
check process clamavd with pidfile /var/run/clamav/clamd.pid
group virus
start program = "/usr/local/etc/rc.d/clamav-clamd start"
stop program = "/usr/local/etc/rc.d/clamav-clamd stop"
if failed unixsocket /usr/local/etc/rc.d/clamav-clamd then restart
if 5 restarts within 5 cycles then timeout

Honestly, I really don't know much of what's going on here. My host who helped me get the box set up basically installed clamav, but doesn't offer this kind of detail in supporting me, so I'm left to figure this stuff out on my own as I own the box, but they provide the isp service.

Is there anyone who can help me troubleshoot this? Thanks for your help in advance.

share|improve this question

migrated from stackoverflow.com Jan 1 '11 at 15:20

This question came from our site for professional and enthusiast programmers.

    
Does /usr/local/etc/rc.d/ directory exists? –  ismail Dec 31 '10 at 18:46
    
Does the user the process is running as have write privileges in /usr/local/etc/rc.d/clamav-clamd? –  Duck Dec 31 '10 at 21:44
add comment

1 Answer

Sounds like clam isn't running. Try running grep clamav /etc/rc.conf and see if it's enabled. If not run:

echo clamav_clamd_enable="YES" >> /etc/rc.conf
echo clamav_freshclam_enable="YES" >> /etc/rc.conf
/usr/local/etc/rc.d/clamav-clamd start

If it's already enabled, check dmesg for errors, or try just running clamavd and see if it spits anything out.

It's also possible that Clam was installed to run in a non-standard way, and Monit would need to be tailored to that configuration.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.