Return code of 255 is out of bounds

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Re: Return code of 255 is out of bounds

Post 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 :)
You do not have the required permissions to view the files attached to this post.
Thanks & Regards,
I2MP Team.
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Re: Return code of 255 is out of bounds

Post 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 ~]$
Thanks & Regards,
I2MP Team.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Return code of 255 is out of bounds

Post by lmiltchev »

These entries *should* be enabled by default, but let's make sure of that - change these lines:

Code: Select all

;port=5666
;use_ssl=1
in the NSC.ini to these:

Code: Select all

port=5666
use_ssl=1
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
Be sure to check out our Knowledgebase for helpful articles and solutions!
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Re: Return code of 255 is out of bounds

Post 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. :cry:

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.
You do not have the required permissions to view the files attached to this post.
Thanks & Regards,
I2MP Team.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Return code of 255 is out of bounds

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Re: Return code of 255 is out of bounds

Post 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.
Thanks & Regards,
I2MP Team.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Return code of 255 is out of bounds

Post 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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Re: Return code of 255 is out of bounds

Post 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!!
Thanks & Regards,
I2MP Team.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Return code of 255 is out of bounds

Post by lmiltchev »

Sure, let us know how it went. We will keep the topic open for now.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked