Return code of 127 is out of bounds. Check if plugin exists

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
gsmith
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: Return code of 127 is out of bounds. Check if plugin exi

Post by gsmith »

Once in awhile we run into issues if a plugin is written for Python2 and someone is running Python3
but we are able to deal with it on a case by case basis.

on the nagiosxi server run:

Code: Select all

which python
If it comes back with a filepath then:

Code: Select all

ls -l <filepath>
we may have to create a symbolic link from one of your installs to /usr/bin/python
scpeterson
Posts: 7
Joined: Tue May 25, 2021 3:20 pm

Re: Return code of 127 is out of bounds. Check if plugin exi

Post by scpeterson »

which python
/usr/bin/which: no python in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin)

Looks like I need to add a link to one of the versions of python then?
gsmith
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: Return code of 127 is out of bounds. Check if plugin exi

Post by gsmith »

Exactly.

Do a:

Code: Select all

ln -s /blah/blah/blah/python  /usr/bin/python
Use the python2 version please.

Thanks
scpeterson
Posts: 7
Joined: Tue May 25, 2021 3:20 pm

Re: Return code of 127 is out of bounds. Check if plugin exi

Post by scpeterson »

That fixed my issue. I ran the command

Code: Select all

ln -s /usr/bin/python2.7 /usr/bin/python
as root, and everything started working again.
Thanks much for your help.
Locked