connect to address ... and port 12489 connection refused

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: connect to address ... and port 12489 connection refused

Post by npolovenko »

@inform And I assume if you paste this URL into your web browser on the XI server, you'll be able to access the web page as well, right? If the answer to that is yes, i'd recommend adding --ssl flag to your command in Core configuration manager. Just like that:

Code: Select all

 -H centos7x64 -f ok -I --ssl 192.168.4.172 -u "/exchange/"
Read this article for a better understanding of how to use HTTP plugin.

Code: Select all

http://linux.101hacks.com/unix/check-http/
If the above doesn't work, please attach the screenshot of your command definition from the CCM.
Thanks
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Tom Ekberg
Posts: 1
Joined: Wed Dec 13, 2017 11:21 am

Re: connect to address ... and port 12489 connection refused

Post by Tom Ekberg »

I have Nagios XI (server) running on Centos 7, and have the NSClient++ (agent) running on Windows Server 2012 R2. Installing the agent was straightforward and I encountered no errors. I put the password in the server's CPU service which I enabled for the windows host. Since I was getting connection refused errors where the server was trying to connect with the agent over port 12489 I looked at the agent. The only port being listened on was 5666. I ran netstat -abno|grep -P '12489|566[67]' in mingw64. I even put these lines in the nsclient.ini file:

[/settings/NSCA/client/targets/default]

; PORT NUMBER - Port to use for check_nt.
port = 12489

and restarted the agent. Still only listening on port 5666. Failing that I went to the server command area (do this by clicking in the top menu Configure -> Core Config manager, then in the sidebar expand Commands and cick the expanded Commands to open them), located check_xi_service_nsclient and changed the port from 12489 to 5666. Next I forced a recheck of the CPU service. The server worked fine and was able to determine the CPU usage. Prior to that I started the agent in test mode:

net stop nscp
nscp test --log trace

To get out of test mode type this: exit <RET>.

The log displayed but initially didn't show anything interesting. When I forced the CPU service recheck, the agent log displayed these messages:

D nrpe Accepting connection from: 10.144.70.82, count=1
E nrpe Seems we other end is not using ssl: unknown protocol
c:\source\master\include\socket/connection.hpp:273
E nrpe Please review the ssl option as well as ssl options in settings.
c:\source\master\include\socket/connection.hpp:274

So a connection was made between the server and agent successfully. I'll need to fix the server's SSL options, but that's another topic.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: connect to address ... and port 12489 connection refused

Post by npolovenko »

Hello, @Tom Ekberg. Would you be able to create a separate thread for your issue?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked