connect to address port 5666: Connection refused

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Johnsmit
Posts: 95
Joined: Thu Apr 19, 2018 2:03 pm

connect to address port 5666: Connection refused

Post by Johnsmit »

Hi,
i have Nagios Xi 5.5.5 version installed on RHEL 7.3, when i tried to monitor Nagios Xi engine as different host i am getting the following error.
(No output on stdout) stderr: connect to address port 5666: Connection refused

i have a previous post on this but i didn't find /etc/xinetd.d/nrpe but i found /etc/xinetd.d/nsca

https://support.nagios.com/forum/viewto ... =6&t=48797

vi /etc/xinetd.d/nsca
# default: on
# description: NSCA (Nagios Service Check Acceptor)
service nsca
{
flags = REUSE
socket_type = stream
wait = no
user = nagios
group = nagios
server = /usr/local/nagios/bin/nsca
server_args = -c /usr/local/nagios/etc/nsca.cfg --inetd
log_on_failure += USERID
disable = no
only_from = 127.0.0.1 IP address

restarted Xinetd service but still am getting the same error.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: connect to address port 5666: Connection refused

Post by npolovenko »

Hello, @Johnsmit. NSCA is a different agent from the NRPE. It is quite unusual that you don't have the nrpe config in the xinetd folder.
Can you show me the output of these commands?
ll /usr/local/nagios/bin
ll /etc/xinetd.d/
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Johnsmit
Posts: 95
Joined: Thu Apr 19, 2018 2:03 pm

Re: connect to address port 5666: Connection refused

Post by Johnsmit »

npolovenko wrote:Hello, @Johnsmit. NSCA is a different agent from the NRPE. It is quite unusual that you don't have the nrpe config in the xinetd folder.
Can you show me the output of these commands?
ll /usr/local/nagios/bin
ll /etc/xinetd.d/
rwxr-xr-x 1 root root 222128 May 2 11:12 nrpe
-rwxr-xr-x 1 root root 10683 May 2 11:12 nrpe-uninstall

total 44
-rw------- 1 root root 1157 Mar 3 2016 chargen-dgram
-rw------- 1 root root 1159 Mar 3 2016 chargen-stream
-rw------- 1 root root 1157 Mar 3 2016 daytime-dgram
-rw------- 1 root root 1159 Mar 3 2016 daytime-stream
-rw------- 1 root root 1157 Mar 3 2016 discard-dgram
-rw------- 1 root root 1159 Mar 3 2016 discard-stream
-rw------- 1 root root 1148 Mar 3 2016 echo-dgram
-rw------- 1 root root 1150 Mar 3 2016 echo-stream
-rw------- 1 root root 1212 Mar 3 2016 tcpmux-server
-rw------- 1 root root 1149 Mar 3 2016 time-dgram
-rw------- 1 root root 1150 Mar 3 2016 time-stream
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: connect to address port 5666: Connection refused

Post by npolovenko »

@Johnsmit, Looks like you still have the nrpe binary. Let's try recreating the config in the /etc/xinetd.d/.
Create the nrpe file and put the following content inside.
# default: on
# description: NRPE (Nagios Remote Plugin Executor)
service nrpe
{
flags = REUSE
socket_type = stream
port = 5666
wait = no
user = nagios
group = nagios
server = /usr/local/nagios/bin/nrpe
server_args = -c /usr/local/nagios/etc/nrpe.cfg --inetd
log_on_failure += USERID
disable = yes
only_from = 127.0.0.1 IP address
}
Give it the following permissions:
chmod 644 nrpe
Restart xinetd:
service xinetd restart
Then run the following command:
/usr/local/nagios/libexec/check_nrpe -H 127.0.0.1
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked