Page 3 of 3

Re: "Cannot find file" error on host

Posted: Mon Aug 25, 2014 11:20 am
by eloyd
Dude, nice catch!

Re: "Cannot find file" error on host

Posted: Mon Aug 25, 2014 11:21 am
by logic_bomb421
emislivec wrote:
millisa wrote:I'll take a swing since I have an unhealthy relationship with perl...

The perl script has a few issues:

Code: Select all

#!usr/bin/perl
Missing leading slash there. Should probably be:

Code: Select all

#!/usr/bin/perl
This would account for the error from the log:

Code: Select all

execvp(/usr/local/nagios/libexec/ftp.pl, ...) failed. errno is 2: No such file or directory
This would happen if /usr/local/nagios/libexec/ftp.pl doesn't exist, or the interpreter given in the #! line doesn't exist.

(Edit: Also thanks for the thorough posting millisa.)
Wouldn't you know it. A missing forward slash has caused me almost a weeks worth of trouble. Thank you guys so much for all you r help with this. And thank you millisa for giving me a rundown on how to write a better Perl script. Everything seems to be working now. I greatly appreciate everyone helping here.

Re: "Cannot find file" error on host

Posted: Mon Aug 25, 2014 11:27 am
by eloyd
If nothing else, regardless of your perl knowledge gained, at least if someone else has a similar problem, your week's worth of banging your head against the screen might help them solve their problem.