monit-general
[Top][All Lists]
Advanced

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

Re: postfix check - unexpected behaviour


From: Martin Pala
Subject: Re: postfix check - unexpected behaviour
Date: Mon, 21 Nov 2011 15:49:46 +0100

Hi,

thanks for the data. I have looked on the dump, the check works as expected for the given configuration - your monit configuration doesn't specify the protocol, so monit does only TCP connect and closes the connection. Per the dump postfix sent response after the connection was closed and client side sends TCP reset for that packet. Monit shouldn't report any error, as the TCP connect was successful.

If you want to suppress the error, just specify the SMTP protocol test like this:

--8<--
 if failed host localhost port 25 protocol smtp then restart
--8<--

Bets regards,
Martin



On Nov 21, 2011, at 11:08 AM, Nick Upson wrote:

Hi,

can I provide anything further?

Nick Upson



On 17 November 2011 15:26, Nick Upson <address@hidden> wrote:
# tcpdump -i lo port 25
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on lo, link-type EN10MB (Ethernet), capture size 96 bytes
15:21:33.660335 IP localhost.localdomain.43847 > localhost.localdomain.smtp: S 4240463938:4240463938(0) win 32792 <mss 16396,sackOK,timestamp 169704903 0,nop,wscale 7>
15:21:33.660348 IP localhost.localdomain.smtp > localhost.localdomain.43847: S 4242120447:4242120447(0) ack 4240463939 win 32768 <mss 16396,sackOK,timestamp 169704903 169704903,nop,wscale 7>
15:21:33.660356 IP localhost.localdomain.43847 > localhost.localdomain.smtp: . ack 1 win 257 <nop,nop,timestamp 169704903 169704903>
15:21:33.660420 IP localhost.localdomain.43847 > localhost.localdomain.smtp: F 1:1(0) ack 1 win 257 <nop,nop,timestamp 169704903 169704903>
15:21:33.661210 IP localhost.localdomain.smtp > localhost.localdomain.43847: . ack 2 win 256 <nop,nop,timestamp 169704904 169704903>
15:21:33.671733 IP localhost.localdomain.smtp > localhost.localdomain.43847: P 1:37(36) ack 2 win 256 <nop,nop,timestamp 169704914 169704903>
15:21:33.671746 IP localhost.localdomain.43847 > localhost.localdomain.smtp: R 4240463940:4240463940(0) win 0

the output from "tcpdump -w ~/smtp.dump -s 0 -i lo port 25 " I am sending direct as I expect attachments not allowed

Nick Upson




On 17 November 2011 15:15, Martin Pala <address@hidden> wrote:
You can set the tcpdump/wireshark/etc. to use the loopback interface … for example using tcpdump:

   tcpdump -w ~/smtp.dump -s 0 -i lo port 25

Martin



On Nov 17, 2011, at 4:09 PM, Nick Upson wrote:

Hi,

its monit 5.3.1, I don't see how I can provide network trace when monit and the postfix instance are on the same machine - localhost

Nick Upson



On 17 November 2011 15:05, Martin Pala <address@hidden> wrote:
Hi,

which monit version it is? Please can you provide network trace for the test?

Thanks,
Martin


On Nov 16, 2011, at 12:27 PM, Nick Upson wrote:

> Hi,
>
> my check on postfix and the output in /var/log/maillog are below. I don't expect some of the behaviour
>
> a) monit appears to connect to postfix twice for each cycle
>
> b) the sequence is connect, lost connection, disconnect, surely monit connects and then disconnects so the lost connections are an error postfix or monit
>
>
>
> check process postfix with pidfile "/var/spool/postfix/pid/master.pid"
> start program = "/etc/init.d/postfix start"
> stop  program = "/etc/init.d/postfix stop"
> if failed host localhost port 25 type tcp then restart
>
>
> Nov 16 11:16:29 t227 postfix/smtpd[14595]: connect from localhost.localdomain[127.0.0.1]
> Nov 16 11:16:29 t227 postfix/smtpd[14595]: lost connection after CONNECT from localhost.localdomain[127.0.0.1]
> Nov 16 11:16:29 t227 postfix/smtpd[14595]: disconnect from localhost.localdomain[127.0.0.1]
> Nov 16 11:18:29 t227 postfix/smtpd[14704]: connect from localhost.localdomain[127.0.0.1]
> Nov 16 11:18:29 t227 postfix/smtpd[14704]: lost connection after CONNECT from localhost.localdomain[127.0.0.1]
> Nov 16 11:18:29 t227 postfix/smtpd[14704]: disconnect from localhost.localdomain[127.0.0.1]
>
> Nick Upson
>
> --
> 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


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


reply via email to

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