[SOLVED] CHECK_NRPE: Error receiving data from daemon.
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hi everyone ,
I have set up Nagios, Nagios Plugins, and nrpe. I have the nrpe running through xinetd.
When I run /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1 ( am just in the local )
and I get the error
CHECK_NRPE: Error receiving data from daemon
this is my xined.d/nrpe
service nrpe
{
flags=REUSE
socket_type=stream
port= 5666
wait=no
user=nagios
group=nagios
server=/usr/local/nagios/bin/nrpe
server_args=-n -c /usr/local/nagios/etc/nrpe.cfg -i
log_on_failure+=USERID
disable=no
only_from=127.0.0.1
}
i think there is a problem with the permissions but i already changed them with theses commands
chmod 664 /usr/local/nagios/nrpe.cfg
chown nagios.nagios /usr/local/nagios/nrpe.cfg
I have no idea what is wrong with this, is there any one that can help me out here pleaaaaze ?? someone get me out of this problem plz i wil bb grateful
Last edited by sarah allali; 01-18-2013 at 12:48 PM.
Please don't whine, and don't bump your own threads. You posted about TWO HOURS ago, and you're complaining about not getting an answer? All you succeeded in doing is removing your post from the zero reply list, making it LESS VISIBLE/LIKELY TO GET AN ANSWER..
@TB0ne , I alreadyy Searched everywhere and yess i did a basic search and thanx for the responce,am new to forum so i didn't know that would make it less VISIBLE ,
and For @blue_print yes My xinetd service is running and here's the output of "netstat -plan | grep 5666"
( tcp 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN
2100/xinetd )
actually i wasn't getting this msg instead it was the version of NRPE, i dont know exactly what happened so it became like this
Last edited by sarah allali; 01-18-2013 at 05:04 PM.
@TB0ne , I alreadyy Searched everywhere and yess i did a basic search and thanx for the responce,am new to forum so i didn't know that would make it less VISIBLE ,
Not only less visible, but plain rude. People VOLUNTEER here, so we don't just sit and wait for you to post a question. And that isn't just THIS forum...it's any you post on, unless you're PAYING for service.
Quote:
and For @blue_print yes My xinetd service is running and here's the output of "netstat -plan | grep 5666"
( tcp 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN
2100/xinetd )
actually i wasn't getting this msg instead it was the version of NRPE, i dont know exactly what happened so it became like this
And if you did search, did you find the two documents (with SOLUTIONS?), that I linked to? Did you read/follow them? What results did following those steps give you? Message(s)?
Post details about what you've done/tried to resolve the problem, and we can try to help you.
i feel like you'r insulting me or something i think you already said what you wanted to say so thank you and i know that this is just a service so that's why i came here,thanks for answering me. i posted my question after doing a lot of researches and folowwing a lot of tutos and ths solutions that u linked also, now i am facing diffrent probleme when i # netstat -at | grep nrpe --- it dosent give any output nothing like --tcp 0 0 *:nrpe *:* LISTEN-- and i have my xinetd running my xinetd.d/nrpe --
service nrpe
{
flags = REUSE
socket_type = stream
port = 5666
wait = no
user = nagios
group = nagios
server = /usr/local/nagios/bin/nrpe
server_args = -n -c /usr/local/nagios/nrpe.cfg -i
log_on_failure += USERID
disable = no
only_from = 127.0.0.1
}
and when I -- #/usr/local/nagios/libexec/check_nrpe -H 127.0.0.1 i receive this message : Connection refused by host
i appreciate your help
Last edited by sarah allali; 01-19-2013 at 12:38 PM.
i feel like you'r insulting me or something i think you already said what you wanted to say so thank you and i know that this is just a service so that's why i came here,thanks for answering me. i posted my question after doing a lot of researches and folowwing a lot of tutos and ths solutions that u linked also, now i am facing diffrent probleme when i # netstat -at | grep nrpe --- it dosent give any output nothing like --tcp 0 0 *:nrpe *:* LISTEN-- and i have my xinetd running my xinetd.d/nrpe --
service nrpe
{
flags = REUSE
socket_type = stream
port = 5666
wait = no
user = nagios
group = nagios
server = /usr/local/nagios/bin/nrpe
server_args = -n -c /usr/local/nagios/nrpe.cfg -i
log_on_failure += USERID
disable = no
only_from = 127.0.0.1
}
and when I -- #/usr/local/nagios/libexec/check_nrpe -H 127.0.0.1 i receive this message : Connection refused by host
i appreciate your help
Right...this is what you posted first, you've added nothing new, and still haven't told us anything about WHAT tutorials/documentation you've followed. And spell out your words, please.
If you ran the netstat command and didn't get any output, the nrpe daemon is not running. It tells you this in the documentation, and in the many how-tos you can find, and that you say you've read. http://www.kernelhardware.org/nagios...-linux-server/
Again, you're not seeing the service listening, it's not going to work, period. As we asked before, what message(s) do you see in your log files? What happens when you try to start the nrpe daemon from the command line? Have you checked your firewall??
Unless you provide DETAILS about what you've done/tried, and what messages you're seeing, there is NOTHING we can help you with, aside from saying "something's not configured correctly, go back and re-read the instructions".
i feel like you'r insulting me or something i think you already said what you wanted to say so thank you and i know that this is just a service so that's why i came here,thanks for answering me. i posted my question after doing a lot of researches and folowwing a lot of tutos and ths solutions that u linked also, now i am facing diffrent probleme when i # netstat -at | grep nrpe --- it dosent give any output nothing like --tcp 0 0 *:nrpe *:* LISTEN-- and i have my xinetd running my xinetd.d/nrpe --
service nrpe
{
flags = REUSE
socket_type = stream
port = 5666
wait = no
user = nagios
group = nagios
server = /usr/local/nagios/bin/nrpe
server_args = -n -c /usr/local/nagios/nrpe.cfg -i
log_on_failure += USERID
disable = no
only_from = 127.0.0.1
}
and when I -- #/usr/local/nagios/libexec/check_nrpe -H 127.0.0.1 i receive this message : Connection refused by host
i appreciate your help
Right...this is what you posted first, you've added nothing new, and still haven't told us anything about WHAT tutorials/documentation you've followed. And spell out your words, please.
Again, you're not seeing the service listening, it's not going to work, period. As we asked before, what message(s) do you see in your log files? What happens when you try to start the nrpe daemon from the command line? Have you checked your firewall?? Version/distro of Linux you're using? How you installed NRPE (source? Package? Online repository?)
Unless you provide DETAILS about what you've done/tried, and what messages you're seeing, there is NOTHING we can help you with, aside from saying "something's not configured correctly, go back and re-read the instructions".
Okey , i've solved that probleme, i am using DEBIAN Squeeze 6.0 i installed on my Client -nrpe-2.13 and nagios-plugins-1.4.16 using WGET from sources (http://www.nagios.org/download )and unpacked them with tar and i compiled them using for Plugins the following commands
=>./configure ,Make ,make install,and for NRPE :
#./configure --disable-ssl --enable-command-args
# make all
# make install-plugin
# make install-daemon
# make install-daemon-config
# make install-xinetd
and i added this line to /etc/services :
#
....
nrpe 5666/tcp ==> as well for xinetd.d/nrpe as shown in my first post
Now when i run netstat -at | grep nrpe it gives me "tcp 0 0 *:nrpe *:* LISTEN" so that means nrpe is listening and when i #/usr/local/nagios/libexec/check_nrpe -n -H 127.0.0.1 it returns NRPE v2.13 // til here everything is Okey
so here is my nrpe.cfg Attachment 11648 and for my Logs Attachment 11649
also i checked iptables and here is the result:Attachment 11650 that shows that i have no rules, but i dont know exactly if it is ON or no so can you help me !!
NOw When i run this command ==>/usr/local/nagios/libexec/check_nrpe -n -H 127.0.0.1 -c check_total_procs
it returns this message ==> NRPE:UNable to read output.
Okey , i've solved that probleme, i am using DEBIAN Squeeze 6.0 i installed on my Client -nrpe-2.13 and nagios-plugins-1.4.16 using WGET from sources (http://www.nagios.org/download )and unpacked them with tar and i compiled them using for Plugins the following commands
=>./configure ,Make ,make install,and for NRPE :
Ok, that gives more information...but you really should look at what's available in your online repositories first, before building from source. From what I've seen, you could have typed in "apt-get install nagios-nrpe", and that would have been all. http://packages.debian.org/source/squeeze/nagios-nrpe
Quote:
and i added this line to /etc/services:
....
nrpe 5666/tcp ==> as well for xinetd.d/nrpe as shown in my first post
Now when i run netstat -at | grep nrpe it gives me "tcp 0 0 *:nrpe *:* LISTEN" so that means nrpe is listening and when i #/usr/local/nagios/libexec/check_nrpe -n -H 127.0.0.1 it returns NRPE v2.13 // til here everything is Okey
Right...until you got the service listening, nothing was ever going to work.
Quote:
so here is my nrpe.cfg and for my Logs also i checked iptables and here is the result that shows that i have no rules, but i dont know exactly if it is ON or no so can you help me !!
Nothing to help WITH...you HAVE no IPTables rules, so iptables is very obviously not working/blocking anything.
Quote:
Now When i run this command ==>/usr/local/nagios/libexec/check_nrpe -n -H 127.0.0.1 -c check_total_procs it returns this message ==> NRPE:UNable to read output.
For the tutos that i've read/followed there is a lot but basically i followed steps of these tutorials
i hope that i provided you with enough informations
Great...did you read the part of the Nagios documentation that covers the exact error message you posted??? Did you do what it suggested????
Quote:
Originally Posted by Nagios Documentation on PAGE 17
The check_nrpe plugin returns "NRPE: Unable to read output"
This error indicates that the command that was run by the NRPE daemon did not return any character output.
This could be an indication of the following problems:
– An incorrectly defined command line in the command definition. Verify that the command definition
in your NRPE configuration file is correct.
– The plugin that is specified in the command line is malfunctioning. Run the command line manually
to make sure the plugin returns some kind of text output.
Did you make sure the command you entered is valid? Is the check_total_procs command in your path? Did you try specifying a path? Is it where nagios can find it? Have you run it from the command line to see if it was working, and if it returned valid output???
sorry for late answer , but i was really sick ( it's not like you were waiting for me,but sorry anyway )
Quote:
Did you make sure the command you entered is valid? Is the check_total_procs command in your path? Did you try specifying a path? Is it where nagios can find it? Have you run it from the command line to see if it was working, and if it returned valid output???"]Did you make sure the command you entered is valid? Is the check_total_procs command in your path? Did you try specifying a path? Is it where nagios can find it? Have you run it from the command line to see if it was working, and if it returned valid output??
the command is where nagios can find it, the path is right and everything i guess anyway
all i did was running these commands becauz i don't really know how to run it manually and so i hope what i did is right. here is what i got : Attachment 11668
i'm really a newbie so i do my best i hope you help me out i'am really really sorry for disturbing you !!
Last edited by sarah allali; 02-12-2013 at 06:34 AM.
the command is where nagios can find it, the path is right and everything i guess anyway
Don't guess...find out. Again, run the command from the command-line, and see what it returns. Be SURE you put things in the right place, and specify the full path when you call it. Do basic troubleshooting.
Quote:
all i did was running these commands becauz i don't really know how to run it manually and so i hope what i did is right. here is what i got :
If you don't know, then you AGAIN...need to read the instructions. The documentation tells you how to run/troubleshoot that command. The message you got is telling you the -w option isn't called correctly. AGAIN....read the man page/documentation on the commands you're trying to run.
???? You're trying to get check_nrpe running with check_total_procs (with NO command-line options), but you're actually running check_procs WITH options at the command line. Two different things. Which are you wanting to run? Pick one.
AGAIN...run the check_total_procs command from the command line...see what it does.
Quote:
i'm really a newbie so i do my best i hope you help me out i'am really really sorry for disturbing you !!
You're not disturbing anyone, but you DO need to start reading the documentation on your own.
What i want To run Is the First One --/usr/local/nagios/libexec/check_nrpe -n -H 127.0.0.1 -c check_total_procs - it returns the message NRPE: unable to find output so in the documentation they said "
Quote:
The check_nrpe plugin returns "NRPE: Unable to read output"
This error indicates that the command that was run by the NRPE daemon did not return any character output.
This could be an indication of the following problems:
– The plugin that is specified in the command line is malfunctioning. Run the command line manually
to make sure the plugin returns some kind of text output."
Quote:
Don't guess...find out. Again, run the command from the command-line, and see what it returns. Be SURE you put things in the right place, and specify the full path when you call it. Do basic troubleshooting.
what i was trying to do here :Attachment 11676 is running command manually wich am not sur if its right or not if it's not tell me how to run the command manually .
and i swear that i read but it's just that i don't get everything that's why i ask you to make things more cleare for me
Last edited by sarah allali; 02-12-2013 at 06:34 AM.
What i want To run Is the First One --/usr/local/nagios/libexec/check_nrpe -n -H 127.0.0.1 -c check_total_procs - it returns the message NRPE: unable to find output so in the documentation they said "
what i was trying to do here: is running command manually wich am not sur if its right or not if it's not tell me how to run the command manually . and i swear that i read but it's just that i don't get everything that's why i ask you to make things more cleare for me
Spell out your words.
And AGAIN, you're typing in two different commands...can't make that much more clear. If you want to know what the output of the check_total_procs command is, YOU HAVE TO TYPE THAT COMMAND IN. Typing in something different won't run it. AGAIN...type in "check_total_procs"....see what it returns. If it doesn't return anything, that means it won't work with check_nrpe. AGAIN, the instructions are clear:
Quote:
Originally Posted by NRPE Docs
This error indicates that the command that was run by the NRPE daemon did not return any character output
No output from command = won't work with NRPE...very simple, very plain. Run the command to find out.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.