Page 1 of 2

Failed to install NCPA

Posted: Tue Jun 11, 2019 10:03 am
by tanod
Hello,

I want to install NCPA (active checks) on a fresh Windows Server 2012 install (for testing before installing on real WS2012).

I used the following command on PowerShell:

Code: Select all

./ncpa-2.1.7.exe /S /TOKEN='Testing' /IP='192.168.238.138'
I tried IP with simple quote, double quote and no quote. I tried too without IP.
I opened 5693 TCP/UDP port in the firewall.

ncpalistner and ncpapassive services are running.

But I can't join it from my XI server.
I can't either join the Web GUI. On the Windows Server, localhost:5693 is failing. Same on any other PC on the network.

I see 2 logs :
_ Nagios/NCPA/var/log/ncpa_listener.log :

Code: Select all

2019-06-11 16:35:20,311:ERROR:ncpa_windows:[Errno 10049] L'adresse demandée n'est pas valide dans son contexte: ('192.168.238.138', 5693)
My Windows is in French, so in english it would be The requested address is not valid in its context.

_ Nagios/NCPA/var/log/win32service_ncpalistener.log :

Code: Select all

[00280] 2019/06/11 16:35:18.956 starting at level ERROR
If I don't set IP, ncpa_listener.log is empty and win32service_ncpalistener.log is the same.

I don't know what should I do.
Can you help me?

Thank you!

Re: Failed to install NCPA

Posted: Tue Jun 11, 2019 10:59 am
by scottwilkerson
Is 192.168.238.138 an address on the windows server?

I would actually recommend leaving that directive off, it would prevent NCPA from binding to localhost

https://www.nagios.org/ncpa/getting-sta ... nt-install

Re: Failed to install NCPA

Posted: Tue Jun 11, 2019 11:26 am
by tanod
192.168.238.138 is the XI server's address. Am I doing wrong ?
Anyway, if I don't set IP, it doesn't work either.

The link you give is the documentation I used.

Re: Failed to install NCPA

Posted: Tue Jun 11, 2019 11:54 am
by scottwilkerson
tanod wrote:92.168.238.138 is the XI server's address. Am I doing wrong ?
Yes,

From the docs
IP: The IP address to bind to. Default is 0.0.0.0 which is all IPv4 addresses. IF you'd like to connect to IPv6 you must use ::.
this is the IP on the windows server you want NCPA to bind to. If it is 0.0.0.0 it will bind to all IP's

You would likely need to uninstall before re-installing

Re: Failed to install NCPA

Posted: Wed Jun 12, 2019 2:48 am
by tanod
Why should I not set the XI's IP ?

So, 0.0.0.0 should be the default value, but it doen't works when I don't set it.
I tried to set manually the option /IP=0.0.0.0 and this time it works!

But I don't really understand why...

Re: Failed to install NCPA

Posted: Wed Jun 12, 2019 6:41 am
by scottwilkerson
tanod wrote:Why should I not set the XI's IP ?
You are setting the IP that the NCPA agent is going to bind to on the server you are installing it on, not the XI server.
tanod wrote:I tried to set manually the option /IP=0.0.0.0 and this time it works!
Excellent, glad it is working, I am not sure why it didn't work when you didn't specify it, I will send it over to our team for testing. Are you using the latest version?

Re: Failed to install NCPA

Posted: Wed Jun 12, 2019 9:08 am
by tanod
Thank you for your help.

I am using NCPA 2.1.7, which is the last version, on a fresh install of Windows Server 2012 (not R2).

And Nagios XI 5.6.2 which is not the last version. I just upgraded to 5.6.3, after this test so.

Re: Failed to install NCPA

Posted: Wed Jun 12, 2019 12:25 pm
by lmiltchev
We did some testing in-house, and found out that if you didn't specify "0.0.0.0" explicitly, NCPA would bind only to "localhost", but not to your actual IP. However, if you specified it in the ncpa.cfg:

Code: Select all

ip = 0.0.0.0
then it would bind to both - the IP and "localhost". Our developers are aware of the issue and will be investigating it. Thank you!

Re: Failed to install NCPA

Posted: Mon Jun 24, 2019 4:38 am
by tanod
Hello again,

I would like to install NCPA on Windows Server 2003.

According to this, I need NCPA 1.8.1.

I need to do a Silent Install.
Is this doc still working on 1.8.1 ?

Can I use this command ?

Code: Select all

./ncpa-1.8.1.exe /S /TOKEN='MyToken' /IP='0.0.0.0'

Thank you!

Re: Failed to install NCPA

Posted: Mon Jun 24, 2019 8:59 am
by lmiltchev
Yes, it should work. Here's the documentation for NCPA ver. 1.8:

https://www.nagios.org/ncpa/help.php?v=1.8