Bad token error

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Bad token error

Post 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.
You do not have the required permissions to view the files attached to this post.
Thanks & Regards,
I2MP Team.
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: Bad token error

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Re: Bad token error

Post 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.
Thanks & Regards,
I2MP Team.
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: Bad token error

Post 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\
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Re: Bad token error

Post 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?
Thanks & Regards,
I2MP Team.
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: Bad token error

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked