[Nagiosplug-devel] check_tcp don't report state if connection is refused

Kei Sakamoto kay at kay-es.net
Thu May 13 14:17:41 CEST 2010


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;


In check_http.c line 805, I found similar part below but it seems to
be processed rightly.

  if (my_tcp_connect (server_address, server_port, &sd) != STATE_OK)
    die (STATE_CRITICAL, _("HTTP CRITICAL - Unable to open TCP socket\n"));


I hope this problem will be managed similarly in check_tcp.


Thank you for your consideration,

Kei Sakamoto
<kay at kay-es.net>




More information about the Devel mailing list