Page 1 of 1

Return code of 22

Posted: Mon Jun 25, 2018 1:07 pm
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

Re: Return code of 22

Posted: Mon Jun 25, 2018 1:46 pm
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

Re: Return code of 22

Posted: Mon Jun 25, 2018 3:40 pm
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

Re: Return code of 22

Posted: Mon Jun 25, 2018 3:52 pm
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.

Re: Return code of 22

Posted: Mon Jun 25, 2018 4:06 pm
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.

Re: Return code of 22

Posted: Mon Jun 25, 2018 4:39 pm
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

Re: Return code of 22

Posted: Mon Jun 25, 2018 4:48 pm
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

Re: Return code of 22

Posted: Mon Jun 25, 2018 4:55 pm
by scottwilkerson
Thanks!