check_nt and "Connection refused by host"

Neil neil-on-nagios at restricted.dyndns.org
Sat Jan 17 04:53:46 CET 2004


Looks like that the remote host is not listening on that specified port.
Why don't you do this to check connectivity. On the nagios server: 

telnet xcnlm04s.fag.fiducia.de 1248 

or 

nmap -vv -sS -P0 -jn xcnlm04s.fag.fiducia.de -p1200-1300 

With the former, should should get a response similar to the text below:
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'. 

This is showing us that TCP connection was successful. 

Another example but failed:
Trying 192.168.1.2...
telnet: connect to address 192.168.1.2: Connection refused 

I tried to connect to 192.168.1.2 on port 55555 which the machine wasn't 
listening to. 

Another test that you can do is to go to xcnlm04s.fag.fiducia.de and on the 
msdos prompt, do this 

netstat -na|find "1248" 

If it gives you a line with LISTENING in it, it means the service is 
listening. We can now say that it could be a firewall issue. 

Here is my testing:
C:\>netstat -na|find "445"
 TCP    0.0.0.0:445            0.0.0.0:0              LISTENING 

JUST MY 2cents..... 

Thomas.Schweikle at fiducia.de writes: 

> Hi, 
> 
> 
>> Thomas.Schweikle at fiducia.de wrote: 
>>> I am trying to check if the terminal services are running on a 
>>> Windows 2000 sever. I am using the command:  
>>> 
>>> /usr/lib/nagios/plugins/check_nt -H xcnlm04s.fag.fiducia.de -p 1248 
>>> -v SERVICESTATE -d SHOWALL -l TermService Connection refused by host  
>>> 
>>> But this is answered with "Connection refused". What do I have to do 
>>> to make it work? 
>>
>> Presuming you are using NS client, I would setup a checkcommand as 
> follows : 
>> # 'check_nt_service' command definition 
>> define command{ 
>>        command_name    check_nt_service 
>>        command_line    $USER1$/check_nt -H $HOSTADDRESS$ -p 1248 -v 
> SERVICESTATE -l $ARG1$ 
>>        }  
>>
>> Then you service check would be something like this: 
>> # Service definition for Terminal Service Check 
>> define service{ 
>>        use                             generic-service         ; Name of 
> service template to use 
>>
>>        host_name                   host1 
>>        service_description             Terminal Service 
>>        is_volatile                     0 
>>        check_period                    24x7 
>>        max_check_attempts              3 
>>        normal_check_interval           5 
>>        retry_check_interval            1 
>>        contact_groups                  nt-admins 
>>        notification_interval           120 
>>        notification_period             24x7 
>>        notification_options            w,u,c 
>>        check_command                   check_nt_service!TermService 
>>        } 
> 
> This is a bit more universal than my setup, but does not help with the 
> error I am receiving:
> ~> /usr/lib/nagios/plugins/check_nt \
>>  -H xcnlm04s.fag.fiducia.de -p1248 \
>>  -v SERVICESTATE -l TermService
> Connection refused by host 
> 
> The Host rejects my request! So again: how do I have to set up my Host to 
> make this command work? 
> 
> -- 
> Thomas 
> 
>  
> 
> 
> -------------------------------------------------------
> The SF.Net email is sponsored by EclipseCon 2004
> Premiere Conference on Open Tools Development and Integration
> See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
> http://www.eclipsecon.org/osdn
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
> ::: Messages without supporting info will risk being sent to /dev/null
 


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list