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 have noticed that occasionally amavis is not running.

I thought monit was watching the process, however it doesn't seem to warn me or fix it.

My monitrc entry looks like this and I can confirm that starting/stopping the process with monit works:

check process amavisd with pidfile /var/run/amavis/amavisd.pid
     group mail
     start program = "/etc/init.d/amavis start"
     stop  program = "/etc/init.d/amavis stop"
     if failed port 10024 protocol smtp then restart
     if 5 restarts within 5 cycles then timeout
     depends on amavisd_bin
     depends on amavisd_rc

   check file amavisd_bin with path /usr/sbin/amavisd-new
     group mail
     if failed checksum then unmonitor
     if failed permission 755 then unmonitor
     if failed uid root then unmonitor
     if failed gid root then unmonitor

   check file amavisd_rc with path /etc/init.d/amavis
     group mail
     if failed checksum then unmonitor
     if failed permission 755 then unmonitor
     if failed uid root then unmonitor
     if failed gid root then unmonitor

How should I troubleshoot this?

share|improve this question
    
Process 'sshd' Not monitored Process 'mysql' Not monitored Process 'postfix' Not monitored Process 'amavisd' Connection failed File 'amavisd_bin' Accessible File 'amavisd_rc' Accessible Process 'clamd' Not monitored Process 'dovecot' Not monitored File 'dovecot_init' Accessible File 'dovecot_bin' Accessible –  Adripants Dec 19 '13 at 1:17
    
looks like I have some work to do. –  Adripants Dec 19 '13 at 1:18
add comment

1 Answer

Start by checking that all the tests in the monit configuration is valid.

  • Does the configuration file have valid syntax?
  • Does /var/run/amavis/amavisd.pid exist?
  • Does /etc/init.d/amavis start and stop functions work?
  • Is amavis listening on port 10024 protocol SMTP?
  • Does /usr/sbin/amavisd-new and /etc/init.d/amavis exists?

Then you should continue to check the output of monit summary and monit status verbose and check if the output will help you to find the problem.

This might be a problem with monit or a problem with amavis. Or a combination of both. If you post more information (e.g. output from monit summary) I will edit this answer with more help.

share|improve this answer
    
I have checked through each of those and the answer is yes. I mentioned I can start it with monit, and monit warns me when it goes down: Connection failed Service amavisd Date: Thu, 19 Dec 2013 13:26:22 Action: restart Host: myserver.com.au Description: failed protocol test [SMTP] at INET[localhost:10024] via TCP -- SMTP: error receiving data -- Resource temporarily unavailable –  Adripants Dec 19 '13 at 3:09
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.