Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An error occurred:HTTP Error 500: INTERNAL SERVER ERROR #509

Closed
AlexSavVl opened this issue Nov 19, 2018 · 7 comments
Closed

An error occurred:HTTP Error 500: INTERNAL SERVER ERROR #509

AlexSavVl opened this issue Nov 19, 2018 · 7 comments

Comments

@AlexSavVl
Copy link

Hello!
received the error while using ncpa-2.1.6.exe on windows 2008R2
My in my case java.exe is running. java is absent. Services Netlogon is stopped and LanmanServer is running

$ /usr/local/nagios/libexec/check_ncpa.py -H x.x.x.x -v -t 'test_token' -P 5693 -M 'processes' -q 'name=java.exe' -w 1
Connecting to: https://x.x.x.x:5693/api/processes/token=test_token&warning=1&check=1&name=java.exe
An error occurred:HTTP Error 500: INTERNAL SERVER ERROR

$ /usr/local/nagios/libexec/check_ncpa.py -H x.x.x.x -t 'test_token' -P 5693 -M 'processes' -q 'name=java' -w 1
OK: Process count for processes named java was 0 | 'process_count'=0;1;;
$ /usr/local/nagios/libexec/check_ncpa.py -H x.x.x.x -t 'test_token' -P 5693 -M 'services' -q 'service=Netlogon,status=stopped'
OK: Netlogon is stopped
$ /usr/local/nagios/libexec/check_ncpa.py -H x.x.x.x -t 'test_token' -P 5693 -M 'services' -q 'service=LanmanServer,status=running'
OK: LanmanServer is running

$ /usr/local/nagios/libexec/check_ncpa.py -H x.x.x.x -v -t my_token' -P 5693-M 'processes' --warning=100 --critical=200

$ /usr/local/nagios/libexec/check_ncpa.py -H x.x.x.x -t 'test_token' -P 5693 -M 'system/version'
OK: Version was ['6.1.7601']

The problem was discussed here
https://support.nagios.com/forum/viewtopic.php?f=16&t=51177

@AlexSavVl
Copy link
Author

ncpa_listener.log from the client

2018-11-16 12:16:49,418:ERROR:app:Exception on /api/processes/ [GET]
Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\flask\app.py", line 1817, in wsgi_app
  File "C:\Python27\lib\site-packages\flask\app.py", line 1477, in full_dispatch_request
  File "C:\Python27\lib\site-packages\flask\app.py", line 1381, in handle_user_exception
  File "C:\Python27\lib\site-packages\flask\app.py", line 1475, in full_dispatch_request
  File "C:\Python27\lib\site-packages\flask\app.py", line 1461, in dispatch_request
  File "C:\ncpa\agent\listener\server.py", line 169, in token_auth_decoration
  File "C:\ncpa\agent\listener\server.py", line 927, in api
  File "C:\ncpa\agent\listener\processes.py", line 420, in run_check
UnicodeDecodeError: 'ascii' codec can't decode byte 0xf1 in position 360: ordinal not in range(128)

@jomann09
Copy link
Contributor

Is there special characters (non ascii) in any of the data that is being passed back? Can you run --list with the plugin on the first one that is erroring?

@AlexSavVl
Copy link
Author

$ /usr/local/nagios/libexec/check_ncpa.py -H x.x.x.x -v -t 'test' -P 5693 --list
Connecting to: https://x.x.x.x:5693/api?token=test
An error occurred:HTTP Error 500: INTERNAL SERVER ERROR

We use windows with russian language

@AlexSavVl
Copy link
Author

The same problem with ncpa 2.1.1 and AIX 6.

From https client all works until I set "Run as a Nagios Ccheck". On both - windows and AIX

@jomann09
Copy link
Contributor

jomann09 commented Dec 6, 2018

What is the output of the ncpa_listener.log on AIX? We will not be able to fix any issues on NCPA versions that are in the past though, we no longer support AIX 6.

@AlexSavVl
Copy link
Author

AlexSavVl commented Dec 7, 2018

Ok. Fix on current Windows, please.

@jomann09
Copy link
Contributor

jomann09 commented May 2, 2019

Closing this as duplicate of #439 will track it there

@jomann09 jomann09 closed this as completed May 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants