Good morning,
I have the following problem that I don't know how to solve it.
I have an Oracle 6 Linux server, where I have the nrpe service installed to perform certain checks on that machine.
I had to add some new checks and modify others that we already had, and when it comes to stopping and starting the nrpe service I get the following error:
[root @ cnfora00 ~] # service nrpe restart
Shutting down nrpe [FAILED]
Starting nrpe [OK]
The service stop fails, and therefore I do not see the changes I have made to the server for new checks.
Where is the problem?
I've been watching but I don't see much else. Nothing else was touched in the nrpe.cfg file that may be in conflict.
Thank you very much in advance.
Failed to stop nrpe service in Oracle Linux
-
- Posts: 34
- Joined: Wed Sep 19, 2018 3:20 am
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Failed to stop nrpe service in Oracle Linux
Hello @admincauce,
Do you recall how you installed NRPE in this server? Did you compile from source or use the install script? NRPE can be configured to either run as a service under xinetd or as its own service in init.d.
What is the output of the following?
Do you recall how you installed NRPE in this server? Did you compile from source or use the install script? NRPE can be configured to either run as a service under xinetd or as its own service in init.d.
What is the output of the following?
Code: Select all
ls -l /etc/xinetd.d
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 34
- Joined: Wed Sep 19, 2018 3:20 am
Re: Failed to stop nrpe service in Oracle Linux
Thank you very much in advance,
I installed the NRPE service through official repositories by doing a yum install.
The output of the command you have given me is the following:
[root @ cnfora00 ~] # ls -l /etc/xinetd.d
total 4
-rw-r - r--. 1 root root 332 Aug 16 2014 rsync
I have NRPE as a service executed from init.d
Thanks in advance!
I installed the NRPE service through official repositories by doing a yum install.
The output of the command you have given me is the following:
[root @ cnfora00 ~] # ls -l /etc/xinetd.d
total 4
-rw-r - r--. 1 root root 332 Aug 16 2014 rsync
I have NRPE as a service executed from init.d
Thanks in advance!
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Failed to stop nrpe service in Oracle Linux
Hello @admincauce,
Let's enable the debug mode in the configuration file, then try to re-start and check the logs for messages.
1. Go to /usr/local/nagios/etc/nrpe.cfg and enable debugging.
2. Check to see if there are any NRPE processes running and kill them.
Run the following if you see any processes.
3. Restart NRPE
If it doesn't restart please post the logs for us to review. Thanks.
Let's enable the debug mode in the configuration file, then try to re-start and check the logs for messages.
1. Go to /usr/local/nagios/etc/nrpe.cfg and enable debugging.
Code: Select all
debug=0
#to
debug=1
Code: Select all
ps -ef | grep nrpe | grep -v grep
Code: Select all
killall -9 nrpe
Code: Select all
service nrpe restart
Code: Select all
tail -n 25 /var/log/messages
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 34
- Joined: Wed Sep 19, 2018 3:20 am
Re: Failed to stop nrpe service in Oracle Linux
Hi
And thank you very much for the answer.
Here is the log that I have at the time of restarting the service:
Sep 20 10:33:35 cnfora10 nrpe [21740]: Unable to open config file '/etc/nagios/nrpe_local.cfg' for reading
Sep 20 10:33:35 cnfora10 nrpe [21740]: Continuing with errors ...
Sep 20 10:33:35 cnfora10 nrpe [21740]: Could not open config directory '/etc/nagios/nrpe.d' for reading.
Sep 20 10:33:35 cnfora10 nrpe [21740]: Continuing with errors ...
Sep 20 10:33:35 cnfora10 nrpe [21740]: INFO: SSL / TLS NOT initialized. Network encryption DISABLED.
Sep 20 10:33:35 cnfora10 nrpe [21741]: Starting up daemon
Sep 20 10:33:35 cnfora10 nrpe [21741]: There's already an NRPE server running (PID 11692). Bailing out ...
Sep 20 10:33:43 cnfora10 nrpe [22296]: CONN_CHECK_PEER: checking if host is allowed: 10.203.228.6 port 63111
Sep 20 10:33:43 cnfora10 nrpe [22296]: is_an_allowed_host (AF_INET): is host> 10,203,228.6 <an allowed host> 10,203,228.6 <
Sep 20 10:33:43 cnfora10 nrpe [22296]: is_an_allowed_host (AF_INET): is host> 10,203,228.6 <an allowed host> 10,203,228.6 <
Sep 20 10:33:43 cnfora10 nrpe [22296]: is_an_allowed_host (AF_INET): is host> 10,203,228.6 <an allowed host> 10,203,228.6 <
Sep 20 10:33:43 cnfora10 nrpe [22296]: is_an_allowed_host (AF_INET): host is in allowed host list!
There are two errors at the beginning "unable to open config file" and indeed in / etc / nagios I don't have those files, I have the following files:
[root @ cnfora10 nagios] # ls -lh / etc / nagios /
total 28K
-rw-r - r--. 1 root root 9.4K Sep 20 10:29 nrpe.cfg
-rw-r - r--. 1 root root 13K Oct 16 2018 nrpe.cfg.rpmnew
The nrpe.cfg file is where I have the correct configuration and where I have all the checks for the server.
Regards
And thank you very much for the answer.
Here is the log that I have at the time of restarting the service:
Sep 20 10:33:35 cnfora10 nrpe [21740]: Unable to open config file '/etc/nagios/nrpe_local.cfg' for reading
Sep 20 10:33:35 cnfora10 nrpe [21740]: Continuing with errors ...
Sep 20 10:33:35 cnfora10 nrpe [21740]: Could not open config directory '/etc/nagios/nrpe.d' for reading.
Sep 20 10:33:35 cnfora10 nrpe [21740]: Continuing with errors ...
Sep 20 10:33:35 cnfora10 nrpe [21740]: INFO: SSL / TLS NOT initialized. Network encryption DISABLED.
Sep 20 10:33:35 cnfora10 nrpe [21741]: Starting up daemon
Sep 20 10:33:35 cnfora10 nrpe [21741]: There's already an NRPE server running (PID 11692). Bailing out ...
Sep 20 10:33:43 cnfora10 nrpe [22296]: CONN_CHECK_PEER: checking if host is allowed: 10.203.228.6 port 63111
Sep 20 10:33:43 cnfora10 nrpe [22296]: is_an_allowed_host (AF_INET): is host> 10,203,228.6 <an allowed host> 10,203,228.6 <
Sep 20 10:33:43 cnfora10 nrpe [22296]: is_an_allowed_host (AF_INET): is host> 10,203,228.6 <an allowed host> 10,203,228.6 <
Sep 20 10:33:43 cnfora10 nrpe [22296]: is_an_allowed_host (AF_INET): is host> 10,203,228.6 <an allowed host> 10,203,228.6 <
Sep 20 10:33:43 cnfora10 nrpe [22296]: is_an_allowed_host (AF_INET): host is in allowed host list!
There are two errors at the beginning "unable to open config file" and indeed in / etc / nagios I don't have those files, I have the following files:
[root @ cnfora10 nagios] # ls -lh / etc / nagios /
total 28K
-rw-r - r--. 1 root root 9.4K Sep 20 10:29 nrpe.cfg
-rw-r - r--. 1 root root 13K Oct 16 2018 nrpe.cfg.rpmnew
The nrpe.cfg file is where I have the correct configuration and where I have all the checks for the server.
Regards
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Failed to stop nrpe service in Oracle Linux
Do you have the specified as includes?
Code: Select all
grep include /etc/nagios/nrpe.cfg