The connection was reset error

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
nagioscynosure
Posts: 11
Joined: Wed Jan 20, 2021 5:21 am

The connection was reset error

Post 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
dchurch
Posts: 858
Joined: Wed Oct 07, 2020 12:46 pm
Location: Yo mama

Re: The connection was reset error

Post 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'
If you didn't get an 8% raise over the course of the pandemic, you took a pay cut.

Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
nagioscynosure
Posts: 11
Joined: Wed Jan 20, 2021 5:21 am

RE : The connection was reset error

Post 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
You do not have the required permissions to view the files attached to this post.
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: The connection was reset error

Post 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
You do not have the required permissions to view the files attached to this post.
nagioscynosure
Posts: 11
Joined: Wed Jan 20, 2021 5:21 am

Re: The connection was reset error

Post 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
You do not have the required permissions to view the files attached to this post.
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: The connection was reset error

Post 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
You do not have the required permissions to view the files attached to this post.
nagioscynosure
Posts: 11
Joined: Wed Jan 20, 2021 5:21 am

Re: The connection was reset error

Post 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/
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: The connection was reset error

Post 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
You do not have the required permissions to view the files attached to this post.
Locked