-
Notifications
You must be signed in to change notification settings - Fork 93
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
NCPA Windows Agent Api Error #114
Comments
Yes the russian language part is definitely part of the problem as indicated by the unicode errors. Can you tell me the host name of the computer you are running it on? Can you tell me the user you are running it as? I will attempt to duplicate this. |
Hostname of the computer is : DC2.It.local. Service running from LocalSystem Account. I try open browser from admin account. In russian called "Администратор". |
@ravenich can you try to access a few trees via the web interface on the remote box for me?
Do some of those break for you? Do all of those break for you? |
Breaks only on https://:5693/api/user?token=mytoken. The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application. |
I dug into this, and there is currently a bug open to it with psutil giampaolo/psutil#565. This pull request will fix it, however, it is in psutil 2.2.1, which has not been released. I added a quick fix to cast all the items to ascii, a solution I definitely do not like, however, in the face of guessing the encoding and getting it wrong or forcing it to ascii, I think the latter is the better choice. I'm going to set this for the 1.9.0 milestone for an actual fix, but the temporary fix should fix your API access for now. Temp fix is in https://github.com/NagiosEnterprises/ncpa/tree/ascii-unicode-fix. |
Hello @scot0357
And here is result of execution in cmd
And here result of execution that gives @ravenich error message
|
it is possible to have in 1.8? Thanks |
I'm looking into this right now - it looks like psutil 2.2.1 was released a few weeks after nick's comment so I believe we can use the original fix for this and incorporate it into 1.8.0 |
In Windows 2008 SP2 (Russian Language) after opening agent web interface api shows this error:
Internal Server Error
Same error on the Windows Server 2008R2 SP1.
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
Log file from the 2008 :
In 2008R2 og file the same.
In \Nagios\NCPA\var\ncpa_listener.log:
2015-01-05 23:34:51,621:INFO:handler:127.0.0.1 - - [2015-01-05 23:34:51] "GET /api HTTP/1.1" 301 432 0.002000
2015-01-05 23:34:51,622:DEBUG:handler:Initializing WebSocket
2015-01-05 23:34:51,624:DEBUG:handler:Validating WebSocket request
2015-01-05 23:34:51,624:DEBUG:init:Getting accessor:
2015-01-05 23:34:51,694:ERROR:app:Exception on /api/ [GET]
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\flask\app.py", line 1504, in wsgi_app
File "C:\Python27\lib\site-packages\flask\app.py", line 1264, in full_dispatch_request
File "C:\Python27\lib\site-packages\flask\app.py", line 1262, in full_dispatch_request
File "C:\Python27\lib\site-packages\flask\app.py", line 1248, in dispatch_request
File "C:\ncpa\agent\listener\server.py", line 68, in decorated
File "C:\ncpa\agent\listener\server.py", line 420, in api
File "C:\Python27\lib\site-packages\flask\helpers.py", line 120, in jsonify
File "C:\Python27\lib\json__init__.py", line 250, in dumps
File "C:\Python27\lib\json\encoder.py", line 209, in encode
File "C:\Python27\lib\json\encoder.py", line 434, in _iterencode
File "C:\Python27\lib\json\encoder.py", line 408, in _iterencode_dict
File "C:\Python27\lib\json\encoder.py", line 408, in _iterencode_dict
File "C:\Python27\lib\json\encoder.py", line 408, in _iterencode_dict
File "C:\Python27\lib\json\encoder.py", line 408, in _iterencode_dict
File "C:\Python27\lib\json\encoder.py", line 332, in _iterencode_list
File "C:\Python27\lib\json\encoder.py", line 313, in _iterencode_list
UnicodeDecodeError: 'utf8' codec can't decode byte 0xc0 in position 0: invalid start byte
2015-01-05 23:34:51,696:INFO:handler:127.0.0.1 - - [2015-01-05 23:34:51] "GET /api/ HTTP/1.1" 500 412 0.073000
2015-01-05 23:34:51,766:DEBUG:handler:Initializing WebSocket
2015-01-05 23:34:51,766:DEBUG:handler:Validating WebSocket request
2015-01-05 23:34:51,767:INFO:handler:127.0.0.1 - - [2015-01-05 23:34:51] "GET /favicon.ico HTTP/1.1" 404 342 0.002000
The text was updated successfully, but these errors were encountered: