Page 1 of 1
Bad token error
Posted: Wed Aug 05, 2020 11:45 pm
by RIDS_I2MP
Hello Team,
We have installed NCPA agent on our Windows servers and NCPA service is also running fine. We checked the config files as well, but it is correct as expected.
When trying to configure monitoring, we are getting below error:
Unable to contact server at
https://10.1.200.7:5693/testconnect/?to ... Lhoub.2018.
Now, here the token value in above error is not correct. We have verified the token values already and it is correct. I am not sure why this is coming.
Please help us on the same.
Re: Bad token error
Posted: Thu Aug 06, 2020 3:20 pm
by mbellerue
Code: Select all
https://10.1.200.7:5693/testconnect/?token=CH%40Lhoub.2018
That looks roughly correct, with the only difference being that it has URLified the @ symbol. If you open a browser, and go to that IP address on the NCPA port, and put the token in there, are you able to log in?
You can also increase the log level of ncpa_listener to debug, and see if the token is being interpreted properly when you run the test connection.
The only other thing to note is that NCPA is meant to run on Windows Vista/Server 2008 and forward. It may behave strangely on Windows Server 2003.
Re: Bad token error
Posted: Fri Aug 07, 2020 6:30 am
by RIDS_I2MP
Hello,
Thanks for your reply!!
Could you please help me to understand where I can increase the log level of ncpa_listener to debug?
I am not sure about the particular path/file.
Re: Bad token error
Posted: Fri Aug 07, 2020 10:00 am
by mbellerue
In your ncpa.cfg file. Usually this lives in C:\Program Files (x86)\Nagios\ncpa\etc\. There are two sections for log level. One is for the listener, and one is for the passive service. You want the listener log level increased from warning to debug.
Code: Select all
#
# Listener logging file level, location, and the PID location
# Default: loglevel = info (debug, info, warning, error)
# Default: logfile = var/log/ncpa_listener.log
# Default: pidfile = var/run/ncpa_listener.pid (leave listener in pid file name)
#
loglevel = debug
logfile = var/log/ncpa_listener.log
pidfile = var/run/ncpa_listener.pid
Once you've made the change, restart the NCPA Listener service, try to execute a service check from Nagios XI, and then check the NCPA log file on the server, which will be at C:\Program Files (x86)\Nagios\ncpa\var\log\
Re: Bad token error
Posted: Sun Aug 09, 2020 11:20 am
by RIDS_I2MP
Hello,
We noticed that the ncpa service itself is not running on the server.
We re-installed the ncpa agent, did the changes as per your suggestion. But still we are unable to see the ncpa service.
What could be the reason for it?
Re: Bad token error
Posted: Mon Aug 10, 2020 8:13 am
by mbellerue
Potentially. Let's troubleshoot this in the other thread, and if we can confirm that the service is working as expected, but you still get the token error, we can come back to this one.