Hello All,
I am a newbie to Nagios. I'm in process of setting up Nagios NRPE in my lab host. I'm facing this issue when I test NRPE setup.
[root@krishnar1 nrpe-3.0.1]# /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1
NRPE v3.0.1
[root@krishnar1 nrpe-3.0.1]# /usr/local/nagios/libexec/check_nrpe -H localhost
CHECK_NRPE: Error - Could not connect to :6c6e:7556:0: Connection reset by peer
[root@krishnar1 nrpe-3.0.1]#
I'm wondering why check to localhost fails, but check to 127.0.0.1 works!
NRPE Check to local host fails
Re: NRPE Check to local host fails
I would look at your /etc/hosts file for starters, looks like localhost may not be resolving properly. Could also be a misconfigured DNS I suppose, but this is far more likely.
Former Nagios employee
Re: NRPE Check to local host fails
[user@krishnar1 ~]$ /usr/local/nagios/libexec/check_nrpe -H localhost
CHECK_NRPE: Error - Could not connect to :6c6e:7556:0: Connection reset by peer
[user@krishnar1 ~]$ host localhost
localhost has address 127.0.0.1
localhost has IPv6 address ::1
[user@krishnar1 ~]$ cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
I think I have the proper DNS config.
CHECK_NRPE: Error - Could not connect to :6c6e:7556:0: Connection reset by peer
[user@krishnar1 ~]$ host localhost
localhost has address 127.0.0.1
localhost has IPv6 address ::1
[user@krishnar1 ~]$ cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
I think I have the proper DNS config.
Re: NRPE Check to local host fails
That is very odd. Do you need IPv6 enabled? I was able to find a blog post in Chinese (translated below) that references that exact IPv6 address:
https://translate.google.com/translate? ... t=&act=url
though I could not find it referenced anywhere else. The article recommends disabling IPv6, though I am not sure why that specific IP would be used for localhost.
https://translate.google.com/translate? ... t=&act=url
though I could not find it referenced anywhere else. The article recommends disabling IPv6, though I am not sure why that specific IP would be used for localhost.
Former Nagios employee
Re: NRPE Check to local host fails
Do the commands below work for you?
Can you disable ipv6 on this box (unless you need it), and try again?
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H localhost -4
/usr/local/nagios/libexec/check_nrpe -H 127.0.0.1
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: NRPE Check to local host fails
This worked!
[root@krishnar1 ~]# /usr/local/nagios/libexec/check_nrpe -H localhost -4
NRPE v3.0.1
[root@krishnar1 ~]#
[root@krishnar1 ~]# /usr/local/nagios/libexec/check_nrpe -H localhost -4
NRPE v3.0.1
[root@krishnar1 ~]#
Re: NRPE Check to local host fails
Great, is there anything else we can help you with on this or are we okay to mark this as resolved and lock the topic?
Thank you
Thank you