NRPE Unable to read output

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
shorif2000
Posts: 3
Joined: Tue Mar 04, 2014 10:18 am

NRPE Unable to read output

Post by shorif2000 »

I have centos 32 bit. 3 servers. On server a I have nagios core 4.03 installed. and NRPE v2.12. on server B, C I have installed NRPE v2.12 plugin.

when I run

Code: Select all

 /usr/local/nagios/libexec/check_nrpe -H (Server B/C)
NRPE v2.12

It runs fine, however when I try to execute a command using nrpe it works on server B but not on server C I get the error

Code: Select all

NRPE: Unable to read output
server C log file

Code: Select all

Mar  4 09:23:08 tanaga xinetd[6246]: START: nrpe pid=6403 from=::ffff:172.16.0.18
Mar  4 09:23:08 tanaga nrpe[6403]: Added command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10
Mar  4 09:23:08 tanaga nrpe[6403]: Added command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20
Mar  4 09:23:08 tanaga nrpe[6403]: Added command[check_hda1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/hda1
Mar  4 09:23:08 tanaga nrpe[6403]: Added command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s Z
Mar  4 09:23:08 tanaga nrpe[6403]: Added command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 150 -c 200
Mar  4 09:23:08 tanaga nrpe[6403]: Added command[check_new_devices]=/usr/local/nagios/libexec/check_new_devices -t 600
Mar  4 09:23:08 tanaga nrpe[6403]: Handling the connection...
Mar  4 09:23:08 tanaga nrpe[6403]: Host is asking for command 'check_new_devices' to be run...
Mar  4 09:23:08 tanaga nrpe[6403]: Running command: /usr/local/nagios/libexec/check_new_devices -t 600
Mar  4 09:23:08 tanaga nrpe[6403]: Command completed with return code 3 and output: 
Mar  4 09:23:08 tanaga nrpe[6403]: Sending response - bytes left: 27
Mar  4 09:23:08 tanaga nrpe[6403]: Return Code: 3, Output: NRPE: Unable to read output
Mar  4 09:23:08 tanaga xinetd[6246]: EXIT: nrpe status=0 pid=6403 duration=0(sec)

server a log file

Code: Select all

Mar  4 15:24:58 aurora xinetd[4094]: START: nrpe pid=4097 from=::ffff:172.16.0.18
Mar  4 15:25:37 aurora dhcpd: DHCPINFORM from 172.16.0.85 via eth0
Mar  4 15:25:37 aurora dhcpd: DHCPACK to 172.16.0.85 (78:2b:cb:9f:2f:b0) via eth0
Mar  4 15:25:43 aurora dhcpd: DHCPINFORM from 172.16.0.174 via eth0
Mar  4 15:25:43 aurora dhcpd: DHCPACK to 172.16.0.174 (d4:be:d9:18:6a:0a) via eth0
Mar  4 15:25:45 aurora xinetd[4094]: START: nrpe pid=18833 from=::ffff:172.16.0.18
Mar  4 15:26:01 aurora xinetd[4094]: EXIT: nrpe status=0 pid=4097 duration=63(sec)
Mar  4 15:26:35 aurora dhcpd: DHCPINFORM from 172.16.0.147 via eth0
Mar  4 15:26:35 aurora dhcpd: DHCPACK to 172.16.0.147 (18:03:73:2e:f3:fa) via eth0
Mar  4 15:26:45 aurora dhcpd: DHCPINFORM from 172.16.0.174 via eth0
Mar  4 15:26:45 aurora dhcpd: DHCPACK to 172.16.0.174 (d4:be:d9:18:6a:0a) via eth0
Mar  4 15:26:48 aurora xinetd[4094]: EXIT: nrpe status=0 pid=18833 duration=63(sec)
Mar  4 15:27:00 aurora dhcpd: DHCPINFORM from 172.16.0.181 via eth0
Mar  4 15:27:00 aurora dhcpd: DHCPACK to 172.16.0.181 (24:b6:fd:fa:a9:44) via eth0
Mar  4 15:27:12 aurora xinetd[4094]: START: nrpe pid=6159 from=::ffff:172.16.0.18
it runs fine
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: NRPE Unable to read output

Post by tmcdonald »

Can you post your /usr/local/nagios/etc/nrpe.cfg files from both servers B and C? And let's see the actual command you try to run that fails.

Also we will want to see the log for Server B in addition to the A and C you posted.
Former Nagios employee
shorif2000
Posts: 3
Joined: Tue Mar 04, 2014 10:18 am

Re: NRPE Unable to read output

Post by shorif2000 »

issue resolved. I was missing php-mysql, my command required it.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: NRPE Unable to read output

Post by tmcdonald »

Good to hear. I'll be locking this up now but feel free to start another thread if you have issues in the future.
Former Nagios employee
pianunix
Posts: 51
Joined: Tue Jul 22, 2014 3:08 am

Re: NRPE Unable to read output

Post by pianunix »

Hello,

i have the same problem but still didn't solve this case even when i added the php-mysql.

$ usr/lib/nagios/plugins/check_nrpe -H server43012x -c check_load
NRPE: Unable to read output

# php -m | grep mysql
PHP Warning: Module 'gd' already loaded in Unknown on line 0
mysql
mysqli


Could you please give the best solution for this ?

Thanks.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: NRPE Unable to read output

Post by slansing »

I'm going to lock this as you opened your own thread here:

http://support.nagios.com/forum/viewtop ... 350#106365
Locked