Page 1 of 1

NCPA Agent on RHEL, HTTP 403 FORBIDDEN

Posted: Mon Jul 22, 2019 8:49 am
by Guyver1
Hi,

I've just installed the NCPA agent on a RHEL 7 server and configured it as per all my other NCPA agent based servers.

However when doing my initial check i get the following:
[root@nagios libexec]# ./check_ncpa.py -H 192.168.xxx.xxx -t 'notmyrealtoken' -P 5693 -M 'system/agent_version' -v
Connecting to: https://192.168.xxx.xxx:5693/api/system ... en&check=1
An error occurred:HTTP Error 403: FORBIDDEN

I have also tried the web interface for the agent and get the same error:
Forbidden
You don't have the permission to access the requested resource. It is either read-protected or not readable by the server.

When attempting to add port 5693 to the firewall it tells me the firewall is not running so is not an issue:
[root@hostname ~]# firewall-cmd --add-port=5693/tcp --permanent
FirewallD is not running

How do I get this working?

Re: NCPA Agent on RHEL, HTTP 403 FORBIDDEN

Posted: Mon Jul 22, 2019 2:44 pm
by benjaminsmith
Hello @Guyver1,

Find the ncpa.cfg file and change the following line:

Code: Select all

ip = ::
To:

Code: Select all

ip = 0.0.0.0
Save the changes and re-start the NCPA listener and then test again. Let me know if the issue is resolved for you.

Code: Select all

service ncpa_listener restart

Re: NCPA Agent on RHEL, HTTP 403 FORBIDDEN

Posted: Tue Jul 23, 2019 1:59 am
by Guyver1
Amazing! Thank you very much!

I knew it was something simple!

I've added that to my notes.

Cheers.

Re: NCPA Agent on RHEL, HTTP 403 FORBIDDEN

Posted: Tue Jul 23, 2019 6:33 am
by scottwilkerson
Great!

Locking