HTTP 500 Error on API access from zm_detetc .../zm/api/host/login.json
Posted: Wed Nov 23, 2022 10:01 am
Hello,
I'm trying to set up EventNotification on my Fedora 34 server, everything looks fine but for this error on API:
Unrecoverable error:500 Server Error: Internal Server Error for url: https://********/zm/api/host/login.json Traceback:Traceback (most recent call last): File "/var/lib/zmeventnotification/bin/zm_detect.py", line 556, in main_handler() File "/var/lib/zmeventnotification/bin/zm_detect.py", line 335, in main_handler zmapi = zmapi.ZMApi(options=api_options) File "/usr/local/lib/python3.10/site-packages/pyzm/api.py", line 80, in __init__ self._login() File "/usr/local/lib/python3.10/site-packages/pyzm/api.py", line 233, in _login raise err File "/usr/local/lib/python3.10/site-packages/pyzm/api.py", line 203, in _login r.raise_for_status() File "/usr/lib/python3.10/site-packages/requests/models.py", line 960, in raise_for_status raise HTTPError(http_error_msg, response=self)requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://***********/zm/api/host/login.json
The hooks are working but apparently the API on ZM are not working. I've checked and the checkbox is ticket for API on configuration and the .config files are ok as per the installation guide. I use Apache as webserver. Even if I run Curl I get HTTP500 on get version for API:
curl --verbose --insecure https://***************/zm/api/host/getVersion.json
* Trying ************:443...
* Connected to ************** (*************) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
* CApath: none
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use http/1.1
* Server certificate:
* subject: C=--; ST=SomeState; L=SomeCity; O=SomeOrganization; OU=SomeOrganizationalUnit; CN=CAPSULE-SERVER; emailAddress=root@CAPSULE-SERVER
* start date: Nov 20 14:24:25 2022 GMT
* expire date: Nov 20 14:24:25 2023 GMT
* issuer: C=--; ST=SomeState; L=SomeCity; O=SomeOrganization; OU=SomeOrganizationalUnit; CN=CAPSULE-SERVER; emailAddress=root@CAPSULE-SERVER
* SSL certificate verify result: self signed certificate (18), continuing anyway.
> GET /zm/api/host/getVersion.json HTTP/1.1
> Host2:***********.
> User-Agent: curl/7.79.1
> Accept: */*
>
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
* Mark bundle as not supporting multiuse
< HTTP/1.1 500 Internal Server Error
< Date: Wed, 23 Nov 2022 09:58:18 GMT
< Server: Apache/2.4.54 (Fedora Linux) OpenSSL/1.1.1q mod_auth_gssapi/1.6.3 mod_wsgi/4.9.0 Python/3.10
< X-Powered-By: PHP/8.0.25
< Content-Length: 0
< Connection: close
< Content-Type: text/html; charset=UTF-8
<
* Closing connection 0
* TLSv1.3 (IN), TLS alert, close notify (256):
* TLSv1.3 (OUT), TLS alert, close notify (256):
I've searched this forum and on Internet but I could not find any clue on recent versions of ZM (I'm using the latest).
Any help is welcome, thanks!
I'm trying to set up EventNotification on my Fedora 34 server, everything looks fine but for this error on API:
Unrecoverable error:500 Server Error: Internal Server Error for url: https://********/zm/api/host/login.json Traceback:Traceback (most recent call last): File "/var/lib/zmeventnotification/bin/zm_detect.py", line 556, in main_handler() File "/var/lib/zmeventnotification/bin/zm_detect.py", line 335, in main_handler zmapi = zmapi.ZMApi(options=api_options) File "/usr/local/lib/python3.10/site-packages/pyzm/api.py", line 80, in __init__ self._login() File "/usr/local/lib/python3.10/site-packages/pyzm/api.py", line 233, in _login raise err File "/usr/local/lib/python3.10/site-packages/pyzm/api.py", line 203, in _login r.raise_for_status() File "/usr/lib/python3.10/site-packages/requests/models.py", line 960, in raise_for_status raise HTTPError(http_error_msg, response=self)requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://***********/zm/api/host/login.json
The hooks are working but apparently the API on ZM are not working. I've checked and the checkbox is ticket for API on configuration and the .config files are ok as per the installation guide. I use Apache as webserver. Even if I run Curl I get HTTP500 on get version for API:
curl --verbose --insecure https://***************/zm/api/host/getVersion.json
* Trying ************:443...
* Connected to ************** (*************) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
* CApath: none
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use http/1.1
* Server certificate:
* subject: C=--; ST=SomeState; L=SomeCity; O=SomeOrganization; OU=SomeOrganizationalUnit; CN=CAPSULE-SERVER; emailAddress=root@CAPSULE-SERVER
* start date: Nov 20 14:24:25 2022 GMT
* expire date: Nov 20 14:24:25 2023 GMT
* issuer: C=--; ST=SomeState; L=SomeCity; O=SomeOrganization; OU=SomeOrganizationalUnit; CN=CAPSULE-SERVER; emailAddress=root@CAPSULE-SERVER
* SSL certificate verify result: self signed certificate (18), continuing anyway.
> GET /zm/api/host/getVersion.json HTTP/1.1
> Host2:***********.
> User-Agent: curl/7.79.1
> Accept: */*
>
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
* Mark bundle as not supporting multiuse
< HTTP/1.1 500 Internal Server Error
< Date: Wed, 23 Nov 2022 09:58:18 GMT
< Server: Apache/2.4.54 (Fedora Linux) OpenSSL/1.1.1q mod_auth_gssapi/1.6.3 mod_wsgi/4.9.0 Python/3.10
< X-Powered-By: PHP/8.0.25
< Content-Length: 0
< Connection: close
< Content-Type: text/html; charset=UTF-8
<
* Closing connection 0
* TLSv1.3 (IN), TLS alert, close notify (256):
* TLSv1.3 (OUT), TLS alert, close notify (256):
I've searched this forum and on Internet but I could not find any clue on recent versions of ZM (I'm using the latest).
Any help is welcome, thanks!