openzim / zimit-frontend

Zimit Public Web UI
https://zimit.kiwix.org
GNU General Public License v3.0
7 stars 8 forks source link

Investigate 500 error when authentication is not valid anymore #37

Open benoit74 opened 9 months ago

benoit74 commented 9 months ago

There was a 500 error in zimit frontend.

These are the logs, to be investigated:

2023-09-29T10:51:38.183737223Z stderr F DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.farm.youzim.it:443
2023-09-29T10:51:38.22850478Z stderr F DEBUG:urllib3.connectionpool:https://api.farm.youzim.it:443 "POST /v1/schedules/ HTTP/1.1" 401 26
2023-09-29T10:51:38.229343147Z stderr F DEBUG:zimfarm:authenticate() with force=True
2023-09-29T10:51:38.23248065Z stderr F DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.farm.youzim.it:443
2023-09-29T10:51:38.227591002Z stderr F [pid: 27|app: 0|req: 197/437] 100.64.6.28 () {56 vars in 1447 bytes} [Fri Sep 29 10:51:38 2023] POST /v1/schedules/ => generated 26 bytes in 1 msecs (HTTP/1.1 401) 3 headers in 113 bytes (2 switches on core 0)
2023-09-29T10:51:38.227898053Z stdout F 100.64.6.28 - - [29/Sep/2023:10:51:38 +0000] "POST /v1/schedules/ HTTP/1.1" 401 26 "-" "python-requests/2.25.1" "100.64.6.1"
2023-09-29T10:51:38.340357104Z stderr F [pid: 27|app: 0|req: 198/438] 100.64.6.28 () {58 vars in 818 bytes} [Fri Sep 29 10:51:38 2023] POST /v1/auth/authorize => generated 785 bytes in 84 msecs (HTTP/1.1 200) 5 headers in 147 bytes (2 switches on core 0)
2023-09-29T10:51:38.340516477Z stdout F 100.64.6.28 - - [29/Sep/2023:10:51:38 +0000] "POST /v1/auth/authorize HTTP/1.1" 200 551 "-" "python-requests/2.25.1" "100.64.6.1"
2023-09-29T10:51:38.340827817Z stderr F DEBUG:urllib3.connectionpool:https://api.farm.youzim.it:443 "POST /v1/auth/authorize HTTP/1.1" 200 None
2023-09-29T10:51:38.342281408Z stderr F ERROR:routes.requests:Unable to create schedule via HTTP 401: token invalid
2023-09-29T10:51:38.342614794Z stderr F [pid: 15|app: 0|req: 20608/29050] 100.64.6.28 () {74 vars in 1417 bytes} [Fri Sep 29 10:51:38 2023] POST /api/v1/requests/ => generated 0 bytes in 164 msecs (HTTP/1.1 500) 4 headers in 159 bytes (0 switches on core 0)
2023-09-29T10:51:38.342667585Z stdout F 100.64.6.28 - - [29/Sep/2023:10:51:38 +0000] "POST /api/v1/requests/ HTTP/1.1" 500 0 "https://youzim.it/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36 Edg/117.0.2045.43" "67.81.170.42"