Closed jerryzz closed 3 years ago
Here the beginning of the debug log
03/11/21 11:51:17 zmesdetect_m5[2459] INF ZMLog.py:223 [Setting up signal handler for logs] xxxx.xxxx.xxx
03/11/21 11:51:17 zmesdetect_m5[2459] INF zm_detect.py:280 [---------| app:6.1.14, pyzm:0.3.36, ES:6.1.14 , OpenCV:4.3.0-dev|------------]
03/11/21 11:51:17 zmesdetect_m5[2459] DBG1 utils.py:406 [secret filename: /etc/zm/secrets.ini]
03/11/21 11:51:17 zmesdetect_m5[2459] DBG2 utils.py:379 [Secret token found in config: !ZM_PORTAL]
03/11/21 11:51:17 zmesdetect_m5[2459] DBG2 utils.py:379 [Secret token found in config: !ZM_USER]
03/11/21 11:51:17 zmesdetect_m5[2459] DBG2 utils.py:379 [Secret token found in config: !ZM_PASSWORD]
03/11/21 11:51:17 zmesdetect_m5[2459] DBG2 utils.py:379 [Secret token found in config: !ZM_API_PORTAL]
03/11/21 11:51:17 zmesdetect_m5[2459] DBG2 utils.py:379 [Secret token found in config: !ML_HOST]
03/11/21 11:51:17 zmesdetect_m5[2459] DBG2 utils.py:379 [Secret token found in config: !ML_USER]
03/11/21 11:51:17 zmesdetect_m5[2459] DBG2 utils.py:379 [Secret token found in config: !ML_PASSWORD]
03/11/21 11:51:17 zmesdetect_m5[2459] DBG1 utils.py:441 [allowing self-signed certs to work...]
03/11/21 11:51:17 zmesdetect_m5[2459] DBG4 utils.py:451 [Now checking for monitor overrides]
03/11/21 11:51:17 zmesdetect_m5[2459] DBG4 utils.py:514 [Finally, doing parameter substitution]
03/11/21 11:51:17 zmesdetect_m5[2459] INF zm_detect.py:309 [Importing remote shim classes for Object/Face]
03/11/21 11:51:18 zmesdetect_m5[2459] INF zm_detect.py:328 [Connecting with ZM APIs]
03/11/21 11:51:18 zmesdetect_m5[2459] DBG2 api.py:69 [API SSL certificate check has been disbled]
03/11/21 11:51:18 zmesdetect_m5[2459] DBG1 api.py:171 [using username/password for login]
03/11/21 11:51:18 zmesdetect_m5[2459] DBG2 api.py:200 [Using new token API]
03/11/21 11:51:18 zmesdetect_m5[2459] DBG1 api.py:207 [Access token expires on:2021-03-11 13:51:18.332891 [7200s]]
03/11/21 11:51:18 zmesdetect_m5[2459] DBG1 api.py:211 [Refresh token expires on:2021-03-12 11:51:18.333521 [86400s]]
03/11/21 11:51:18 zmesdetect_m5[2459] DBG3 api.py:134 [No need to relogin as access token still has 119.99997955 minutes remaining]
03/11/21 11:51:18 zmesdetect_m5[2459] DBG4 api.py:270 [make_request called with url=https://xxxx.xxxx.xxx/zm/api/host/login.json/host/gettimezone.json payload={} type=get query={'token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiO
03/11/21 11:51:18 zmesdetect_m5[2459] DBG1 api.py:306 [HTTP error: 401 Client Error: Unauthorized for url: https://xxxx.xxxx.xxx/zm/api/host/login.json/host/gettimezone.json?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJab25lT
03/11/21 11:51:18 zmesdetect_m5[2459] DBG1 api.py:308 [Got 401 (Unauthorized) - retrying login once]
03/11/21 11:51:18 zmesdetect_m5[2459] DBG2 api.py:150 [Going to use refresh token as it still has 1439.9988944166666 minutes remaining]
03/11/21 11:51:18 zmesdetect_m5[2459] DBG1 api.py:166 [Using token for login [eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJab25lTWluZGVyIiwiaWF0IjoxNjE1NDU5ODc4LCJleHAiOjE2MTU1NDYyNzgsInVzZXIiOiJldmVudCIsInR5cGUiOiJyZWZyZXNoIn0.v_I26
03/11/21 11:51:18 zmesdetect_m5[2459] DBG2 api.py:200 [Using new token API]
03/11/21 11:51:18 zmesdetect_m5[2459] DBG1 api.py:207 [Access token expires on:2021-03-11 13:51:18.408356 [7200s]]
03/11/21 11:51:18 zmesdetect_m5[2459] DBG3 api.py:134 [No need to relogin as access token still has 119.99998609999999 minutes remaining]
03/11/21 11:51:18 zmesdetect_m5[2459] DBG4 api.py:270 [make_request called with url=https://xxxx.xxxx.xxx/zm/api/host/login.json/host/gettimezone.json payload={} type=get query={'token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiO
03/11/21 11:51:18 zmesdetect_m5[2459] DBG1 api.py:306 [HTTP error: 401 Client Error: Unauthorized for url: https://xxxx.xxxx.xxx/zm/api/host/login.json/host/gettimezone.json?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJab25lT
03/11/21 11:51:18 zmesdetect_m5[2459] DBG1 api.py:308 [Got 401 (Unauthorized) - retrying login once]
Seems I'm tired ... I used the 'secrets.ini' file for the old version, which have "/zm/api/host/login.json" path in the ZM_API_PORTAL variable, instead "/zm/api"
Should not be an infinite loop though. Re-opening till I fix.
Event Server version
Hooks version (if you are using Object Detection)
The version of ZoneMinder you are using:
What is the nature of your issue
Bug/question
Details
Got an 401 error calling api 'gettimezone.json ' > Infinite loop What do I wrong ?
Debug Logs (if applicable)
Thanks!