version 4.0.0: Warning: Return code of 13 for check of...

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.
Locked
User avatar
Florin Andrei
Posts: 11
Joined: Mon Aug 26, 2013 6:04 pm
Location: California
Contact:

version 4.0.0: Warning: Return code of 13 for check of...

Post by Florin Andrei »

I've built RPM packages from 4.0.0 for core, plugins and NRPE, and I've installed them on Red Hat 5. I'm using a simple test configuration with a few hosts and services. This stuff used to work on 3.x. Now I get a whole lot of:

Code: Select all

[1381794997] Warning: Return code of 13 for check of host 'foo' was out of bounds.
[1381795002] Warning: Return code of 13 for check of host 'bar' was out of bounds.
[1381795007] Warning: Return code of 13 for check of host 'baz' was out of bounds.
And same code 13 for a few select services. Funny thing is, some services work just fine.

The check_command for hosts is check-host-alive, which is then defined as:

Code: Select all

command.cfg:command[check-host-alive]=/usr/lib/nagios/plugins/check_ping -H $HOSTADDRESS$ -w 5000,100% -c 5000,100% -p 1
If I run that thing manually, either as root or as nagios, it's fine.

I know it's supposed to be a matter of permissions, I just can't figure out what exactly. I've checked file ownership, it's nagios:nagios in most places in /var used by this service:

Code: Select all

# ls -lR /var/nagios/
/var/nagios/:
total 408
drwxr-xr-x 2 nagios nagios   4096 Oct  1 15:22 archives
-rw-r--r-- 1 nagios nagios  70886 Oct 14 17:02 objects.cache
-rw-r--r-- 1 nagios nagios  70886 Oct 14 17:00 objects.precache
-rw------- 1 nagios nagios 105963 Oct 14 17:02 retention.dat
drwxr-xr-x 2 nagios apache   4096 Oct 14 17:02 rw
drwxr-xr-x 3 nagios nagios   4096 Oct 14 15:42 spool
-rw-rw-r-- 1 nagios nagios 105953 Oct 14 17:06 status.dat

/var/nagios/archives:
total 0

/var/nagios/rw:
total 8
prw-rw---- 1 nagios nagios 0 Oct 14 15:42 nagios.cmd
srw-rw---- 1 nagios nagios 0 Oct 14 17:02 nagios.qh

/var/nagios/spool:
total 8
drwxr-xr-x 2 nagios nagios 4096 Oct 14 17:02 checkresults

/var/nagios/spool/checkresults:
total 0




# ls -lR /var/log/nagios/
/var/log/nagios/:
total 128
drwxr-xr-x 2 nagios nagios   4096 Oct  1 15:22 archives
-rw-r--r-- 1 nagios nagios 113319 Oct 14 17:06 nagios.log

/var/log/nagios/archives:
total 0




# ps axu | grep nagios
nagios   22521  0.2  0.0  22328  1452 ?        S<s  17:10   0:00 /usr/bin/nagios -ud /etc/nagios/nagios.cfg
nagios   22522  0.0  0.0   9708   776 ?        S<   17:10   0:00 /usr/bin/nagios --worker /var/nagios/rw/nagios.qh
nagios   22523  0.0  0.0   9196   692 ?        S<   17:10   0:00 /usr/bin/nagios --worker /var/nagios/rw/nagios.qh
nagios   22524  0.0  0.0   9192   688 ?        S<   17:10   0:00 /usr/bin/nagios --worker /var/nagios/rw/nagios.qh
nagios   22525  0.0  0.0   9196   688 ?        S<   17:10   0:00 /usr/bin/nagios --worker /var/nagios/rw/nagios.qh
nagios   22526  0.0  0.0   9192   688 ?        S<   17:10   0:00 /usr/bin/nagios --worker /var/nagios/rw/nagios.qh
nagios   22527  0.0  0.0   9192   688 ?        S<   17:10   0:00 /usr/bin/nagios --worker /var/nagios/rw/nagios.qh
nagios   22528  0.0  0.0   9192   688 ?        S<   17:10   0:00 /usr/bin/nagios --worker /var/nagios/rw/nagios.qh
nagios   22529  0.0  0.0   9192   688 ?        S<   17:10   0:00 /usr/bin/nagios --worker /var/nagios/rw/nagios.qh
nagios   22530  0.0  0.0   9192   688 ?        S<   17:10   0:00 /usr/bin/nagios --worker /var/nagios/rw/nagios.qh
nagios   22532  0.0  0.0   9192   688 ?        S<   17:10   0:00 /usr/bin/nagios --worker /var/nagios/rw/nagios.qh
nagios   22533  0.0  0.0   9192   684 ?        S<   17:10   0:00 /usr/bin/nagios --worker /var/nagios/rw/nagios.qh
nagios   22534  0.0  0.0   9196   692 ?        S<   17:10   0:00 /usr/bin/nagios --worker /var/nagios/rw/nagios.qh
nagios   22535  0.0  0.0  21688   708 ?        S<   17:10   0:00 /usr/bin/nagios -ud /etc/nagios/nagios.cfg
SELinux is set to "permissive".

Any tips or clues? I've looked everywhere, I'm stumped.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: version 4.0.0: Warning: Return code of 13 for check of..

Post by slansing »

What version of the plugins package did you install along side 4.0?
User avatar
Florin Andrei
Posts: 11
Joined: Mon Aug 26, 2013 6:04 pm
Location: California
Contact:

Re: version 4.0.0: Warning: Return code of 13 for check of..

Post by Florin Andrei »

Code: Select all

# rpm -qa | grep -e nagios -e nrpe
nagios-4.0.0-2
nagios-plugins-1.4.16-1
nrpe-plugin-2.15-1
nagios-contrib-4.0.0-2
User avatar
Florin Andrei
Posts: 11
Joined: Mon Aug 26, 2013 6:04 pm
Location: California
Contact:

Re: version 4.0.0: Warning: Return code of 13 for check of..

Post by Florin Andrei »

After quite a bit of difficulties (spec file is broken, there are many things not right about the whole package compiling here), I've managed to build an RPM package out of nagios-plugins-1.5. I've upgraded that package on the test server, restarted the nagios service, and I'm getting the same errors.

"Warning: Return code of 13 for check of host..."

Any suggestions would be appreciated.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: version 4.0.0: Warning: Return code of 13 for check of..

Post by slansing »

Is this error only occurring on "check_ping" checks?
User avatar
Florin Andrei
Posts: 11
Joined: Mon Aug 26, 2013 6:04 pm
Location: California
Contact:

Re: version 4.0.0: Warning: Return code of 13 for check of..

Post by Florin Andrei »

No, it's multiple plugins.

Meanwhile, I think I've found the problem. The spec files for the RPM packages, contained in the tarballs, are woefully out of date, and incompatible between nagios, nagios-plugins, and nrpe-plugin. Also, there are things such as 644 permissions on directories, etc. It's ugly.

I'll fix the specs and open a new thread, detailing my findings and the fixes. I'll link it here.

EDIT: Okay, I have what seem to be clean specs that build compatible packages. I'm a little busy now (Tue Oct 22 17:44:49 PDT 2013). I'll make a note to post my findings tomorrow.

EDIT2: I've posted all of my findings here:

http://support.nagios.com/forum/viewtop ... =7&t=21809

Feel free to close this old topic, the new topic is much more extensive and also contains fixes.
Last edited by Florin Andrei on Wed Oct 23, 2013 3:03 pm, edited 2 times in total.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: version 4.0.0: Warning: Return code of 13 for check of..

Post by abrist »

Great, we will leave the thread open awaiting your final post.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked