<HTML>
<HEAD>
<TITLE>NRPE: Unable to read output</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>I wrote a perl plugin that seems to work fine when I run it locally on the remote host as the nagios user, however when I try to execute it via NRPE I get the old familiar nebulous “NRPE: Unable to read output”. I have debugging on for NRPE logging and it doesn’t tell much more. (Note this is in reverse order is it is out of splunk. IPs are obfuscated)<BR>
<BR>
Sep  3 19:27:01 sjvp00dbs001.XX.com Sep  3 19:27:01 nrpe[12434]: [ID 903583 daemon.debug] Connection from X.X.X.X closed.<BR>
host=sjvp00dbs001.XX.com Options sourcetype=syslog Options source=udp:514 Options<BR>
589/3/09 7:27:01.000 PM<BR>
Sep  3 19:27:01 sjvp00dbs001.XX.com Sep  3 19:27:01 nrpe[12434]: [ID 869297 daemon.debug] Return Code: 1, Output: NRPE: Unable to read output<BR>
host=sjvp00dbs001.XX.com Options sourcetype=syslog Options source=udp:514 Options<BR>
599/3/09 7:27:01.000 PM<BR>
Sep  3 19:27:01 sjvp00dbs001.XX.com Sep  3 19:27:01 nrpe[12434]: [ID 757686 daemon.debug] Command completed with return code 1 and output: <BR>
host=sjvp00dbs001.XX.com Options sourcetype=syslog Options source=udp:514 Options<BR>
609/3/09 7:27:01.000 PM<BR>
Sep  3 19:27:01 sjvp00dbs001.XX.com Sep  3 19:27:01 nrpe[12434]: [ID 462736 daemon.debug] Running command: /usr/loca/nagios/libexec/check_scrub_backlog.pl -w 1000 -c 2000 -u XXXX -p XXXX -i XXXX<BR>
Sep  3 19:27:01 sjvp00dbs001.XX.com Sep  3 19:27:01 nrpe[12434]: [ID 881351 daemon.debug] Host is asking for command 'check_scrub_backlog' to be run...<BR>
host=sjvp00dbs001.XX.com Options sourcetype=syslog Options source=udp:514 Options<BR>
629/3/09 7:27:01.000 PM<BR>
Sep  3 19:27:01 sjvp00dbs001.XX.com Sep  3 19:27:01 nrpe[12434]: [ID 385967 daemon.debug] Host address is in allowed_hosts<BR>
host=sjvp00dbs001.XX.com Options sourcetype=syslog Options source=udp:514 Options<BR>
639/3/09 7:27:01.000 PM<BR>
Sep  3 19:27:01 sjvp00dbs001.XX.com Sep  3 19:27:01 nrpe[12434]: [ID 654915 daemon.debug] Connection from X.X.X.X port 34549<BR>
host=sjvp00dbs001.XX.com Options sourcetype=syslog Options source=udp:514 Options<BR>
649/3/09 7:27:01.000 PM<BR>
Sep  3 19:27:01 sjvp00dbs001.XX.com Sep  3 19:27:01 nrpe[12434]: [ID 879649 daemon.debug] Handling the connection...<BR>
<BR>
The command that is trying to run looks corrected- arguments are being sent correctly. I have tested the command using the same user that NRPE is running as, nagios. I did build in output for error messages in case there were problems like issues with ENV, but obviously they are not making it to NRPE. I confirmed my output text has EOLs. What is especially weird is that the return code makes it back correctly but the output is just “NRPE: Unable to read output” even as logged by nrpe.<BR>
<BR>
The output should look like this, which is what it gets locally when ran:<BR>
Scrub Backlog Count: 1083<BR>
<BR>
Nothing unusually with that, right?<BR>
<BR>
Any help appreciated, thanks.<BR>
<BR>
<BR>
<BR>
Does anyone have any other suggestions on how I might debug this? Since NRPE is working for all my other plugins</SPAN></FONT>
</BODY>
</HTML>