Page 1 of 1

check_nrpe port 5666: Connection refused

Posted: Fri Jun 23, 2017 4:20 am
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

Re: check_nrpe port 5666: Connection refused

Posted: Fri Jun 23, 2017 9:48 am
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.

Re: check_nrpe port 5666: Connection refused

Posted: Fri Jun 23, 2017 9:54 am
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

Re: check_nrpe port 5666: Connection refused

Posted: Fri Jun 23, 2017 10:16 am
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.

Re: check_nrpe port 5666: Connection refused

Posted: Mon Jun 26, 2017 4:00 am
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

Re: check_nrpe port 5666: Connection refused

Posted: Mon Jun 26, 2017 9:17 am
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.