[Nagiosplug-devel] [ nagiosplug-Patches-3358348 ] check_smtp SIGPIPE (rc=141) error fix

SourceForge.net noreply at sourceforge.net
Wed Jul 13 11:15:32 CEST 2011

Patches item #3358348, was opened at 2011-07-08 10:22
Message generated for change (Comment added) made by ulrik_haugen
You can respond by visiting: 

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Bugfix
Group: release-1.4.15
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Duncan Ferguson (duncan_ferguson)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_smtp SIGPIPE (rc=141) error fix

Initial Comment:
When running check_smtp against some Exchange server versions the server can close the connection before the QUIT command is sent, resulting in a 141 return code (due to SIGPIPE signal).  This patch will ignore the SIGPIPE and catch the error when it occurs.

This appears to be a non-fatal error as no other problems have been reported about the Exchange server by SMTP users and there are no problems identified in the Exchange logs.

$ ./check_smtp -V
check_smtp v1.4.15 (nagios-plugins 1.4.15)
$ ./check_smtp -H  -v
HELOCMD: HELO localhost
Connection was closed by server before we could send QUIT command
SMTP OK - 0.001 sec. response time, ping
  rc = 0


Comment By: Ulrik Haugen (ulrik_haugen)
Date: 2011-07-13 11:15

check_smtp returning 141 is obviously a problem, but masking the cause of
it and returning STATE_OK instead seems an even bigger problem to me.

The server closing the connection prematurely could be a resource problem.

If this happens for you so often that tuning max_check_attempts,
normal_check_interval and retry_check_interval doesn't help then a patch
for check_smtp may be needed, but in that case ignoring that the connection
closes unexpectedly must be and option.


You can respond by visiting: 

More information about the Devel mailing list