check_nrpe port 5666: Connection refused

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Frédéric GRANAT
Posts: 445
Joined: Mon Nov 19, 2012 11:36 am

check_nrpe port 5666: Connection refused

Post by Frédéric GRANAT »

Hi,
I installed the nsclient++ (NSCP-0.5.0.62-x64) on a host (windows server) I want to monitor.
Here's my problem when I run check_nrpe from Nagioserver

Code: Select all

[root@nagiosxi ~]# /usr/local/nagios/libexec/check_nrpe -H 172.16.12.14 -n
connect to address 172.16.12.14 port 5666: Connection refused
connect to host 172.16.12.14 port 5666: Connection refused
Port 5666 is opened on host's firewall
Please find attached the nsclient.ini

Please help me.

Frederic
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: check_nrpe port 5666: Connection refused

Post by lmiltchev »

You are passing "-n" flag to check_nrpe, basically saying "Do not use SSL"... In this case, you should change this line:

Code: Select all

use SSL = 1 
to this:

Code: Select all

use SSL = 0
in the nsclient.ini, and restart NSClient++ service.

Let us know if this helped.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Frédéric GRANAT
Posts: 445
Joined: Mon Nov 19, 2012 11:36 am

Re: check_nrpe port 5666: Connection refused

Post by Frédéric GRANAT »

Hi,
Thanks, but sorry, that doesn't solve my problem.
/usr/local/nagios/libexec/check_nrpe -H 172.16.12.14 -n or not gives the same error

Frederic
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: check_nrpe port 5666: Connection refused

Post by tgriep »

I took a look as the nsclient.ini file and it looks like the the Windows server had an older version of the NSClient and then the newer one was installed over it.
Well, it looks like the upgrade corrupted the settings in nsclient.ini file.
I suggest uninstalling the NSClient++ agent from the server and deleting the files leftover in the following folder.

Code: Select all

C:\Program Files\NSClient++
Then reinstall the NSCLient++ agent by following these instructions.
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
When you do reinstall it, you will have to check the box next to the "Enable NRPE server" option so it will enable it on the server.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Frédéric GRANAT
Posts: 445
Joined: Mon Nov 19, 2012 11:36 am

Re: check_nrpe port 5666: Connection refused

Post by Frédéric GRANAT »

Hi,
Thanks, I solved my problem by :
1) Uninstalling my nsclient ++
2) Install and configure nsclient++ using :
Installing-The-Windows-Agent-NSClient++-for-Nagios-XI.pdf
Enabling-the-NRPE-Listener-in-NSClient-0.4.x-for-Nagios-XI.pdf

Regards,

Frederic
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: check_nrpe port 5666: Connection refused

Post by tgriep »

That it good to hear that it is fixed now. I'll close and lock the post for you but if you have any questions in the future, feel free to open a new post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked