Page 1 of 5

returned an invaled return code 255

Posted: Thu Apr 30, 2015 11:43 am
by ariarlet
Hello


The result on Nagios is:
The command (check_log3) returned an invaled return code: 255

In the check_log3 decribe:

If the code returns non-zero, it is counted towards the alerts threshold

In the others server 0 problems

Why whappens?


ty

Re: returned an invaled return code 255

Posted: Thu Apr 30, 2015 12:03 pm
by jolson
What exactly are you trying to check? Is this an NRPE check to see whether or not the logstash service is running - or is this an alert threshold check that you set up through the Nagios Log Server monitoring wizard?

Re: returned an invaled return code 255

Posted: Mon May 04, 2015 11:54 am
by ariarlet
I'm checking error logs remotely.

Re: returned an invaled return code 255

Posted: Mon May 04, 2015 11:56 am
by jolson
What command are you using to check these error logs?

Are you using Nagios Core or Nagios XI?

Re: returned an invaled return code 255

Posted: Tue May 05, 2015 9:57 am
by ariarlet
yes the error logs


but the others servers this run while in other servers not run

Re: returned an invaled return code 255

Posted: Tue May 05, 2015 1:38 pm
by tgriep
Could you post how the command is run on a server that passes and on the one that fails?

Re: returned an invaled return code 255

Posted: Wed May 06, 2015 9:16 am
by ariarlet
In console nagios
./check_nrpe -H [HOST] -p 5666 -c check_log3

result:
The command (check_log3) returned and invalid return code:255


nsclient.ini:
check_log3 = [PATH]\check_log3.pl -p "unable to extend table by" -l [Path]prueba.log -c 1

Re: returned an invaled return code 255

Posted: Wed May 06, 2015 9:46 am
by jolson
What you should do here is open NSClient in test mode and re-run the check_nrpe command.

To start NSClient in test mode, you will need to stop it first. How to do so will depend on the version of NSClient installed. For the newest version:

Code: Select all

*start command prompt as admin*
cd [PATH TO NSClient]
net stop nscp
nscp.exe test
When testing mode has been initialized, run your check_nrpe command from Nagios:

Code: Select all

./check_nrpe -H [HOST] -p 5666 -c check_log3
Do you see any errors?

Re: returned an invaled return code 255

Posted: Thu May 07, 2015 11:51 am
by ariarlet
If i run server local


the result is:

D:\Strawberry\perl\bin>.\perl.exe check_log3.pl -p "unable to extend table by" -l D:\oracle\product\10.2.0\admin\ENETVAE\bdump\alert_enetvae.log -c 1
Use of :unique is deprecated at D:\oracle\product\10.2.0\db_1\perl\5.8.3\lib/MSWin32-x86-multi-thread/Config.pm line 39.
Use of :unique is deprecated at D:\oracle\product\10.2.0\db_1\perl\5.8.3\lib/MSWin32-x86-multi-thread/Config.pm line 80.
Perl lib version (v5.8.3) doesn't match executable version (v5.16.0) at D:\oracle\product\10.2.0\db_1\perl\5.8.3\lib/MSWin32-x86-multi-thread/Config.pm line 32.
Compilation failed in require at D:\oracle\product\10.2.0\db_1\perl\5.8.3\lib/MSWin32-x86-multi-thread/lib.pm line 6.
BEGIN failed--compilation aborted at D:\oracle\product\10.2.0\db_1\perl\5.8.3\lib/MSWin32-x86-multi-thread/lib.pm line 6.
Compilation failed in require at check_log3.pl line 240.
BEGIN failed--compilation aborted at check_log3.pl line 240.

Re: returned an invaled return code 255

Posted: Thu May 07, 2015 12:05 pm
by jolson
Please see the following thread: http://community.activestate.com/forum/ ... ility-perl
Oracle 10g ships with it's own Perl. When you install Oracle, it sets PERL5LIB to point at the Oracle Perl. This will result in ActivePerl attempting to run modules from the Oracle lib directory. Perl 5.12 and Perl 5.8 are binary incompatible.
By the looks of it, Oracle's perl is throwing the exception you see. I recommend attempting the fix described in the above link.