[BlueOnyx:12605] Re: Dovecot dies with anvil too many open files

Gerald Waugh gwaugh at frontstreetnetworks.com
Fri Mar 22 19:04:24 -05 2013


On 03/22/2013 06:22 PM, David Thacker wrote:
>> I wonder if I'm having the same problems.
>> On one server I'm getting these:
>> dovecot: pop3-login: Error: auth: connect(login) failed: Connection
>> refused
>>
>> dovecot: imap-login: Error: auth: connect(login) failed: Connection
>> refused
>>
>> I have to manually kill all dovecot processes and have it restart before
>> people can log in again.
>> Could this also be a similar issue?
>> Gregg
> Yup, could be the same problem. Look for lines like these in your mail
> log:
>
> Mar 21 04:01:14 bx dovecot: pop3-login: Error: socket(anvil) failed: Too
> many open files
> Mar 21 04:01:14 bx dovecot: pop3-login: Error: net_connect_unix(anvil)
> failed: Too many open files
> Mar 21 04:01:14 bx dovecot: pop3-login: Fatal: Couldn't connect to anvil
> Mar 21 04:01:14 bx dovecot: master: Error: service(pop3-login): command
> startup failed, throttling
> Mar 21 04:01:15 bx dovecot: imap-login: Error: socket(anvil) failed: Too
> many open files
> Mar 21 04:01:15 bx dovecot: imap-login: Error: net_connect_unix(anvil)
> failed: Too many open files
> Mar 21 04:01:15 bx dovecot: imap-login: Fatal: Couldn't connect to anvil
> Mar 21 04:01:15 bx dovecot: master: Error: service(imap-login): command
> startup failed, throttling
>
>
> I either ssh in and do "service dovecot restart" or I toggle the POPS
> server off and then back on in the admin GUI to get it going again.
>
> I'm puzzled why the Active Monitor script can't seem to restart Dovecot,
> when I can restart it manually.
/usr/sausalito/swatch/bin/am_pop.exp


spawn telnet localhost 110
expect {
     "Connected to" {}
     default { # we don't connect properly
         # try to restart
         # use catch so we don't report errors on the exec,
         # only on the dialog itself
         catch {exec /etc/rc.d/init.d/dovecot restart >&/dev/null} result
         sleep 3
         # redo test, fail if get an error again
         spawn telnet localhost 110
         expect {
             "Connected to" {}
             default {
                 puts -nonewline $env(redMsg);
                 flush stdout;
                 exit $AM_STATE_RED;
             }
         }
     }
}

Does try once, somebody suggested a couple more 'sleep's and more tries

-- 
Gerald




More information about the Blueonyx mailing list