[Nagiosplug-devel] check_tcp don't report state if connection is refused
Thomas Guyot-Sionnest
dermoth at aei.ca
Fri May 14 03:50:26 CEST 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 10-05-13 08:17 AM, Kei Sakamoto wrote:
> Hi,
>
> # sorry for my poor english...
>
>
> I found it is likely a bug in check_tcp.
>
> check_tcp connect to the host but the connection is refused, just
> returned and no state was printed to stdout.
>
> In check_tcp.c line 231, this problem may be caused here. No state message!
>
> result = np_net_connect (server_address, server_port, &sd, PROTOCOL);
> if (result == STATE_CRITICAL) return STATE_CRITICAL;
This is somewhat correct. Nagios cares about the return code, not the
message.
I believe np_net_connect() prints something; so we could look at it but
we have to be careful as it could affect other plugins/programs...
- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkvsrGIACgkQ6dZ+Kt5BchY99ACgpOYQ1QPODXzdIZ/9JKk6oOtU
ErwAnj78NdbFS3espci0YjG8qibEjzkp
=m6rK
-----END PGP SIGNATURE-----
More information about the Devel
mailing list