LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 01-18-2013, 10:58 AM   #1
sarah allali
LQ Newbie
 
Registered: Jan 2013
Location: Morocco
Distribution: Debian , ubunto
Posts: 15

Rep: Reputation: Disabled
Unhappy CHECK_NRPE: Error receiving data from daemon.


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.
 
Old 01-18-2013, 12:46 PM   #2
sarah allali
LQ Newbie
 
Registered: Jan 2013
Location: Morocco
Distribution: Debian , ubunto
Posts: 15

Original Poster
Rep: Reputation: Disabled
Pleeeeazz Can someone help am really stuck heeree
 
Old 01-18-2013, 01:47 PM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by sarah allali View Post
Pleeeeazz Can someone help am really stuck heeree
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..

If you're in such a hurry, did you try looking this up? Doing a basic search?
http://www.linuxquestions.org/questi...daemon-811699/
http://www.opsview.com/forum/opsview...ving-data-daem

Section 10.2.6:
http://docs.icinga.org/latest/en/nrpe.html
 
Old 01-18-2013, 03:27 PM   #4
blue_print
Member
 
Registered: May 2010
Location: In world
Distribution: RHEL, CentOS, Ubuntu
Posts: 275
Blog Entries: 3

Rep: Reputation: 50
Is xinetd service running on the system? Plese give the output of

netstat -plan | grep 5666

If not, try restarting xinetd

/etc/init.d/xinetd restart
 
Old 01-18-2013, 04:46 PM   #5
sarah allali
LQ Newbie
 
Registered: Jan 2013
Location: Morocco
Distribution: Debian , ubunto
Posts: 15

Original Poster
Rep: Reputation: Disabled
@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.
 
Old 01-19-2013, 10:05 AM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by sarah allali View Post
@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.
 
Old 01-19-2013, 12:18 PM   #7
sarah allali
LQ Newbie
 
Registered: Jan 2013
Location: Morocco
Distribution: Debian , ubunto
Posts: 15

Original Poster
Rep: Reputation: Disabled
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.
 
Old 01-19-2013, 04:59 PM   #8
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by sarah allali View Post
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".
 
Old 01-19-2013, 05:01 PM   #9
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by sarah allali View Post
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/
http://www.ehowstuff.com/how-to-inst...e-nagios-nrpe/
http://exchange.nagios.org/directory...ecutor/details
http://people.virginia.edu/~rtg2t/sa...e.install.html

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".
 
1 members found this post helpful.
Old 01-19-2013, 05:41 PM   #10
sarah allali
LQ Newbie
 
Registered: Jan 2013
Location: Morocco
Distribution: Debian , ubunto
Posts: 15

Original Poster
Rep: Reputation: Disabled
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.

For the tutos that i've read/followed there is a lot but basically i followed steps of these tutorials :> http://djibril.developpez.com/tutori...pour-debutant/
http://blog.lolo.org/?p=11 and the Official NRPE Documentation https://docs.google.com/viewer?a=v&q...6mkFSuL10SjJBg

i hope that i provided you with enough informations

Last edited by sarah allali; 02-12-2013 at 06:34 AM.
 
Old 01-20-2013, 09:25 AM   #11
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by sarah allali View Post
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???

Please, follow the documentation.

Last edited by TB0ne; 01-20-2013 at 09:27 AM.
 
Old 01-21-2013, 05:36 PM   #12
sarah allali
LQ Newbie
 
Registered: Jan 2013
Location: Morocco
Distribution: Debian , ubunto
Posts: 15

Original Poster
Rep: Reputation: Disabled
Unhappy

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.
 
Old 01-22-2013, 09:14 AM   #13
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by sarah allali View Post
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 first said you're trying to run this:
Quote:
Originally Posted by sarah allali
/usr/local/nagios/libexec/check_nrpe -n -H 127.0.0.1 -c check_total_procs
..then you post that you actually ran this:
Quote:
Originally Posted by sarah allali
/usr/local/nagios/libexec/check_procs -w 150 -c 200
???? 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.
 
Old 01-22-2013, 09:28 AM   #14
sarah allali
LQ Newbie
 
Registered: Jan 2013
Location: Morocco
Distribution: Debian , ubunto
Posts: 15

Original Poster
Rep: Reputation: Disabled
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.
 
Old 01-22-2013, 10:11 AM   #15
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by sarah allali View Post
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.
 
1 members found this post helpful.
  


Reply

Tags
nrpe



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Nagios: CHECK_NRPE: Error - Could not complete SSL handshake jonaskellens Linux - Newbie 8 08-23-2014 01:56 PM
CHECK_NRPE: Error - Could not complete SSL handshake glennbtn Linux - Software 1 04-10-2012 07:52 AM
check_nrpe -H remotehost - error Connection refused by host Storii Linux - Software 1 11-15-2011 02:56 AM
[SOLVED] [NAGIOS] can't find check_nrpe after 'yum install check_nrpe' di11rod Linux - Software 4 06-29-2011 01:52 PM
[SOLVED] CHECK_NRPE: Error receiving data from daemon. edwardcode Linux - Software 15 06-03-2010 07:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration