Return code of 22

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
massimobalestra
Posts: 5
Joined: Mon Jun 25, 2018 12:55 pm

Return code of 22

Post by massimobalestra »

I just upgraded to Nagios Version 4.4.0 and I am receiving a lot of errors that I don't underrstand:
my nagios is running on a debian server and I compiled from source.

For the host check:
Warning: Return code of 22 for check of host '<hostname>' was out of bounds.

For the service check:
Warning: Return code of 22 for check of service <servicename>' on host 'hostname' was out of bounds.

I tried to run the check from the command line and it returns no errors and the return code is 0 (not 22).

Also it is not giving the same error on all servers: same check, different server, one returns this RC 22 and the other not (it returns 0 as it should).

I tried to restart Nagios and some of the serviced/hosts stopped failing but new ones failed.

Can anyone tell me what this return code 22 is?
I repeat if I run the same check from the command line with the same parameters from the same Nagios user, it returns error code 0.

I did not have this problem with previous versions of nagios.

Thanks
Massimo
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Return code of 22

Post by scottwilkerson »

Talking with our C dev we believ this is fixed in the main branch

Is it possible for you to download our maint branch and try with that?

https://github.com/NagiosEnterprises/na ... tree/maint
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
massimobalestra
Posts: 5
Joined: Mon Jun 25, 2018 12:55 pm

Re: Return code of 22

Post by massimobalestra »

I cloned the branch and re-run the installation.
It run smoothly without errors and then I restarted nagios

The problem is that this error was not happening always; in the moment I restarted nagios there was one service that was giving me this error.
After the restart this error was not shown anymore but few minutes after it came back for other services, different than the previous one (but the same services I had this problem before).

I noticed before that often, leaving nagios running the errors recovered by themselves. But sometimes they came back.

Unfortunately there isn't a lot in the log. Is there anything I can do to hep solve this problem?

Thank you
massimobalestra
Posts: 5
Joined: Mon Jun 25, 2018 12:55 pm

Re: Return code of 22

Post by massimobalestra »

Wait wait wait.
I did not cd into the directory nagioscore and I basically recompiled the old installation.

I just re-did everything.

I will write another post in some minutes to give you news.
massimobalestra
Posts: 5
Joined: Mon Jun 25, 2018 12:55 pm

Re: Return code of 22

Post by massimobalestra »

Immediately after the restart no error was shown.
But after some minutes the error came back.

I guess the problem is not solved. Is there any way I can be sure I run on the main branch?
The Home page still shows me Nagios® Core™ Version 4.4.0 June 19, 2018, maybe I made a mistake and I am not running the version I think I am running.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Return code of 22

Post by scottwilkerson »

4.4.1 has been released which should have a fix for this issue
https://assets.nagios.com/downloads/nag ... 4.1.tar.gz
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
massimobalestra
Posts: 5
Joined: Mon Jun 25, 2018 12:55 pm

Re: Return code of 22

Post by massimobalestra »

I am sorry, I am doing this while I do a ton of other things.
I was still not running the installation of the branch from the right directory.
Now the home page shows Vesion 4.4.1 (as it should be)
And there are no error shown.

If the errors come back I will let you know.

Thank you and sorry
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Return code of 22

Post by scottwilkerson »

Thanks!
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked