nagios-nrpe-server service will not stay running
nagios-nrpe-server service will not stay running
I recently started setting up Nagios at my work. I installed Nagios core 4.1.1 on a Debian 7 system to be my monitoring server and it is working great. I installed nagios-nrpe-server and nagios-plugins on the Debian hosts I want to monitor and configured nrpe.cfg to allow my monitoring host. This all seems to be working. I can see the hosts on the web interface and the default sercie checks that come with Nagios are working good. I started looking into doing some custom checks when I ran into an issue. When I run ./check_nrpe against one of my hosts, I get the response "connect to host xxx.xxx.x.xx port 5666: Connection refused". On the host servers if I run the commands "sudo service nagios-nrpe-server restart" or "sudo /etc/init.d/nagios-nrpe server restart" I get the response [ ok ] Staring nagios-nrpe: nagios-nrpe. But, if I try to see the status of the service it says "[FAIL] nagios-nrpe is not running ... failed!". I checked nrpe.pid and found that it does get updated with a new pid every time I attempt to start the service. The best way I can describe the issue is that the nrpe service starts but then immediately dies. Any help would be greatly appreciated.
Re: nagios-nrpe-server service will not stay running
How did you install NRPE? Can you post the output of this command run on the machine with NRPE.
Code: Select all
netstat -pan | grep 5666Former Nagios Employee.
me.
me.
Re: nagios-nrpe-server service will not stay running
Results of netstat - pan | grep 5666
tcp 0 0 172.16.0.10:4506 66.188.18.166:55666 ESTABLISHED -
tcp 0 0 172.16.0.10:4506 172.16.4.142:56667 ESTABLISHED -
tcp 0 0 172.16.0.10:4506 172.16.4.137:56668 ESTABLISHED -
tcp 0 0 172.16.0.10:4506 172.16.4.91:55666 ESTABLISHED -
tcp 0 0 172.16.0.10:4506 172.16.4.105:56661 ESTABLISHED -
tcp 0 0 172.16.0.10:4506 172.16.4.105:56665 ESTABLISHED -
tcp 0 0 172.16.0.10:4506 172.16.4.10:56665 ESTABLISHED -
tcp 0 0 172.16.0.10:4506 172.16.4.38:55666 ESTABLISHED -
tcp 0 0 172.16.0.10:4506 172.16.4.137:56666 ESTABLISHED -
tcp 0 0 172.16.0.10:4506 172.16.4.139:56660 ESTABLISHED -
tcp 0 0 172.16.0.10:4506 172.16.4.58:56662 ESTABLISHED -
tcp 0 0 172.16.0.10:4506 66.188.18.166:56660 ESTABLISHED -
tcp 0 0 172.16.0.10:4506 172.16.4.4:56666 ESTABLISHED -
tcp 0 0 172.16.0.10:4506 172.16.4.117:56666 ESTABLISHED -
tcp 0 0 172.16.0.10:4506 172.16.4.142:56662 ESTABLISHED -
tcp 0 0 172.16.0.10:4506 66.188.18.166:55666 ESTABLISHED -
tcp 0 0 172.16.0.10:4506 172.16.4.142:56667 ESTABLISHED -
tcp 0 0 172.16.0.10:4506 172.16.4.137:56668 ESTABLISHED -
tcp 0 0 172.16.0.10:4506 172.16.4.91:55666 ESTABLISHED -
tcp 0 0 172.16.0.10:4506 172.16.4.105:56661 ESTABLISHED -
tcp 0 0 172.16.0.10:4506 172.16.4.105:56665 ESTABLISHED -
tcp 0 0 172.16.0.10:4506 172.16.4.10:56665 ESTABLISHED -
tcp 0 0 172.16.0.10:4506 172.16.4.38:55666 ESTABLISHED -
tcp 0 0 172.16.0.10:4506 172.16.4.137:56666 ESTABLISHED -
tcp 0 0 172.16.0.10:4506 172.16.4.139:56660 ESTABLISHED -
tcp 0 0 172.16.0.10:4506 172.16.4.58:56662 ESTABLISHED -
tcp 0 0 172.16.0.10:4506 66.188.18.166:56660 ESTABLISHED -
tcp 0 0 172.16.0.10:4506 172.16.4.4:56666 ESTABLISHED -
tcp 0 0 172.16.0.10:4506 172.16.4.117:56666 ESTABLISHED -
tcp 0 0 172.16.0.10:4506 172.16.4.142:56662 ESTABLISHED -
Re: nagios-nrpe-server service will not stay running
I installed with apt-get install nagios-plugins nagios-nrpe-server.
Re: nagios-nrpe-server service will not stay running
What is the output of getenforce?
It doesn't look like your NRPE service is listening properly on the debian machine. Can you attempt to start it, then run a tail -n500 /var/log/messages | grep 'nrpe' and post the result?
It doesn't look like your NRPE service is listening properly on the debian machine. Can you attempt to start it, then run a tail -n500 /var/log/messages | grep 'nrpe' and post the result?
Former Nagios Employee
Re: nagios-nrpe-server service will not stay running
I found the issue was actually a problem with my nrpe.cfg file. Specifically the server_address line. I ended up commenting it out and the nrpe starts and continues to run correctly now. Thanks for the help.
Re: nagios-nrpe-server service will not stay running
Glad to see you were able to solve this!
I'll go ahead and close this thread out now, but feel free to open a new one if you need assistance in the future.
I'll go ahead and close this thread out now, but feel free to open a new one if you need assistance in the future.
Former Nagios Employee