Page 1 of 1

NCPA connection refused - RHEL6

Posted: Thu Aug 27, 2020 11:01 am
by Bala.Mutyam
Hi,

We are having an issue with NCPA on a Redhat 6 server and all nagios nagios checks failing with
UNKNOWN: An error occured connecting to API. (Connection error: '[Errno 111] Connection refused')
Port 5693 is already opened from NagiosXi to the agent and no SELinux & iptables.

Is there anything could cause this error? I tried re-installing etc.

All other RHEL6 servers working fine, this one server.

Re: NCPA connection refused - RHEL6

Posted: Thu Aug 27, 2020 6:17 pm
by ssax
What does this output from the XI server?
- Change X.X.X.X to the IP of the NCPA hos

Code: Select all

nmap -Pn -p5693 X.X.X.X
It could be Network IPS, Host IPS, or some other security software on the system impacting it.

Attach your ncpa.cfg from the remote system (not the XI server).

Include any errors from your ncpa_listener.log file.

Re: NCPA connection refused - RHEL6

Posted: Fri Aug 28, 2020 9:10 am
by Bala.Mutyam
@ ssax : Hi - Thanks for the update; Here is the info:

Code: Select all

nmap -Pn -p5693 hostname
tarting Nmap 6.47 ( http://nmap.org ) at 2020-08-28 14:47 BST
Nmap scan report for hostname (host_ip)
Host is up (0.0030s latency).
PORT     STATE  SERVICE
5693/tcp closed unknown

Nmap done: 1 IP address (1 host up) scanned in 0.04 seconds

I have attache agent's ncpa.cfg file.

No error in the logs.

Code: Select all

2020-08-27 08:48:25,660 1288 INFO started
2020-08-27 08:48:25,667 1288 INFO Using SSL version TLSv1_2
2020-08-27 08:49:12,687 1288 INFO stopped
2020-08-27 08:49:13,229 1490 INFO started
2020-08-27 08:49:13,230 1490 INFO Using SSL version TLSv1_2
2020-08-27 08:55:24,537 1490 INFO stopped
2020-08-27 08:56:33,277 1915 INFO started
2020-08-27 08:56:33,278 1915 INFO Using SSL version TLSv1_2
2020-08-27 09:02:31,023 1915 INFO stopped
2020-08-27 09:02:31,560 2479 INFO started
2020-08-27 09:02:31,561 2479 INFO Using SSL version TLSv1_2
2020-08-27 09:35:15,859 2479 INFO stopped
2020-08-27 10:06:50,849 3499 INFO started
2020-08-27 10:06:50,850 3499 INFO Using SSL version TLSv1_2
2020-08-27 10:10:22,667 3499 INFO stopped
2020-08-27 10:12:31,613 3763 INFO started
2020-08-27 10:12:31,614 3763 INFO Using SSL version TLSv1_2
2020-08-27 13:17:05,228 3763 INFO stopped
2020-08-27 13:17:15,780 5342 INFO started
2020-08-27 13:17:15,781 5342 INFO Using SSL version TLSv1_2
2020-08-28 08:54:29,955 5342 INFO stopped
2020-08-28 08:56:05,002 15752 INFO started
2020-08-28 08:56:05,002 15752 INFO Using SSL version TLSv1_2

Re: NCPA connection refused - RHEL6

Posted: Fri Aug 28, 2020 5:40 pm
by ssax

Code: Select all

5693/tcp closed unknown
That means the service isn't even listening.

Try editing your ncpa.cfg and add these under the listener section:

Code: Select all

ip = 0.0.0.0
port = 5693
Then restart the ncpa_listener service:

Code: Select all

service ncpa_listener restart
Then test again:

Code: Select all

nmap -Pn -p5693 X.X.X.X

Re: NCPA connection refused - RHEL6

Posted: Wed Sep 02, 2020 3:09 am
by Bala.Mutyam
@ssax - Hi, thanks for the update. I have added those 2 lines and restarted the ncpa service and it's working. Really strange, as i mentioned other servers working without adding.

Re: NCPA connection refused - RHEL6

Posted: Wed Sep 02, 2020 7:16 am
by scottwilkerson
Bala.Mutyam wrote:@ssax - Hi, thanks for the update. I have added those 2 lines and restarted the ncpa service and it's working. Really strange, as i mentioned other servers working without adding.
Great!

Locking thread