Port 5666 : connection refused

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

Port 5666 : connection refused

Postby smeyichou » Wed May 20, 2020 4:45 am

Hi,

Since a few months, Nagios Core, on its interface, can't connect to one of my servers, saying : (No output on stdout) stderr: connection to adress xx.xxx.xxx.209 port 5666 : Connection refused

The host is on a CentOs server, as well as the client.

When i type, from the host server
Code: Select all
nmap xx.xxx.xxx.209
, it tells me : Port 5666/tcp closed nrpe

I read several other topics on it, but nothing works.

Also, when i type service xinetd status, it tells me xitnetd is running, on both servers (the host and the client).

Do you have any ideas what i can do? What should i check or type?

Thanks ! :)
smeyichou
 
Posts: 7
Joined: Wed May 20, 2020 3:03 am

Re: Port 5666 : connection refused

Postby gormank » Wed May 20, 2020 2:59 pm

I'd see if the local firewall (firewalld on later Centor/RH) on the server is blocking the port or, if nrpe (or ncpa?) is actually not running.

ps -ef | egrep -i -e 'nrpe|ncpa'

This just tells if the port is open locally...
netstat -an | grep 5666
gormank
 
Posts: 659
Joined: Tue Dec 02, 2014 12:00 pm

Re: Port 5666 : connection refused

Postby smeyichou » Thu May 21, 2020 3:00 am

Ok, for the first command (ps -ef | egrep -i -e 'nrpe|ncpa') on the main server :
Code: Select all
root     36412 36196  0 09:54 pts/0    00:00:00 egrep -i -e nrcpe|ncpa

For the second command (netstat - an | grep 5666), it gives me nothing

On the remote server (the one i can't connect to) it tells me :
Code: Select all
root     17044 17012  0 09:56 pts/0    00:00:00 egrep -i -e nrcpe|ncpa

Same for the second command, no info.
smeyichou
 
Posts: 7
Joined: Wed May 20, 2020 3:03 am

Re: Port 5666 : connection refused

Postby gormank » Thu May 21, 2020 1:28 pm

Sorry, I meant the client/remote side, and I seem to be mistaken about nrpe/ncps showing in the process list. Here's another ps with xinetd.

# ps -ef | egrep -i -e 'nrpe|ncpa|xinetd' | egrep -v 'grep|check_nrpe'
root 1097 1 0 May19 ? 00:00:00 /usr/sbin/xinetd -stayalive -pidfile /var/run/xinetd.pid

# netstat -an | grep 5666
tcp 0 0 172.30.130.22:57454 172.30.135.64:5666 ESTABLISHED
tcp 0 0 172.30.130.22:35496 172.30.130.75:5666 ESTABLISHED
tcp 0 0 172.30.130.22:54782 172.30.130.90:5666 ESTABLISHED
tcp 0 0 172.30.130.22:47868 172.29.130.75:5666 ESTABLISHED

I'd check /etc/xinetd.d/n??? files to see what agent is used, and if its set up.

There are TS guides on the KB pages once you decide what agent is used. https://support.nagios.com/kb/
gormank
 
Posts: 659
Joined: Tue Dec 02, 2014 12:00 pm

Re: Port 5666 : connection refused

Postby smeyichou » Fri May 22, 2020 1:47 am

Ok, here what it gives me on the remote side (the server that can't be accessed) :

# ps -ef | egrep -i -e 'nrpe|ncpa|xinetd' | egrep -v 'grep|check_nrpe'
Code: Select all
root      4054     1  0 May20 ?        00:00:00 xinetd -stayalive -pidfile /var/run/xinetd.pid


# netstat -an | grep 5666
Code: Select all
[root@serverremote ~]#


I then went to /etc/xinetd.d/ on the remote server, and here are the files in this directory :

apgd chargen-dgram chargen-stream daytime-dgram daytime-stream discard-dgram discard-stream echo-dgram echo-stream rsync tcpmux-server time-dgram time-stream

I'm a bit confused since i'm a beginner concerning Nagios, sorry. There is definitely no nrpe file in this directory.
smeyichou
 
Posts: 7
Joined: Wed May 20, 2020 3:03 am

Re: Port 5666 : connection refused

Postby gormank » Fri May 22, 2020 9:46 am

Could you have a look at a similar server /etc/xinetd.d/nrpe file, create it on the problem host and restart xinetd?
gormank
 
Posts: 659
Joined: Tue Dec 02, 2014 12:00 pm

Re: Port 5666 : connection refused

Postby ssax » Fri May 22, 2020 4:45 pm

Did you install NRPE on the system?

What does this output?

find / -name nrpe.cfg
service nrpe status
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
ssax
Dreams In Code
 
Posts: 4888
Joined: Wed Feb 11, 2015 12:54 pm

Re: Port 5666 : connection refused

Postby smeyichou » Sat May 23, 2020 4:51 am

gormank wrote:Could you have a look at a similar server /etc/xinetd.d/nrpe file, create it on the problem host and restart xinetd?


I don't have this file on any server, not the main one, and not the remote one.

ssax wrote:Did you install NRPE on the system?

What does this output?

find / -name nrpe.cfg
service nrpe status


On the main server, it tells me it is located in /usr/local/nagios/etc/nrpe.cfg
On the remote server, it doesn't find me anything

For service nrpe status, on BOTH servers, it tells me :
Code: Select all
nrpe: unrecognized service


Thanks for your help guys by the way, it's for my job so i'll tale a look at your future answers on Monday :)
smeyichou
 
Posts: 7
Joined: Wed May 20, 2020 3:03 am

Re: Port 5666 : connection refused

Postby smeyichou » Mon May 25, 2020 3:51 am

Do you guys need more info :?:
smeyichou
 
Posts: 7
Joined: Wed May 20, 2020 3:03 am

Re: Port 5666 : connection refused

Postby smeyichou » Thu May 28, 2020 3:24 am

Please save me :D
smeyichou
 
Posts: 7
Joined: Wed May 20, 2020 3:03 am

Next

Return to Community Support

Who is online

Users browsing this forum: Google [Bot] and 9 guests