Hi, there was bug in Monit 5.6, which may stop Monit if mail alert was generated and error occurred while SMTP close was pending. The fix is part of next Monit release which will be available soon.
Regards, Martin On 18 Dec 2013, at 10:37, Paolo Martinelli <[email protected]> wrote: > Hi all, > > we have multiple instances of Monit running on different hosts and among > other things we use one of them to monitor the status of our SMTP server. > The configuration used is the following: > > check host smtp.mydomain.com with address smtp.mydomain.com > if failed port 25 and protocol smtp then alert > > Few days ago we started experiencing some problem with our mail provider, > basically the SMTP server goes up and down every few minutes and it looks > like that this behaviour is crashing Monit from time to time. > > Hereafter the logs collected from the crashing Monit (with the -v option): > > [CET Dec 16 14:25:11] debug : 'smtp.mydomain.com' succeeded connecting to > INET[smtp.mydomain.com:25] via TCP > [CET Dec 16 14:25:16] error : 'smtp.mydomain.com' failed protocol test > [SMTP] at INET[smtp.mydomain.com:25] via TCP -- SMTP: error receiving data -- > Resource temporarily unavailable > > [CET Dec 16 14:25:16] debug : M/Monit: event message sent to > http://X.X.X.X:8080/collector > [CET Dec 16 14:25:16] debug : Connection failed notification is sent to > [email protected] > [CET Dec 16 14:25:16] debug : Connection failed notification is sent to > [email protected] > [CET Dec 16 14:25:46] error : Sendmail: Error receiving data from the > mailserver 'smtp.mydomain.com' -- Resource temporarily unavailable > [CET Dec 16 14:25:56] debug : M/Monit: status message sent to > http://X.X.X.X:8080/collector > [CET Dec 16 14:26:16] critical : IOException: Error receiving data from the > mailserver 'smtp.mydomain.com' -- Resource temporarily unavailable > raised in do_status at src/sendmail.c:119 > [CET Dec 16 14:26:16] info : Starting monit daemon with http interface at > [*:2812] > [CET Dec 16 14:26:16] info : Starting monit HTTP server at [*:2812] > [CET Dec 16 14:26:16] info : monit HTTP server started > [CET Dec 16 14:26:16] info : 'myhost' Monit started > [CET Dec 16 14:26:16] debug : M/Monit: event message sent to > http://X.X.X.X:8080/collector > [CET Dec 16 14:26:16] debug : Monit instance changed notification is sent > to [email protected] > [CET Dec 16 14:26:16] debug : Monit instance changed notification is sent > to [email protected] > [CET Dec 16 14:26:46] error : Sendmail: Error receiving data from the > mailserver 'smtp.mydomain.com' -- Resource temporarily unavailable > [CET Dec 16 14:27:16] critical : IOException: Error receiving data from the > mailserver 'smtp.mydomain.com' -- Resource temporarily unavailable > raised in do_status at src/sendmail.c:119 > [CET Dec 16 14:27:17] info : Starting monit daemon with http interface at > [*:2812] > [CET Dec 16 14:27:17] info : Starting monit HTTP server at [*:2812] > [CET Dec 16 14:27:17] info : monit HTTP server started > [CET Dec 16 14:27:17] info : 'myhost' Monit started > [CET Dec 16 14:27:17] debug : M/Monit: event message sent to > http://X.X.X.X:8080/collector > [CET Dec 16 14:27:17] debug : Monit instance changed notification is sent > to [email protected] > [CET Dec 16 14:27:17] debug : Monit instance changed notification is sent > to [email protected] > [CET Dec 16 14:27:46] info : M/Monit heartbeat started > [CET Dec 16 14:27:46] debug : Processing postponed events queue > > As I said all the other instances are working well without any issue. In > order to be sure that the cause of the crash was the SMTP check I have added > the above configuration lines to another Monit instance and after some time... > > [CET Dec 17 17:41:22] error : 'smtp.mydomain.com' failed protocol test > [SMTP] at INET[smtp.mydomain.com:25] via TCP -- SMTP: error receiving data -- > Resource temporarily unavailable > > [CET Dec 17 17:41:52] error : Sendmail: Error receiving data from the > mailserver 'smtp.mydomain.com' -- Resource temporarily unavailable > [CET Dec 17 17:42:22] critical : IOException: Error receiving data from the > mailserver 'smtp.mydomain.com' -- Resource temporarily unavailable > raised in do_status at src/sendmail.c:119 > [CET Dec 17 17:42:22] info : Starting monit daemon with http interface at > [*:2812] > [CET Dec 17 17:42:22] info : Starting monit HTTP server at [*:2812] > [CET Dec 17 17:42:22] info : monit HTTP server started > [CET Dec 17 17:42:22] info : 'myotherhost' Monit started > > By the way, both the Monit instances experienced the issue at the same time. > > Any suggestion is welcome. > > Many thanks in advance for the support. > > Paolo > > -- > To unsubscribe: > https://lists.nongnu.org/mailman/listinfo/monit-general
-- To unsubscribe: https://lists.nongnu.org/mailman/listinfo/monit-general
