NCPA hangs on request of 'API / services'
Posted: Tue May 02, 2017 5:48 am
Hi,
This is for NCPA 2.0.3 running on RHEL6, x86-64. Nagios XI, 5.4.0, also on RHEL 6.
I am performing a particular service check with NCPA on dozens of Linux hosts but on one host it is failing with UNKNOWN: Error occurred while running the plugin. Use the verbose flag for more details..
When I then log in on the NCPA GUI and select API / services the request does not complete (it's hanging), there is no error message in the GUI. Other API functions work normally.
The NCPA log displays the following:
This is for NCPA 2.0.3 running on RHEL6, x86-64. Nagios XI, 5.4.0, also on RHEL 6.
I am performing a particular service check with NCPA on dozens of Linux hosts but on one host it is failing with UNKNOWN: Error occurred while running the plugin. Use the verbose flag for more details..
When I then log in on the NCPA GUI and select API / services the request does not complete (it's hanging), there is no error message in the GUI. Other API functions work normally.
The NCPA log displays the following:
What causes this? Is it related to this commit from a couple of weeks ago?File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
File "/root/ncpa/agent/listener/server.py", line 154, in token_auth_decoration
File "/root/ncpa/agent/listener/server.py", line 941, in api
File "/root/ncpa/agent/listener/services.py", line 236, in walk
File "/root/ncpa/agent/listener/services.py", line 17, in wrapper
File "/root/ncpa/agent/listener/services.py", line 156, in get_services_via_initctl
File "/root/ncpa/agent/listener/services.py", line 17, in wrapper
File "/root/ncpa/agent/listener/services.py", line 200, in get_services_via_initd
NameError: global name 'logging' is not defined
2017-05-02 12:23:46,489 8029 INFO 10.132.164.236 - - [2017-05-02 12:23:46] "GET /api/services HTTP/1.1" 500 3980 0.01380