mdhiggins / PlexAutoSkip

Automatically skip content in Plex
MIT License
198 stars 11 forks source link

Error with cache somewhere #45

Closed powerdude closed 1 year ago

powerdude commented 1 year ago

Hi, I keep getting an error due a server/port I used and later removed. It seems to still be cached somewhere and I'm not sure where. Here are the errors I get:

2023-04-22 17:28:03 - __main__ - INFO - Seeking Plex for Android (Mobile) player playing 5 [21607] (Food Wars! Shokugeki no Soma s05e04 - The Last Supper) Galaxy S22 Ultra|d70303e90b683328-com-plexapp-android from 115286 to 158033
2023-04-22 17:28:03 - __main__ - ERROR - Exception, removing from cache to prevent false triggers, will be restored with next sync
Traceback (most recent call last):
  File "/usr/local/pas/venv/lib/python3.10/site-packages/urllib3/connection.py", line 174, in _new_conn
    conn = connection.create_connection(
  File "/usr/local/pas/venv/lib/python3.10/site-packages/urllib3/util/connection.py", line 95, in create_connection
    raise err
  File "/usr/local/pas/venv/lib/python3.10/site-packages/urllib3/util/connection.py", line 85, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/pas/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/pas/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 398, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/local/pas/venv/lib/python3.10/site-packages/urllib3/connection.py", line 244, in request
    super(HTTPConnection, self).request(method, url, body=body, headers=headers)
  File "/usr/lib/python3.10/http/client.py", line 1283, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1329, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1278, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1038, in _send_output
    self.send(msg)
  File "/usr/lib/python3.10/http/client.py", line 976, in send
    self.connect()
  File "/usr/local/pas/venv/lib/python3.10/site-packages/urllib3/connection.py", line 205, in connect
    conn = self._new_conn()
  File "/usr/local/pas/venv/lib/python3.10/site-packages/urllib3/connection.py", line 186, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f2a9ebfb6d0>: Failed to establish a new connection: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/pas/venv/lib/python3.10/site-packages/requests/adapters.py", line 489, in send
    resp = conn.urlopen(
  File "/usr/local/pas/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen
    retries = retries.increment(
  File "/usr/local/pas/venv/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='x.x.x.x', port=32500): Max retries exceeded with url: /player/playback/seekTo?commandID=1&offset=158033&type=video (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f2a9ebfb6d0>: Failed to establish a new connection: [Errno 111] Connection refused'))
mdhiggins commented 1 year ago

This is the player that's refusing the connection not the server. Nothing is cached

Do you have advertise as player enabled?

powerdude commented 1 year ago

There isn't a player. I created a new plex docker server with a tag that has the recommended version for this to work. I configured that server to expose 32400 as 32500. I've since removed the container and disconnected the server from my plex account. So it is no longer around and not sure how PAS is getting that port number now.

mdhiggins commented 1 year ago

That same port is used to communicate with the player specifically for Plex for Android which your logs indicate is where the failed is occurring. It's when it goes to talk to the player not the server that it gets rejected.