The NRPE Demon is running under the Local System account - all my previous DB scripts have worked fine, so not sure why this one is any different...
Not sure of any ways of explicitly testing it under the Local System account... Cheers Gavin -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: 28 April 2008 15:50 To: Gavin Williams Cc: [email protected] Subject: Re: [Nagios-users] Strange NRPE Problem... Does it work locally if you run it as the same user as the NRPE daemon is running? On 4/28/08, Gavin Williams <[EMAIL PROTECTED]> wrote: > Hi there, > > > > I'm having some strange NRPE behaviour. > > I've written a Perl script that runs a load of checks on our systems, > but the ones that are causing the problem are any checks that want to > connect to Oracle via DBI. > > > > The error it's giving me is: > > DBI connect('','',...) failed: ORA-12560: TNS:protocol adapter error > (DBD ERROR: OCIServerAttach) at nagios_checks.pl line 82 > > > > Now this command works fine if I run it locally on the server, however > when using NRPE it throws the above error. > > > > The lines in question in my script look like this: > > sub dbConnect > > { > > my $dbh; > > eval > > { > > $dbh = > DBI->connect("dbi:Oracle:$database","$username","$password",{ RaiseError > => 1, AutoCommit => 0, PrintError => 0}) > > || die "failed to connect to $database\n"; > > }; > > if ($@) > > { > > my $msg .= [EMAIL PROTECTED]"\n"; > > die "$msg\n"; > > } > > > > return $dbh; > > } > > The username, password and database get loaded in from a XML Config > file... But it all works locally??? > > > > Any ideas? > > > > Cheers > > Gavin > > > ________________________________________________________________________ > Please consider the environment - do you really need to print this email? > ________________________________________________________________________ > This email has been scanned for all viruses by the MessageLabs Email > Security System - http://www.messagelabs.com. > ________________________________________________________________________ ________________________________________________________________________ Please consider the environment - do you really need to print this email? ________________________________________________________________________ This email has been scanned for all viruses by the MessageLabs Email Security System - http://www.messagelabs.com. ________________________________________________________________________ ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Nagios-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
