iv-org / invidious

Invidious is an alternative front-end to YouTube
https://invidious.io
GNU Affero General Public License v3.0
16.19k stars 1.79k forks source link

A selfhosted instance just got unreachable [Bug] SSL_connect: error:0A000086:SSL routines::certificate verify failed (OpenSSL::SSL::Error) #4924

Closed Shahin-rmz closed 1 week ago

Shahin-rmz commented 1 week ago

Describe the bug I have an instance on RPi4 it worked until RPI got turned off. now I get SSL issue, and I can not open any video, and also get Error 520 from my global URL. with local IP I can reach my instance

Steps to Reproduce

Logs Title: SSL_connect: error:0A000086:SSL routines::certificate verify failed (OpenSSL::SSL::Error) Date: 2024-08-24T22:52:03Z Route: /watch?v=F0dJBrFyID8 Version: 2024.04.27-eda7444 @ master

Backtrace

``` SSL_connect: error:0A000086:SSL routines::certificate verify failed (OpenSSL::SSL::Error) from /usr/lib/crystal/core/socket/addrinfo.cr:74:17 in 'io' from /usr/lib/crystal/core/http/request.cr:121:3 in 'send_request' from /usr/lib/crystal/core/http/client.cr:663:37 in '_post_json' from /usr/lib/crystal/core/hash.cr:1185:13 in 'extract_video_info' from /usr/lib/crystal/core/hash.cr:1185:13 in 'fetch_video' from src/invidious/videos.cr:383:13 in 'get_video:region' from src/invidious/routes/watch.cr:55:15 in 'handle' from lib/kemal/src/kemal/route.cr:13:9 in '->' from lib/kemal/src/kemal/config.cr:92:7 in 'call' from /usr/lib/crystal/core/http/server/handler.cr:30:7 in 'call' from /usr/lib/crystal/core/http/server/handler.cr:32:7 in 'call_next' from lib/kemal/src/kemal/filter_handler.cr:21:7 in 'call' from /usr/lib/crystal/core/http/server/handler.cr:30:7 in 'call' from /usr/lib/crystal/core/http/server/handler.cr:32:7 in 'call_next' from src/invidious/helpers/handlers.cr:94:12 in 'call' from /usr/lib/crystal/core/http/server/handler.cr:30:7 in 'call' from /usr/lib/crystal/core/http/server/handler.cr:30:7 in 'call' from /usr/lib/crystal/core/http/server/handler.cr:32:7 in 'call_next' from src/ext/kemal_static_file_handler.cr:106:14 in 'call' from /usr/lib/crystal/core/http/server/handler.cr:30:7 in 'call' from /usr/lib/crystal/core/http/server/handler.cr:30:7 in 'call' from /usr/lib/crystal/core/http/server/handler.cr:30:7 in 'call' from /usr/lib/crystal/core/http/server/request_processor.cr:51:11 in 'handle_client' from /usr/lib/crystal/core/fiber.cr:146:11 in 'run' from ??? ```

Screenshots image

image

Additional context The problem is with SSL I tried deproxyfing Cloudflare and also tried to get another SSL cert but they are not working. Worth mentioning other services on RPI4 are working fine.

Shahin-rmz commented 1 week ago

here is the important log that I've found

invidious_1     | 2024-08-24 23:27:12 UTC [error] get_video: F0dJBrFyID8 : SSL_connect: error:0A000086:SSL routines::certificate verify failed
Shahin-rmz commented 1 week ago

The error was from server level. it was because of the Clock of the server was not synced so the cert robot could not get the new SSL certificate. it has been solved.