Page 2 of 2
Re: Return code of 255 is out of bounds
Posted: Thu Sep 06, 2018 12:54 am
by RIDS_I2MP
Hello,
The "working" services using below command:
Check command name: check_xi_service_nsclient
Command view: $USER1$/check_nt -H $HOSTADDRESS$ -u -t 60 -s "$ARG1$" -p 12489 -v $ARG2$ $ARG3$ $ARG4$
So, from command view we can see that they are using check_nt.
I have done the changes suggested by you in NSC.ini file and restarted nsclient++ service, but getting the same error.
Also, ran below commands in Nagios XI server:
/usr/local/nagios/libexec/check_nrpe -H 10.144.223.155
/usr/local/nagios/libexec/check_nrpe -H 10.144.223.155 -c alias_cpu
/usr/local/nagios/libexec/check_nrpe -H 10.144.223.155 -c alias_mem
/usr/local/nagios/libexec/check_nrpe -H 10.144.223.155 -c CheckMEM -a MaxWarn=90% MaxCrit=95% ShowAll type=physical
I got this output in all four commands :
CHECK_NRPE: Error - Could not complete SSL handshake.
I am attaching the nsclient.log and NSC.ini file here.
Thanks a lot for your continuous support

Re: Return code of 255 is out of bounds
Posted: Thu Sep 06, 2018 3:23 am
by RIDS_I2MP
Hello,
Sorry I didn't put the below command output in previous post.
[nagios@eu1papu002 ~]$ /usr/local/nagios/libexec/check_nt -H 10.151.1.90 -p 12489 -s nag1osadm1n -v CLIENTVERSION
NSClient++ 0.3.9.328 2011-08-16
[nagios@eu1papu002 ~]$
Re: Return code of 255 is out of bounds
Posted: Thu Sep 06, 2018 10:06 am
by lmiltchev
These entries *should* be enabled by default, but let's make sure of that - change these lines:
in the NSC.ini to these:
and restart the nsclient++ service.
I copied/pasted the Nagios XI server's IP instead of Windows machine IP by mistake - sorry about that. Can you run the commands below (with the corrected IP), and show the output?
Code: Select all
nmap 10.151.1.90 -p 5666
/usr/local/nagios/libexec/check_nrpe -H 10.151.1.90
/usr/local/nagios/libexec/check_nrpe -H 10.151.1.90 -c alias_cpu
/usr/local/nagios/libexec/check_nrpe -H 10.151.1.90 -c alias_mem
/usr/local/nagios/libexec/check_nrpe -H 10.151.1.90 -c CheckMEM -a MaxWarn=90% MaxCrit=95% ShowAll type=physical
Re: Return code of 255 is out of bounds
Posted: Fri Sep 07, 2018 1:13 am
by RIDS_I2MP
Hello,
I have enabled the below two parameters in NSC.ini file:
port=5666
use_ssl=1
Restarted the nsclient++ service, but still getting the same error.
Also, ran below commands in Nagios XI server:
[nagios@eu1papu002 ~]$ nmap 10.151.1.90 -p 5666
Starting Nmap 5.51 (
http://nmap.org ) at 2018-09-07 06:59 BST
Nmap scan report for 10.151.1.90
Host is up (0.025s latency).
PORT STATE SERVICE
5666/tcp filtered nrpe
Nmap done: 1 IP address (1 host up) scanned in 0.28 seconds
[nagios@eu1papu002 ~]$
For the remaining commands, i got below output:
CHECK_NRPE: Socket timeout after 10 seconds.
Re: Return code of 255 is out of bounds
Posted: Fri Sep 07, 2018 8:32 am
by lmiltchev
[nagios@eu1papu002 ~]$ nmap 10.151.1.90 -p 5666
Starting Nmap 5.51 (
http://nmap.org ) at 2018-09-07 06:59 BST
Nmap scan report for 10.151.1.90
Host is up (0.025s latency).
PORT STATE SERVICE
5666/tcp filtered nrpe
This usually means that there is a firewall that blocks port 5666. What you should be seeing is this:
[root@main-nagios-xi ~]# nmap x.x.x.x -p 5666
Starting Nmap 6.47 (
http://nmap.org ) at 2018-09-07 08:29 CDT
Nmap scan report for x.x.x.x
Host is up (0.00083s latency).
PORT STATE SERVICE
5666/tcp open nrpe
Ask your system administrator to open this port, and test your check again.
Re: Return code of 255 is out of bounds
Posted: Mon Sep 10, 2018 12:56 am
by RIDS_I2MP
Hello,
Thanks for the help!!
I will check with the owner of the server regarding the port issue and will get back to you.
If the problem is because of the 5666 port, then how other services are running fine on that server?
Is it because the other services are using check_nt and this particular service is using check_nrpe?
Does port 5666 is required only for nrpe?
I would be really thankful if you could answer these queries.
Re: Return code of 255 is out of bounds
Posted: Mon Sep 10, 2018 9:07 am
by lmiltchev
Only check_nrpe uses port 5666, check_nt uses port 12489. Let us know if opening port 5666 fixes your issue. Thank you!
Re: Return code of 255 is out of bounds
Posted: Tue Sep 11, 2018 12:07 am
by RIDS_I2MP
Hello,
I am working with server owner for opening port 5666, it might take a couple of days.
I will update you with the outcome once its done. Thank you!!
Re: Return code of 255 is out of bounds
Posted: Tue Sep 11, 2018 8:51 am
by lmiltchev
Sure, let us know how it went. We will keep the topic open for now.