Error while running plugin
-
Justin2501
- Posts: 8
- Joined: Tue Mar 15, 2016 8:56 am
Error while running plugin
Hi Guys,
I'm currently having an issue with one of my plugins.
Nagios states the following:
(Return code of 127 is out of bounds - plugin may be missing)
On CLI the following error appears when i run "./check-cisco.pl -H xx.xx.xx.xx -C public -t fan"
: No such file or directory
Running "vi /usr/local/nagios/libexec/check-cisco.pl" opens the file.
[root@nagios libexec]# ls
centreon check_ifstatus check_rpc
check_apt check_imap check_sensors
check_breeze check_ircd check_simap
check_by_ssh check_jabber check_smtp
check_cisco.pl check_load check_snmp
Source script: https://exchange.nagios.org/directory/P ... st/details
Any ideas?
I'm currently having an issue with one of my plugins.
Nagios states the following:
(Return code of 127 is out of bounds - plugin may be missing)
On CLI the following error appears when i run "./check-cisco.pl -H xx.xx.xx.xx -C public -t fan"
: No such file or directory
Running "vi /usr/local/nagios/libexec/check-cisco.pl" opens the file.
[root@nagios libexec]# ls
centreon check_ifstatus check_rpc
check_apt check_imap check_sensors
check_breeze check_ircd check_simap
check_by_ssh check_jabber check_smtp
check_cisco.pl check_load check_snmp
Source script: https://exchange.nagios.org/directory/P ... st/details
Any ideas?
- Attachments
-
check-cisco.pl- Cisco check switch
- (13.99 KiB) Downloaded 292 times
Re: Error while running plugin
What are the permissions on the file?
Code: Select all
ls -lRob Hassing


-
Justin2501
- Posts: 8
- Joined: Tue Mar 15, 2016 8:56 am
Re: Error while running plugin
rhassing wrote:What are the permissions on the file?
Code: Select all
ls -l
Code: Select all
-rwxr-xr-x 1 nagios nagios 14327 Mar 18 11:43 check_cisco.plRe: Error while running plugin
Maybe you should try a _ instead of -On CLI the following error appears when i run "./check-cisco.pl -H xx.xx.xx.xx -C public -t fan"
: No such file or directory
Code: Select all
"./check_cisco.pl -H xx.xx.xx.xx -C public -t fan"Rob Hassing


-
Justin2501
- Posts: 8
- Joined: Tue Mar 15, 2016 8:56 am
Re: Error while running plugin
Tried both, because i added them with - and _rhassing wrote:Maybe you should try a _ instead of -On CLI the following error appears when i run "./check-cisco.pl -H xx.xx.xx.xx -C public -t fan"
: No such file or directory
Code: Select all
"./check_cisco.pl -H xx.xx.xx.xx -C public -t fan"
Original is -
Still not working
-
Justin2501
- Posts: 8
- Joined: Tue Mar 15, 2016 8:56 am
Re: Error while running plugin
Both check-cisco.pl and check_cisco.pl are giving me the error ": No such file or directory" after pressing enter.rhassing wrote:And on the command line?
Seems like it's referring to a folder, which does not exist.
Re: Error while running plugin
Maybe you could try running the script without any arguments?
or
Or if that fails try:
or
And post that output
Code: Select all
/usr/local/nagios/libexec/check-cisco.plCode: Select all
/usr/local/nagios/libexec/check_cisco.plCode: Select all
strace /usr/local/nagios/libexec/check-cisco.plCode: Select all
strace /usr/local/nagios/libexec/check_cisco.plRob Hassing


-
Justin2501
- Posts: 8
- Joined: Tue Mar 15, 2016 8:56 am
Re: Error while running plugin
Run the command:rhassing wrote:Maybe you could try running the script without any arguments?orCode: Select all
/usr/local/nagios/libexec/check-cisco.plOr if that fails try:Code: Select all
/usr/local/nagios/libexec/check_cisco.plorCode: Select all
strace /usr/local/nagios/libexec/check-cisco.plAnd post that outputCode: Select all
strace /usr/local/nagios/libexec/check_cisco.pl
Code: Select all
[root@nagios libexec]# strace /usr/local/nagios/libexec/check-cisco.pl
execve("/usr/local/nagios/libexec/check-cisco.pl", ["/usr/local/nagios/libexec/check-"...], [/* 26 vars */]) = 0
brk(0) = 0x12e7000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f265737b000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=31994, ...}) = 0
mmap(NULL, 31994, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f2657373000
close(3) = 0
open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \34\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=2107816, ...}) = 0
mmap(NULL, 3932736, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f2656d9a000
mprotect(0x7f2656f50000, 2097152, PROT_NONE) = 0
mmap(0x7f2657150000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b6000) = 0x7f2657150000
mmap(0x7f2657156000, 16960, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f2657156000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2657372000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2657370000
arch_prctl(ARCH_SET_FS, 0x7f2657370740) = 0
mprotect(0x7f2657150000, 16384, PROT_READ) = 0
mprotect(0x605000, 4096, PROT_READ) = 0
mprotect(0x7f265737c000, 4096, PROT_READ) = 0
munmap(0x7f2657373000, 31994) = 0
brk(0) = 0x12e7000
brk(0x1308000) = 0x1308000
brk(0) = 0x1308000
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=106065056, ...}) = 0
mmap(NULL, 106065056, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f2650873000
close(3) = 0
execve("/root/perl5/bin/perl\r", ["perl\r", "/usr/local/nagios/libexec/check-"...], [/* 26 vars */]) = -1 ENOENT (No such file or directory)
execve("/usr/local/sbin/perl\r", ["perl\r", "/usr/local/nagios/libexec/check-"...], [/* 26 vars */]) = -1 ENOENT (No such file or directory)
execve("/usr/local/bin/perl\r", ["perl\r", "/usr/local/nagios/libexec/check-"...], [/* 26 vars */]) = -1 ENOENT (No such file or directory)
execve("/usr/sbin/perl\r", ["perl\r", "/usr/local/nagios/libexec/check-"...], [/* 26 vars */]) = -1 ENOENT (No such file or directory)
execve("/usr/bin/perl\r", ["perl\r", "/usr/local/nagios/libexec/check-"...], [/* 26 vars */]) = -1 ENOENT (No such file or directory)
execve("/root/bin/perl\r", ["perl\r", "/usr/local/nagios/libexec/check-"...], [/* 26 vars */]) = -1 ENOENT (No such file or directory)
write(2, "/usr/bin/env: ", 14/usr/bin/env: ) = 14
) = 5l
open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2502, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f265737a000
read(3, "# Locale name alias data base.\n#"..., 4096) = 2502
read(3, "", 4096) = 0
close(3) = 0
munmap(0x7f265737a000, 4096) = 0
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, ": No such file or directory", 27: No such file or directory) = 27
write(2, "\n", 1
) = 1
close(1) = 0
close(2) = 0
exit_group(127) = ?
+++ exited with 127 +++
Re: Error while running plugin
Can you run the following on your Nagios server and post the output?
Code: Select all
ls -l /usr/local/nagios/libexec/
which env
perl -VBe sure to check out our Knowledgebase for helpful articles and solutions!