NSClient website missing most content


#1

I’m stumped and looking for some help, originally after installing NSClient++ 0.5.0.62 2016-09-14 x64, after my first configuration of WEBServer I was able to get the website to appear showing CPU, Memory and Disk indicators plus a All Metrics count of 46. After numerous configuration changes I now see only the All Metrics count of only 4 metrics. Many other aspects of the website have gone away including queries where there’s no ability to choose or execute anything.

I’m probably looking to uninstall everything and reinstall but, I have no idea what’s happened if anyone has a clue about how to debug this I’d be grateful.

Excerpt of nsclient.ini concerning WEBServer … ; WEBServer - A server that listens for incoming HTTP connection and processes incoming requests. ; It provides both a WEB UI as well as a REST API in addition to simplifying configuration of WEB Server module. WEBServer = enabled

[/settings/WEB/server]

allowed hosts=127.0.0.1
cache allowed hosts=1
certificate=${certificate-path}/certificate.pem

; PORT NUMBER - Port to use for WEB server.
port = 8493 ;origanal 8443

; PASSWORD - Password used to authenticate against server parent for this key is found under: /settings/default this is marked as advanced in favor of the parent.
password = icinga
; COMMAND ARGUMENT PROCESSING - This option determines whether or not we will allow clients to specify arguments to commands that are executed.
allow arguments = true

also when I run nscp test I received the following error: web Failed to start server: Failed to set listening_port: Cannot bind to port I’ve been moving what the ports around to keep things working

I saw the debugging hint that said use netstat -a here’s what things look like with the NSClient++ stopped.

C:\Windows\system32>netstat -a

Active Connections

Proto Local Address Foreign Address State TCP 0.0.0.0:135 Jay-win_7_pro:0 LISTENING TCP 0.0.0.0:445 Jay-win_7_pro:0 LISTENING TCP 0.0.0.0:5357 Jay-win_7_pro:0 LISTENING TCP 0.0.0.0:49152 Jay-win_7_pro:0 LISTENING TCP 0.0.0.0:49153 Jay-win_7_pro:0 LISTENING TCP 0.0.0.0:49154 Jay-win_7_pro:0 LISTENING TCP 0.0.0.0:49155 Jay-win_7_pro:0 LISTENING TCP 0.0.0.0:49156 Jay-win_7_pro:0 LISTENING TCP 0.0.0.0:51001 Jay-win_7_pro:0 LISTENING TCP 10.0.2.15:80 Jay-win_7_pro:0 LISTENING TCP 10.0.2.15:139 Jay-win_7_pro:0 LISTENING TCP 10.0.2.15:443 Jay-win_7_pro:0 LISTENING …

I’m a NSClient newbie and if you could even just direct me to the right topic that would be helpful


#2

Could be a multitude of reasons, but if NSClient++ cant bind to the port it is someone else your talking to.

So check your not running multiple instances, and your configuring the correct port.

Simplest way to configure the port is to se the command line interface:

nscp web install


#3

I finally resolved the above problem by uninstalling and reinstalling NSClient++ starting with the default configuration file and building up definitions step-by-step. The website now looks normal and more importantly check_nrpe on my icinga2 server is working correctly.

I originally was running with NSClient++ 0.5.0.62 2016-09-14 x64 and have the problems resolved with the current NSClient++ 0.5.0.65 2016-11-13 x64.

I’m going to repeat here the removal steps and checks since I found them scattered in several places.

To uninstall NSClient++ stop the service either by using the Windows service control panel or “net stop nscp.”

Verify the service is stopped.

Uninstall NSClient++ I used the control panel located NSClient++ in the list of installed programs and uninstalled it.

Check that the configuration file nsclient.ini is cleared out of C:\Program Files\NSClient++ check that the following registry entries are removed.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\nscp2

HKey_Current_User\Software\ NSClient++ 0.3.9 HKey_Local_Machine\Software\ NSClient++ 0.3.9 the letter to our older and may have never been installed in 0.5.0

Perform the standard installation, which restored the REST web page to its normal default.