Connection Refused/Connection Refused by Host
Connection Refused/Connection Refused by Host
Hi everyone,
I'm working through these agent issues one by one and I've hit a snag.
We have a group of servers that run on Debian. They are old and as such I had to install Nagios from source. I have it installed and the agent runs but I get "Connection Refused" and "Connection Refused by host" errors in the Service Detail. Nagios can ping the servers so it's not a network issue and there are no firewalls, software or hardware, between the host and the Nagios server that would block the traffic.
I've updated allowed_hosts in /etc/nagios/nrpe.cfg to contain the IP Address of the Nagios server and then restarted the daemon with the command:
/etc/init.d/nagios3 restart
If I run check_nrpe I get an error that the connection was refused.
Obviously, I'm not adding the allowed_hosts in the correct place. I'm not using xinetd.
Thanks!
I'm working through these agent issues one by one and I've hit a snag.
We have a group of servers that run on Debian. They are old and as such I had to install Nagios from source. I have it installed and the agent runs but I get "Connection Refused" and "Connection Refused by host" errors in the Service Detail. Nagios can ping the servers so it's not a network issue and there are no firewalls, software or hardware, between the host and the Nagios server that would block the traffic.
I've updated allowed_hosts in /etc/nagios/nrpe.cfg to contain the IP Address of the Nagios server and then restarted the daemon with the command:
/etc/init.d/nagios3 restart
If I run check_nrpe I get an error that the connection was refused.
Obviously, I'm not adding the allowed_hosts in the correct place. I'm not using xinetd.
Thanks!
Re: Connection Refused/Connection Refused by Host
Also, it's clear to me that I'm updating allowed_hosts in the wrong place because of this line in the nrpe.cfg:
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd
I'm running it on inetd but just can't figure out where to edit the allowed_hosts.
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd
I'm running it on inetd but just can't figure out where to edit the allowed_hosts.
Re: Connection Refused/Connection Refused by Host
Former Nagios employee
Re: Connection Refused/Connection Refused by Host
I don't have an inetd.conf file.
Re: Connection Refused/Connection Refused by Host
Code: Select all
find / -name inetd.confFormer Nagios employee
Re: Connection Refused/Connection Refused by Host
Connection refused can be caused by a number of things. Start by scanning the remote port 5666 from the nagios server:
If it is open, try to just get the version information:
Code: Select all
nmap <remote host ip> -p 5666Code: Select all
./check_nrpe -H <remote host ip> Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Connection Refused/Connection Refused by Host
There is no inetd.conf file in my Debian install. That file is not used on a lot of recent versions of linux.
Re: Connection Refused/Connection Refused by Host
Also, the server is working fine for other hosts so the ports are open and working correctly. It's just not working properly on our Debian installs where I had to install it from source.
Re: Connection Refused/Connection Refused by Host
Actually, reading everything. I think I'm misunderstanding inetd/init.d. I'm not running NRPE under inetd on this server.
Re: Connection Refused/Connection Refused by Host
But are the ports open and working on the debian installs? Could you post the output of the commands from my previous email (run them on the XI server)micropact wrote:Also, the server is working fine for other hosts so the ports are open and working correctly. It's just not working properly on our Debian installs where I had to install it from source.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.