RemiRigal / Plex-Auto-Languages

Automated language selection for Plex TV Shows !
MIT License
408 stars 15 forks source link

Alert listener had an unexpected error #98

Open Nakroma opened 2 months ago

Nakroma commented 2 months ago

Hello, I'm trying to run this on a Unraid NAS with required secure connections enabled. I'm using the newest remirigal/plex-auto-languages and plexinc/pms-docker apps available from the community apps section.

I first tried setting https://<my_local_plex_ip>:32400 as PLEX_URL, however that didn't work for connecting (I assume because of the secure connections and the local ip doesn't have a real certificate). So I currently have it set as https://<numbers>.<long_string>.plex.direct:15419 (which is what you get when you access the XML from plex.tv). This works for connecting at least.

However, I now get the following error when starting the app, and I don't really know what to look for with this:

2024-05-08 13:15:03,911 [INFO] Setting value of parameter PLEX_URL from environment variable
2024-05-08 13:15:03,912 [INFO] Setting value of parameter PLEX_TOKEN from environment variable
2024-05-08 13:15:03,912 [INFO] Setting value of parameter DEBUG from environment variable
2024-05-08 13:15:03,912 [INFO] The provided configuration has been successfully validated
2024-05-08 13:15:03,912 [DEBUG] Debug mode enabled
2024-05-08 13:15:03,912 [INFO] Starting scheduler
2024-05-08 13:15:04,175 [INFO] Successfully connected as user '<redacted>' (id: 1)
2024-05-08 13:15:04,176 [DEBUG] [Cache] Loading server cache from file
2024-05-08 13:15:04,176 [DEBUG] Starting alert processing thread
2024-05-08 13:15:04,176 [INFO] Starting alert listener
2024-05-08 13:15:09,181 [ERROR] Alert listener had an unexpected error
2024-05-08 13:15:09,181 [ERROR] [Errno -3] Try again
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/websocket/_http.py", line 155, in _get_addrinfo_list
    addrinfo_list = socket.getaddrinfo(
  File "/usr/local/lib/python3.8/socket.py", line 918, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/websocket/_app.py", line 412, in setSock
    self.sock.connect(
  File "/usr/local/lib/python3.8/site-packages/websocket/_core.py", line 249, in connect
    self.sock, addrs = connect(url, self.sock_opt, proxy_info(**options),
  File "/usr/local/lib/python3.8/site-packages/websocket/_http.py", line 122, in connect
    addrinfo_list, need_tunnel, auth = _get_addrinfo_list(
  File "/usr/local/lib/python3.8/site-packages/websocket/_http.py", line 167, in _get_addrinfo_list
    raise WebSocketAddressException(e)
websocket._exceptions.WebSocketAddressException: [Errno -3] Try again
2024-05-08 13:15:10,182 [DEBUG] [Cache] Saving server cache to file
2024-05-08 13:15:11,177 [DEBUG] Stopping alert processing thread
2024-05-08 13:15:12,179 [INFO] Trying to restore the connection to the Plex server...
2024-05-08 13:15:12,338 [INFO] Successfully connected as user '<redacted>' (id: 1)
2024-05-08 13:15:12,338 [DEBUG] [Cache] Loading server cache from file
2024-05-08 13:15:12,339 [DEBUG] Starting alert processing thread
2024-05-08 13:15:12,339 [INFO] Starting alert listener
2024-05-08 13:15:16,316 [INFO] Received SIGINT or SIGTERM, stopping gracefully
2024-05-08 13:15:16,342 [DEBUG] [Cache] Saving server cache to file
2024-05-08 13:15:17,340 [DEBUG] Stopping alert processing thread
2024-05-08 13:15:17,340 [INFO] Stopping scheduler

after that it keeps trying to reconnect and restart the alert-listener, resulting in the same error over and over. Any ideas on this?