NCPA Wizard "Bad token for connection"

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jonathanklay
Posts: 7
Joined: Thu Feb 12, 2015 2:18 pm

NCPA Wizard "Bad token for connection"

Post by jonathanklay »

I have NCPA installed and running on a system, and it works. I can access the web interface from another system using the community_string/token. I can do a wget from the NagiosXI server OS CLI with token=xxxxxxx and get data returned.
But in the NCPA Wizard first page I get a pink rectangle that says "Bad token for connection."
In var/log/ncpa_listener.log I see
"GET /testconnect?token=xxxxxxx HTTP/1.0" 308 527 0.002476
each time I try this. In a browser I can put https://FQDN:5693/testconnect/?token=xxxxxxx and I get
{
"value": "Success."
}
Any ideas?
Of course, if it really sends the ' HTTP/1.0' then it would get { "error": "Bad token." } ...
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: NCPA Wizard "Bad token for connection"

Post by cdienger »

The first thing that comes to mind is a special character not getting handled properly but I haven't been able to reproduce so far. Are there any special characters in the token? Can you test with a simplified token if so? What version of NCPA is installed?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
progressive.nagiosXI
Posts: 277
Joined: Mon Jul 31, 2017 5:54 am

Re: NCPA Wizard "Bad token for connection"

Post by progressive.nagiosXI »

Hi ,

we are also getting same error through wizard.(linux NCPA wizard is buggy)

-Open through web interface and also from CURL in nagiosxi

[root@monitoring-nagiosxi ~]# curl https://13.71.*.*:5693/testconnect/?token=MyToken -k
{
"value": "Success."
}

[nagios@monitoring-nagiosxi ~]$ /usr/local/nagios/libexec/check_ncpa.py -H 13.71.*.* -t 'MyToken' -P 5693 -M 'disk/logical/|' -w 70 -c 90
OK: Used disk space was 4.70 % (Used: 45.54 GiB, Free: 923.57 GiB, Total: 969.12 GiB) | 'used'=45.54GiB;678;872; 'free'=923.57GiB;678;872; 'total'=969.12GiB;678;872;

Note: we are not using any special character in token
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: NCPA Wizard "Bad token for connection"

Post by cdienger »

What version of the agent is installed and what version of the wizard? The agent version can be found by running:

Code: Select all

 /usr/local/nagios/libexec/check_ncpa.py -H ncpa_ip -t 'mytoken' -P 5693 -M 'system/agent_version'
I've attached a slightly modified version of the wizard to output a couple more pieces of info to the screen when it can't connect. Install it under Admin > System Extensions > Manage Config Wizards, run the wizard, and PM me a screenshot of the wizard after it fails.
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
progressive.nagiosXI
Posts: 277
Joined: Mon Jul 31, 2017 5:54 am

Re: NCPA Wizard "Bad token for connection"

Post by progressive.nagiosXI »

Thanks,

we now updated ncpa wizard from 2.0.4 to 2.0.6 and then issue resolved.

Admin > System Extensions > Manage Config Wizards

we checked updates and update all wizard to latest versions
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: NCPA Wizard "Bad token for connection"

Post by cdienger »

Thanks for the update!
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
jonathanklay
Posts: 7
Joined: Thu Feb 12, 2015 2:18 pm

Re: NCPA Wizard "Bad token for connection"

Post by jonathanklay »

Yes, it was something with prior versions - 2.0.4 was installed. Updated from 5.5.7 to 5.6.2, now NCPA wizard is 2.0.6 and runs correctly.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: NCPA Wizard "Bad token for connection"

Post by cdienger »

Thanks for the update. Glad to hear it is working now!
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked