monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error to send alert mail


From: J1 Simón
Subject: Re: Error to send alert mail
Date: Mon, 17 Sep 2012 15:46:39 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1

I'm embarrassed. The fault is mine, I have recompiled Monit and now it works well.
Sorry for the inconvenience.
Thanks. Regards.

El lun 17 sep 2012 15:13:02 CEST, Martin Pala escribió:
Thanks for data.

It seems that the problem is in SSL ... the communication went normally and 
without delays until the STARTTLS command was sent by Monit. Monit then tried to 
switch the socket to SSL/TLS, which failed and Monit tried to close the connection 
- it sent QUIT command (which is not right at this point, but it's just secondary 
problem) and was waiting for 30s for the response to QUIT, which didn't came from 
the server - that is right at this phase, as the SSL communication should be 
pending => Monit closed connection and logged the error which you saw in the 
logfile.

=> the root cause is, that the SSL start failed (i've fixed the error handling 
to not send QUIT in this case and log more meaningful error).

What is the origin of the monit binary? Did you compile it from the source code 
or does it come in binary format? (if binary, where from the binary is?) Can 
you try the pre-compiled monit binary from our download page? (it comes with 
static SSL):
http://mmonit.com/monit/download/


Regards,
Martin



On Sep 17, 2012, at 2:33 PM, J1 Simón <address@hidden> wrote:

Hi,
I send this file to your email directly because this file has the IP of my 
server. I don't want that information to be accessible to anyone.
It's the output of command tcpdump.
Regards.

El lun 17 sep 2012 14:04:53 CEST, Martin Pala escribió:

You can use this:

tcpdump -s 0 -w /tmp/smtp.pcap port 587

(the output will go to the /tmp/smtp.pcap file)



On Sep 17, 2012, at 1:31 PM, J1 Simón <address@hidden> wrote:


Hello,

What parameters should I use with tcpdump?

I have tested with another smtp (without TLS) and it works.

With the Gmail smtp I have added the line "with timeout 60 seconds" but same 
problem.

Thanks. Regards.


El 17/09/12 12:13, Martin Pala escribió:

Hello,

the error is most probably caused by timeout ... the default timeout is 30s for 
monit 5.5. I have tested Gmail with the following configuration (matches you 
settings) and it works OK for me:

--8<--
set mailserver smtp.gmail.com port 587
username "address@hidden" password "******"
using tlsv1
--8<--

Please can you get network trace of the communication between Monit and Gmail? 
(for example using tcpdump or wireshark)

Regards,
Martin

On Sep 16, 2012, at 12:36 PM, J1 Simón <address@hidden> wrote:


I have opened a bug about this error: https://savannah.nongnu.org/bugs/?37355

Gentoo 64 bits
monit 5.5

_The problem_:

Recently I have updated to version 5.5 and now it doesn't work the alerts by 
mail. With previous version worked. The relevant part of monitrc:

set mailserver smtp.gmail.com port 587
username "address@hidden" password "mypassword"
using tlsv1
...
set mail-format {
from: address@hidden <mailto:address@hidden>
subject: monit alert -- $EVENT $SERVICE
message: $EVENT Service $SERVICE
Date: $DATE
Action: $ACTION
Description: $DESCRIPTION
}
...
check device rootfs with path /
if space usage > 93% then alert
alert address@hidden <mailto:address@hidden> with the mail-format {
subject: monit alert -- Disco duro casi lleno!!!
message: El espacio ocupado del disco supera el 93%
Date: $DATE
}
...

Today the warning occurred but it did not send any mail.
I have consulted the sent and spam folder of Gmail account but there isn't any 
alert message.

Log file:
....
[CEST Sep 15 11:03:00] error : 'rootfs' space usage 93.5% matches resource limit 
[space usage>93.0%]
[CEST Sep 15 11:03:30] error : Sendmail: error receiving data from the 
mailserver 'smtp.gmail.com' -- Resource temporarily unavailable
[CEST Sep 15 11:03:30] error : Aborting event
....

I have configured my ssmtp server to use Gmail stmp server following this guide: 
http://www.gentoo-wiki.info/HOWTO_Gmail_and_sSMTP and I can send mail using 
"mail" command. Then, I think the problem is only in monit.
Regards.

--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general



--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general



--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
<smtp.pcap>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]