NCPA - '[Errno 104] Connection reset by peer'

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
jjung_clarins
Posts: 10
Joined: Thu Jul 23, 2020 8:43 am

NCPA - '[Errno 104] Connection reset by peer'

Post by jjung_clarins »

Hello,

i have a problem on a Windows 2012R2 Server to make agent fetch informations.
No change on the server but i get message
"UNKNOWN: An error occured connecting to API. (Connection error: '[Errno 104] Connection reset by peer')"
for every check on the sever.

When using wizard to re-add the server, i get "Unable to contact server at https://xxx.xxx.xxx.xxx:5693/testconnect/?token=.
"
I've tried to change SSL version, no luck.

I well telnet from the nagios server to the server on 5693.

I've installed last NCPA, 2.4, same results.
NagiosXI version is 5.7.2.

Does someone had this error ?

Thanks
Last edited by jjung_clarins on Mon Feb 19, 2024 9:24 am, edited 1 time in total.
nagiostra
Posts: 31
Joined: Sun Nov 06, 2022 4:17 pm

Re: NCPA - '[Errno 104] Connection reset by peer'

Post by nagiostra »

Did it work as expected at some point and then start giving you this error?
jjung_clarins
Posts: 10
Joined: Thu Jul 23, 2020 8:43 am

Re: NCPA - '[Errno 104] Connection reset by peer'

Post by jjung_clarins »

Absolutely !
nagiostra
Posts: 31
Joined: Sun Nov 06, 2022 4:17 pm

Re: NCPA - '[Errno 104] Connection reset by peer'

Post by nagiostra »

It looks like a firewall issue. Typically this would be the Windows server saying I'm here, and I'm listening, but I'm not going to let you connect. Can you think of any changes you made on the Windows server in between when it worked and when it didn't?
nagiostra
Posts: 31
Joined: Sun Nov 06, 2022 4:17 pm

Re: NCPA - '[Errno 104] Connection reset by peer'

Post by nagiostra »

It looks like a firewall issue. Typically this would be the Windows server saying I'm here, and I'm listening, but I'm not going to let you connect. Can you think of any changes you made on the Windows server in between when it worked and when it didn't?
jjung_clarins
Posts: 10
Joined: Thu Jul 23, 2020 8:43 am

Re: NCPA - '[Errno 104] Connection reset by peer'

Post by jjung_clarins »

Windows firewall is disabled :/
And i well connect using telnet...
I have Palo Alto in between, didn't try a permissive rule only for this as i don't see any drops
nagiostra
Posts: 31
Joined: Sun Nov 06, 2022 4:17 pm

Re: NCPA - '[Errno 104] Connection reset by peer'

Post by nagiostra »

Run these three commands from the command line on your XI host and post the results:
nmap https:ip_of_windows_host:5693
curl -v https:ip_of_windows_host:5693/ -k
telnet ip_of_windows_host 5693
nagiostra
Posts: 31
Joined: Sun Nov 06, 2022 4:17 pm

Re: NCPA - '[Errno 104] Connection reset by peer'

Post by nagiostra »

Actually, the first command should be:
nmap ip_of_windows_host:5693

My bad. Copy/Paste mistake
jjung_clarins
Posts: 10
Joined: Thu Jul 23, 2020 8:43 am

Re: NCPA - '[Errno 104] Connection reset by peer'

Post by jjung_clarins »

Here's the result
[root@xxxx~]# nmap https:xxx.xxx.xxx.xxx:5693

Starting Nmap 6.47 ( http://nmap.org ) at 2022-12-06 17:59 CET
Failed to resolve "https:xxx.xxx.xxx.xxx:5693".
WARNING: No targets were specified, so 0 hosts scanned.
Nmap done: 0 IP addresses (0 hosts up) scanned in 0.04 seconds
[root@xxxx~]# nmap xxx.xxx.xxx.xxx:5693

Starting Nmap 6.47 ( http://nmap.org ) at 2022-12-06 18:00 CET
Failed to resolve "xxx.xxx.xxx.xxx:5693".
WARNING: No targets were specified, so 0 hosts scanned.
Nmap done: 0 IP addresses (0 hosts up) scanned in 0.03 seconds
[root@xxxx~]# curl -v https:xxx.xxx.xxx.xxx:5693/ -k
* getaddrinfo(3) failed for https:xxx.xxx.xxx.xxx:5693
* Couldn't resolve host 'https:xxx.xxx.xxx.xxx'
* Closing connection #0
curl: (6) Couldn't resolve host 'https:xxx.xxx.xxx.xxx'
[root@xxxx~]# telnet xxx.xxx.xxx.xxx5693
Trying xxx.xxx.xxx.xxx...
Connected to xxx.xxx.xxx.xxx.
Escape character is '^]'.
^CConnection closed by foreign host.
Last edited by jjung_clarins on Mon Feb 19, 2024 9:25 am, edited 1 time in total.
nagiostra
Posts: 31
Joined: Sun Nov 06, 2022 4:17 pm

Re: NCPA - '[Errno 104] Connection reset by peer'

Post by nagiostra »

Sorry, remove the :5693 from the command. Should be ip_of_windows_host
Post Reply