In nagios its showing 255 (Return code of 255 is out of bou

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
vyasdevaguddi
Posts: 21
Joined: Fri Jan 27, 2017 11:30 am

In nagios its showing 255 (Return code of 255 is out of bou

Post by vyasdevaguddi »

i have added new server in nagios and when i run service nagios restart its working good with no issue but in the nagios gui and i see this error message
Attachments
Capture.PNG
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: In nagios its showing 255 (Return code of 255 is out of

Post by dwhitfield »

Please run one of those commands from the command line. Please show us the command as you run it and any output. Also, What version of Core are you using? Was it compiled from source or installed from distro repos? On what OS/version is nagios running? cat /etc/*-release may be of use.
vyasdevaguddi
Posts: 21
Joined: Fri Jan 27, 2017 11:30 am

Re: In nagios its showing 255 (Return code of 255 is out of

Post by vyasdevaguddi »

i am running this command from the nagios cmd server

/usr/local/nagios/libexec/check_nrpe -H localhost check_tmp
connect to address 10.1X.X6.1XX port 5666: No route to host
connect to host localhost port 5666: No route to host

i am using Nagios® Core™ Version 4.1.0rc2 and using the Rhel 6.8
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: In nagios its showing 255 (Return code of 255 is out of

Post by dwhitfield »

What's the output of the following:

Code: Select all

nmap -p 5666 localhost
service xinetd status
cat /etc/xinetd.d/nrpe
find / -name nrpe.cfg | xargs cat
Perhaps there is an IPv4 vs. IPv6 issue?

Also, you should run through https://assets.nagios.com/downloads/nag ... utions.pdf. If you get stuck at any point in the document, please let us know.
vyasdevaguddi
Posts: 21
Joined: Fri Jan 27, 2017 11:30 am

Re: In nagios its showing 255 (Return code of 255 is out of

Post by vyasdevaguddi »

Here are the error message i am getting as per screen shot
Attachments
2.PNG
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: In nagios its showing 255 (Return code of 255 is out of

Post by dwhitfield »

So, we have progress!

Did you look at Section V. CHECK_NRPE: Received 0 Bytes From Daemon. Check The Remote Server Logs For Error Messages, starting on page 6 of https://assets.nagios.com/downloads/nag ... utions.pdf ?

Can you attach your /usr/local/nagios/etc/nrpe.cfg ? I asked about Core, but I will about NRPE. Did you using a binary we provided or did you compile from source? If a binary, could you point us to the download? If source, could you point us to the instructions you used to compile? Thanks!
vyasdevaguddi
Posts: 21
Joined: Fri Jan 27, 2017 11:30 am

Re: In nagios its showing 255 (Return code of 255 is out of

Post by vyasdevaguddi »

# The following examples use hardcoded command arguments...

command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10
command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20
command[check_hda1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/hda1
command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 150 -c 200


# The following examples allow user-supplied arguments and can
# only be used if the NRPE daemon was compiled with support for
# command arguments *AND* the dont_blame_nrpe directive in this
# config file is set to '1'. This poses a potential security risk, so
# make sure you read the SECURITY file before doing this.

#command[check_users]=/usr/local/nagios/libexec/check_users -w $ARG1$ -c $ARG2$
#command[check_load]=/usr/local/nagios/libexec/check_load -w $ARG1$ -c $ARG2$
command[check_disk]=/usr/local/nagios/libexec/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
#command[check_procs]=/usr/local/nagios/libexec/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$
command[check_logfiles]=/usr/local/nagios/libexec/check_logfiles $ARG1$
command[check_procs]=/usr/local/nagios/libexec/check_procs
command[check_swap]=/usr/local/nagios/libexec/check_swap -w $ARG1$ -c $ARG2$
command[check_http]=/usr/local/nagios/libexec/check_http
command[check_ping]=/usr/local/nagios/libexec/check_ping
command[check_ssh]=/usr/local/nagios/libexec/check_ssh
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: In nagios its showing 255 (Return code of 255 is out of

Post by dwhitfield »

If you are concerned about security, you can PM me your /usr/local/nagios/etc/nrpe.cfg. We need to be able to see the directives to see if you have it set up correctly.

Also, in regards to NRPE did you using a binary we provided or did you compile from source? If a binary, could you point us to the download? If source, could you point us to the instructions you used to compile? If you don't know because you inherited the server, that's fine, we can work around it, but it would be really helpful information to have. Thanks!
vyasdevaguddi
Posts: 21
Joined: Fri Jan 27, 2017 11:30 am

Re: In nagios its showing 255 (Return code of 255 is out of

Post by vyasdevaguddi »

i am using NRPE which is compile from source and i have copied the /usr/local/nagios/etc/nrpe.cfg
Attachments
nrpe.txt
(8.49 KiB) Downloaded 253 times
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: In nagios its showing 255 (Return code of 255 is out of

Post by dwhitfield »

Thanks for the file. The most obvious potential issue there checks out.

What's the output of history | grep nrpe? It may be nothing, but it's worth a look.

Also, you never answered my question about Section V. CHECK_NRPE: Received 0 Bytes From Daemon. Check The Remote Server Logs For Error Messages, starting on page 6 of https://assets.nagios.com/downloads/nag ... utions.pdf. We need to know if you went through that, so we aren't just copying the same commands from that into the forum.
Locked