Page 1 of 1

The connection was reset error

Posted: Mon May 03, 2021 1:24 am
by nagioscynosure
While adding devices to Nagios through NCPA wizard after setp 2 facing "The connection was reset error". So please help me on this

Re: The connection was reset error

Posted: Mon May 03, 2021 12:27 pm
by dchurch
Are you using any proxy on the Nagios XI machine to access the network? Is there a firewall?

What's the output from the following commands (run these on the Nagios XI server)?

Code: Select all

env |grep -i http
ping -c 5 <INSERT IP of NCPA HOST>
What's the output from this command on the NCPA host?

Code: Select all

grep -i 'xinetd\|ncpa' /var/log/messages
service ncpa_listener status
grep -i allowed_hosts /usr/local/ncpa/etc/ncpa.cfg
netstat -tlapn |grep 'ncpa\|5693'

RE : The connection was reset error

Posted: Tue May 04, 2021 10:04 am
by nagioscynosure
yes we are using VPN and Firewall is also present

Outputs for the commands :
Commands executed on Nagios XI server:

Code: Select all

env |grep -i http
executed successfully but no variables shown

Code: Select all

ping -c 5 <INSERT IP of NCPA HOST>
output is
ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4022ms
rtt min/avg/max/mdev = 16.799/20.360/28.935/4.535 ms
Commands executed on NCPA host:

Code: Select all

grep -i 'xinetd\|ncpa' /var/log/messages
You have new mail in /var/spool/mail/root

Code: Select all

service ncpa_listener status
ncpa_listener: unrecognized service

Code: Select all

grep -i allowed_hosts /usr/local/ncpa/etc/ncpa.cfg
grep: /usr/local/ncpa/etc/ncpa.cfg: No such file or directory

Code: Select all

netstat -tlapn |grep 'ncpa\|5693'
executed successfully but no output shown

Re: The connection was reset error

Posted: Wed May 05, 2021 9:44 am
by vtrac
Hi,
Hope you are having a good day!! ... :-)

Based on your last replied, it looks like you have not install the NCPA agent on your remote server yet.

When you opened the "NCPA wizard", on the very top, there is a link to download the NCPA agent and the installation guide.

Code: Select all

The agent should be installed before you continue running this wizard.

Download the latest version of NCPA for the system you would like to monitor
Follow the installation instructions (PDF version) and configure the token for the agent
W1.png
Here are the links:
https://www.nagios.org/ncpa/#downloads
https://www.nagios.org/ncpa/getting-started.php
or
https://assets.nagios.com/downloads/ncp ... g-NCPA.pdf


Best Regards,
Vinh

Re: The connection was reset error

Posted: Wed May 05, 2021 11:07 am
by nagioscynosure
Hi,

I installed NCPA on my Nagios XI server and also on the server that I need to monitor. But still I am facing same error.

Regards,
Rushabh

Re: The connection was reset error

Posted: Wed May 05, 2021 3:55 pm
by vtrac
Hi,
Hope you are having a good day!!

You do not need to install NCPA agent on your XI machine, only on the remote machine that you want to monitor.

Based on the info from previous replies, I am assuming that your remote machine is a Linux machine, right?

Let see if NCPA listener is running. Open a command prompt on your "remote" NCPA agent:

Code: Select all

systemctl status ncpa_listener.service
If it is NOT running, please start it:
(NOTE: this is your NCPA agent machine, not your XI machine)

Code: Select all

systemctl restart ncpa_listener.service
Did you configure "firewall" on your NCPA agent machine?
If you have not done so, please following the PDF again .... looking for the "Configure Firewall - Linux" section.
https://assets.nagios.com/downloads/ncp ... g-NCPA.pdf

Please open the XI command prompt, run the below commands and see if your XI can see ping and see port 5693 on your NCPA agent.
(NOTE: "x.x.x.x" is the IP address of your remote NCPA agent) ... please upload outputs or screenshot:

Code: Select all

ping xxxx

nmap -Pn -p 5693 x.x.x.x

If your remote NCPA agent listener is running, you should be able to open the below URL:
(NOTE: "x.x.x.x" is the NCPA IP address. You can use the "Token" or "Community String" define in "ncpa.cfg" to login
https://x.x.x.x:5693/
w2.png

Here's the recap of what we need to check:
- XI machine can "ping" the remote NCPA machine
- Make sure firewall on remote NCPA machine is open for port "5693"
- ncpa_listener is running & listening on port "5693" on the remote NCPA machine.
- check if XI can connect to port "5693" of the remote NCPA machine using "nmap" command.
- you are able to open https://x.x.x.x:5693/


Best Regards,
Vinh

Re: The connection was reset error

Posted: Thu May 06, 2021 8:44 am
by nagioscynosure
No the remote machine that I want to monitor is a windows machine and also I am able to ping to remote machine.

When I checked for the nmap command I got following output

Code: Select all

nmap -Pn -p 5693 x.x.x.x

output is :

Host is up (0.020s latency).
PORT     STATE SERVICE
5693/tcp open  unknown

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

Also not able to open https://x.x.x.x:5693/

Re: The connection was reset error

Posted: Thu May 06, 2021 10:21 am
by vtrac
Hi,
Please check your windows remote NCPA and see if 'ncpalistener" service is running.
Open a widnows NCPA command prompt as "run as administrator", run the below comand and look for "STATE":

Code: Select all

sc query ncpalistener

You can restart the "ncpalistener" by open the windows command prompt as "run as administrator" on the remote NCPA agent machine and run the below command:

Code: Select all

net stop ncpalistener

net start ncpalistener
Now, try to open the URL below ..... (must use "https"):
(NOTE: x.x.x.x is your remote windows NCPA machine)
https://x.x.x.x:5693/

If you open this the first time, you will see a warning that your connection is not private (below)
Just click "Advance", then click the "Proceed to ...... "links
Th1.png
Please take screenshots of outputs and upload them here as it would make the debugging process easier ... :-)

NOTE: our goals is to be able to open the "https://x.x.x.x:5693" URL of your remote Windows NCPA agent.

If you are not able to open the above URL, please upload the below config file:

Code: Select all

C:\Program Files (x86)\Nagios\NCPA\etc\ncpa.cfg

Best Regards,
Vinh