unable to start NRPE

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.
smlushing
Posts: 11
Joined: Thu Oct 26, 2017 8:18 am

Re: unable to start NRPE

Post by smlushing »

Here is the following when I turned on Debugging

Code: Select all


[root@lxbandt2 netsml]# cd /etc/nagios
[root@lxbandt2 nagios]# ls
cgi.cfg  generic-service.cfg  lcgdm-hosts.cfg     nagios.cfg  nrpe.cfg  passwd
conf.d   lcgdm-commands.cfg   lcgdm-services.cfg  NOT-USED    objects   private
[root@lxbandt2 nagios]# vi nrpe.cfg

# DEBUGGING OPTION
# This option determines whether or not debugging messages are logged to the
# syslog facility.
# Values: 0=debugging off, 1=debugging on

debug=1



Nov  2 13:58:56 lxbandt2 xinetd[18418]: START: nrpe pid=21070 from=::ffff:147.4.4.226
Nov  2 13:58:56 lxbandt2 nrpe[21070]: parse_allowed_hosts: parsing the allowed host string >127.0.0.1,147.4.145.26,147.4.4.226< to add to ACL list
Nov  2 13:58:56 lxbandt2 nrpe[21070]: add_ipv4_to_acl: checking ip-address >127.0.0.1<
Nov  2 13:58:56 lxbandt2 nrpe[21070]: add_ipv4_to_acl: ip-address >127.0.0.1< correct, adding.
Nov  2 13:58:56 lxbandt2 nrpe[21070]: add_ipv4_to_acl: checking ip-address >147.4.145.26<
Nov  2 13:58:56 lxbandt2 nrpe[21070]: add_ipv4_to_acl: ip-address >147.4.145.26< correct, adding.
Nov  2 13:58:56 lxbandt2 nrpe[21070]: add_ipv4_to_acl: checking ip-address >147.4.4.226<
Nov  2 13:58:56 lxbandt2 nrpe[21070]: add_ipv4_to_acl: ip-address >147.4.4.226< correct, adding.
Nov  2 13:58:56 lxbandt2 nrpe[21070]: Showing ACL lists for both IP and DOMAIN acl's:
Nov  2 13:58:56 lxbandt2 nrpe[21070]:    IP ACL: 127.0.0.1/32 16777343
Nov  2 13:58:56 lxbandt2 nrpe[21070]:    IP ACL: 147.4.145.26/32 445711507
Nov  2 13:58:56 lxbandt2 nrpe[21070]:    IP ACL: 147.4.4.226/32 3791914131
Nov  2 13:58:56 lxbandt2 nrpe[21070]: INFO: SSL/TLS initialized. All network traffic will be encrypted.
Nov  2 13:58:56 lxbandt2 nrpe[21071]: Warning: Could not set effective GID=979
Nov  2 13:58:56 lxbandt2 nrpe[21071]: Warning: Unable to change supplementary groups using initgroups()
Nov  2 13:58:56 lxbandt2 nrpe[21071]: Warning: Could not set UID=985
Nov  2 13:58:56 lxbandt2 xinetd[18418]: EXIT: nrpe status=0 pid=21070 duration=0(sec)
Nov  2 13:59:42 lxbandt2 xinetd[18418]: START: nrpe pid=22952 from=::ffff:147.4.4.226
Nov  2 13:59:42 lxbandt2 nrpe[22952]: parse_allowed_hosts: parsing the allowed host string >127.0.0.1,147.4.145.26,147.4.4.226< to add to ACL list
Nov  2 13:59:42 lxbandt2 nrpe[22952]: add_ipv4_to_acl: checking ip-address >127.0.0.1<
Nov  2 13:59:42 lxbandt2 nrpe[22952]: add_ipv4_to_acl: ip-address >127.0.0.1< correct, adding.
Nov  2 13:59:42 lxbandt2 nrpe[22952]: add_ipv4_to_acl: checking ip-address >147.4.145.26<
Nov  2 13:59:42 lxbandt2 nrpe[22952]: add_ipv4_to_acl: ip-address >147.4.145.26< correct, adding.
Nov  2 13:59:43 lxbandt2 nrpe[23010]: Showing ACL lists for both IP and DOMAIN acl's:
Nov  2 13:59:43 lxbandt2 nrpe[23010]:    IP ACL: 127.0.0.1/32 16777343
Nov  2 13:59:43 lxbandt2 nrpe[23010]:    IP ACL: 147.4.145.26/32 445711507
Nov  2 13:59:43 lxbandt2 nrpe[23010]:    IP ACL: 147.4.4.226/32 3791914131
Nov  2 13:59:43 lxbandt2 nrpe[23010]: INFO: SSL/TLS initialized. All network traffic will be encrypted.
Nov  2 13:59:43 lxbandt2 nrpe[23011]: Starting up daemon
Nov  2 13:59:43 lxbandt2 nrpe[23011]: SETUP_WAIT_CONN FOR: IPv4 address: 0.0.0.0 ((null))
Nov  2 13:59:43 lxbandt2 nrpe[23011]: Bind to port 5666 on 0.0.0.0 failed: Address already in use.
Nov  2 13:59:43 lxbandt2 nrpe[23011]: SETUP_WAIT_CONN FOR: IPv4 address: :: ((null))
Nov  2 13:59:43 lxbandt2 nrpe[23011]: Bind to port 5666 on :: failed: Address already in use.

Nov  2 14:00:04 lxbandt2 xinetd[18418]: START: nrpe pid=23826 from=::ffff:147.4.4.226
Nov  2 14:00:04 lxbandt2 nrpe[23826]: parse_allowed_hosts: parsing the allowed host string >127.0.0.1,147.4.145.26,147.4.4.226< to add to ACL list
Nov  2 14:00:04 lxbandt2 nrpe[23826]: add_ipv4_to_acl: checking ip-address >127.0.0.1<
Nov  2 14:00:04 lxbandt2 nrpe[23826]: add_ipv4_to_acl: ip-address >127.0.0.1< correct, adding.
Nov  2 14:00:04 lxbandt2 nrpe[23826]: add_ipv4_to_acl: checking ip-address >147.4.145.26<
Nov  2 14:00:04 lxbandt2 nrpe[23826]: add_ipv4_to_acl: ip-address >147.4.145.26< correct, adding.
Nov  2 14:00:04 lxbandt2 nrpe[23826]: add_ipv4_to_acl: checking ip-address >147.4.4.226<
Nov  2 14:00:04 lxbandt2 nrpe[23826]: add_ipv4_to_acl: ip-address >147.4.4.226< correct, adding.
Nov  2 14:00:04 lxbandt2 nrpe[23826]: Showing ACL lists for both IP and DOMAIN acl's:
Nov  2 14:00:04 lxbandt2 nrpe[23826]:    IP ACL: 127.0.0.1/32 16777343
Nov  2 14:00:04 lxbandt2 nrpe[23826]:    IP ACL: 147.4.145.26/32 445711507
Nov  2 14:00:04 lxbandt2 nrpe[23826]:    IP ACL: 147.4.4.226/32 3791914131


Nov  2 14:00:04 lxbandt2 nrpe[23826]: INFO: SSL/TLS initialized. All network traffic will be encrypted.
Nov  2 14:00:04 lxbandt2 nrpe[23827]: Warning: Could not set effective GID=979
Nov  2 14:00:04 lxbandt2 nrpe[23827]: Warning: Unable to change supplementary groups using initgroups()
Nov  2 14:00:04 lxbandt2 nrpe[23827]: Warning: Could not set UID=985
Nov  2 14:00:04 lxbandt2 xinetd[18418]: EXIT: nrpe status=0 pid=23826 duration=0(sec)
Nov  2 14:00:14 lxbandt2 xinetd[18418]: START: nrpe pid=24178 from=::ffff:147.4.4.226
Nov  2 14:00:14 lxbandt2 nrpe[24178]: parse_allowed_hosts: parsing the allowed host string >127.0.0.1,147.4.145.26,147.4.4.226< to add to ACL list
Nov  2 14:00:14 lxbandt2 nrpe[24178]: add_ipv4_to_acl: checking ip-address >127.0.0.1<
Nov  2 14:00:14 lxbandt2 nrpe[24178]: add_ipv4_to_acl: ip-address >127.0.0.1< correct, adding.

User avatar
tacolover101
Posts: 432
Joined: Mon Apr 10, 2017 11:55 am

Re: unable to start NRPE

Post by tacolover101 »

Code: Select all

Nov  2 13:59:43 lxbandt2 nrpe[23011]: Bind to port 5666 on :: failed: Address already in use.
your log contains both nrpe and xinetd - i believe it should only contain one of these as they will argue with eachother, while trying to perform the same function.


what is the full output of netstat -nap | grep 5666 - something is already listening, which causes NRPE not to start as expected.
smlushing
Posts: 11
Joined: Thu Oct 26, 2017 8:18 am

Re: unable to start NRPE

Post by smlushing »

When I stop the process nrpe (service nrpe stop) here is the netstat output

Code: Select all

[root@lxbandt2 netsml]# service nrpe stop
Shutting down nrpe                                         [FAILED]
[root@lxbandt2 netsml]# 

[root@lxbandt2 netsml]# netstat -nap | grep 5666
tcp        0      0 :::5666                     :::*                        LISTEN      18418/xinetd        
udp        0      0 169.254.219.50:45666        0.0.0.0:*                               41788/ora_p02i_LUMS 
udp        0      0 169.254.168.49:45666        0.0.0.0:*                               41788/ora_p02i_LUMS 
udp        0      0 169.254.74.3:45666          0.0.0.0:*                               41788/ora_p02i_LUMS 
udp        0      0 169.254.9.19:45666          0.0.0.0:*                               41788/ora_p02i_LUMS 
udp        0      0 169.254.219.50:56660        0.0.0.0:*                               31457/ora_p03b_TST1 
udp        0      0 169.254.168.49:56660        0.0.0.0:*                               31457/ora_p03b_TST1 
udp        0      0 169.254.74.3:56660          0.0.0.0:*                               31457/ora_p03b_TST1 
udp        0      0 169.254.9.19:56660          0.0.0.0:*                               31457/ora_p03b_TST1 
udp        0      0 169.254.219.50:56661        0.0.0.0:*                               28149/oracleYREND2  
udp        0      0 169.254.168.49:56661        0.0.0.0:*                               28149/oracleYREND2  
udp        0      0 169.254.74.3:56661          0.0.0.0:*                               28149/oracleYREND2  
udp        0      0 169.254.9.19:56661          0.0.0.0:*                               28149/oracleYREND2  
udp        0      0 127.0.0.1:25666             0.0.0.0:*                               36959/ora_p01l_FINY 
udp        0      0 169.254.219.50:25666        0.0.0.0:*                               36959/ora_p01l_FINY 
udp        0      0 169.254.168.49:25666        0.0.0.0:*                               36959/ora_p01l_FINY 
udp        0      0 169.254.74.3:25666          0.0.0.0:*                               36959/ora_p01l_FINY 
udp        0      0 169.254.9.19:25666          0.0.0.0:*                               36959/ora_p01l_FINY 
unix  3      [ ]         STREAM     CONNECTED     356668 31998/ora_lck0_FINY 
unix  3      [ ]         STREAM     CONNECTED     56661  20094/gpnpd.bin     
unix  3      [ ]         STREAM     CONNECTED     56660  20094/gpnpd.bin     

[root@lxbandt2 netsml]# service nrpe start
Starting nrpe                                              [  OK  ]
[root@lxbandt2 netsml]# netstat -nap | grep 5666
tcp        0      0 :::5666                     :::*                        LISTEN      18418/xinetd        
udp        0      0 169.254.219.50:45666        0.0.0.0:*                               41788/ora_p02i_LUMS 
udp        0      0 169.254.168.49:45666        0.0.0.0:*                               41788/ora_p02i_LUMS 
udp        0      0 169.254.74.3:45666          0.0.0.0:*                               41788/ora_p02i_LUMS 
udp        0      0 169.254.9.19:45666          0.0.0.0:*                               41788/ora_p02i_LUMS 
udp        0      0 169.254.219.50:56660        0.0.0.0:*                               31457/ora_p03b_TST1 
udp        0      0 169.254.168.49:56660        0.0.0.0:*                               31457/ora_p03b_TST1 
udp        0      0 169.254.74.3:56660          0.0.0.0:*                               31457/ora_p03b_TST1 
udp        0      0 169.254.9.19:56660          0.0.0.0:*                               31457/ora_p03b_TST1 
udp        0      0 169.254.219.50:56661        0.0.0.0:*                               28149/oracleYREND2  
udp        0      0 169.254.168.49:56661        0.0.0.0:*                               28149/oracleYREND2  
udp        0      0 169.254.74.3:56661          0.0.0.0:*                               28149/oracleYREND2  
udp        0      0 169.254.9.19:56661          0.0.0.0:*                               28149/oracleYREND2  
udp        0      0 127.0.0.1:25666             0.0.0.0:*                               36959/ora_p01l_FINY 
udp        0      0 169.254.219.50:25666        0.0.0.0:*                               36959/ora_p01l_FINY 
udp        0      0 169.254.168.49:25666        0.0.0.0:*                               36959/ora_p01l_FINY 
udp        0      0 169.254.74.3:25666          0.0.0.0:*                               36959/ora_p01l_FINY 
udp        0      0 169.254.9.19:25666          0.0.0.0:*                               36959/ora_p01l_FINY 
unix  3      [ ]         STREAM     CONNECTED     356668 31998/ora_lck0_FINY 
unix  3      [ ]         STREAM     CONNECTED     56661  20094/gpnpd.bin     
unix  3      [ ]         STREAM     CONNECTED     56660  20094/gpnpd.bin     

As you can see the only output is xinetd

Steve lushing
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: unable to start NRPE

Post by npolovenko »

As @tacolover101 mentioned, you already have xinetd service listening on port 5666 and it conflicts with NRPE standalone daemon which also tries to listen on the same port. Not sure how that happened. Did you install NRPE 2 times, or maybe you used different tutorials?

tcp 0 0 :::5666 :::* LISTEN 18418/xinetd

You could try to stop xinetd with:

Code: Select all

service xinetd stop
And after please attempt to restart nrpe again with:

Code: Select all

service nrpe restart
Does it still fail to stop or does it restart successfully? If successfully, then I suggest removing the xinetd version of nrpe to avoid interference in future:

Code: Select all

rm -f /etc/xinetd.d/nrpe
service xinetd restart
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked