Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Plex: Failed to login, Error: No connection adapters were found #104

Open
tejasgadhia opened this issue Sep 26, 2023 · 9 comments
Open

Comments

@tejasgadhia
Copy link

tejasgadhia commented Sep 26, 2023

Describe the bug
Upon initial start, getting this error in my log.

To Reproduce
Steps to reproduce the behavior:
Docker Compose:

  jellyplex-watched:
    image: luigi311/jellyplex-watched:latest
    container_name: jellyplex-watched
    restart: always
    volumes:
      - ${DOCKER_CONF_DIR}/jellyplex-watched:/config
    environment:
      - DRYRUN=True
      - DEBUG=True
      - DEBUG_LEVEL=info
      - RUN_ONLY_ONCE=False
      - SLEEP_DURATION=3600
      - LOGFILE=/config/log.log
      - LIBRARY_MAPPING={"TV Shows":"Television", "TV Shows - Foreign":"TV - Foreign"}
      - USER_MAPPING=
      # - BLACKLIST_LIBRARY=
      # - WHITELIST_LIBRARY=
      # - BLACKLIST_LIBRARY_TYPE=
      # - WHITELIST_LIBRARY_TYPE=
      # - BLACKLIST_USERS=
      # - WHITELIST_USERS=
      - PLEX_BASEURL="http://192.168.1.32:32400"
      - PLEX_TOKEN="XXXXXXXXXX"
      - JELLYFIN_BASEURL="http://192.168.1.36:8096"
      - JELLYFIN_TOKEN="XXXXXXXXXX"
      - SSL_BYPASS=True
      - SYNC_FROM_PLEX_TO_JELLYFIN=True
      - SYNC_FROM_JELLYFIN_TO_PLEX=False
      - SYNC_FROM_PLEX_TO_PLEX=False
      - SYNC_FROM_JELLYFIN_TO_JELLYFIN=False

Expected behavior
Expecting application to start up successfully.

Logs

[ERROR]: Plex: Failed to login, Error: No connection adapters were found for '"http://192.168.1.32:32400"/'
[ERROR]: No connection adapters were found for '"http://192.168.1.32:32400"/'
[ERROR]: Traceback (most recent call last):
  File "/app/src/plex.py", line 400, in login
    plex = PlexServer(baseurl, token, session=self.session)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/plexapi/server.py", line 115, in __init__
    data = self.query(self.key, timeout=self._timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/plexapi/server.py", line 745, in query
    response = method(url, headers=headers, timeout=timeout, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 602, in get
    return self.request("GET", url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 697, in send
    adapter = self.get_adapter(url=request.url)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 794, in get_adapter
    raise InvalidSchema(f"No connection adapters were found for {url!r}")
requests.exceptions.InvalidSchema: No connection adapters were found for '"http://192.168.1.32:32400"/'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/src/main.py", line 382, in main
    main_loop()
  File "/app/src/main.py", line 298, in main_loop
    servers = generate_server_connections()
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/src/main.py", line 89, in generate_server_connections
    Plex(
  File "/app/src/plex.py", line 393, in __init__
    self.plex = self.login(self.baseurl, self.token)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/src/plex.py", line 415, in login
    raise Exception(e)
Exception: No connection adapters were found for '"http://192.168.1.32:32400"/'

Retrying in 3600.0

Type:

  • [ Yes ] Docker
  • [ No ] Native

Additional context

@nebb00
Copy link

nebb00 commented Sep 27, 2023

i got the same issue, but appears to be when i have multiple servers specified. Using compose they you have, and using the .env file.

have you tried removing the quotes on yours?

@luigi311
Copy link
Owner

I think it’s an issue with the compose setup. Might be similar to #97

@nebb00
Copy link

nebb00 commented Sep 27, 2023

I think it’s an issue with the compose setup. Might be similar to #97

I tried using the env file. And had the same error only ever picking up one of the servers. Have two Plex servers.

Tried literally every combo I could think off. "",'',nothing

@luigi311
Copy link
Owner

Did you set docker compose like so? #59 (comment)

@tejasgadhia
Copy link
Author

Did you set docker compose like so? #59 (comment)

I did not try using a separate env file, I was following the template here: https://github.com/luigi311/JellyPlex-Watched/blob/main/docker-compose.yml

Will try an env file and report back.

@nebb00
Copy link

nebb00 commented Sep 27, 2023

Did you set docker compose like so? #59 (comment)

Very similar to the first one. I know it was reading the file. But had the same error as setting via compose

@luigi311
Copy link
Owner

Interesting. I would say just try running it from straight docker for now and I’ll see if I can replicate this again and make some changes. I don’t really use docker compose so its not really tested that often

@nebb00
Copy link

nebb00 commented Sep 27, 2023

Interesting. I would say just try running it from straight docker for now and I’ll see if I can replicate this again and make some changes. I don’t really use docker compose so its not really tested that often

Not sure why the env file was not working for me then. Just wouldn't pick up both Plex servers.

@luigi311
Copy link
Owner

In docker compose i only get this if i add in quotes, so for the baseurls and the tokens do not use any quotes and just put in your url and tokens as is

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants