MyPlex: Couldn't get list of access tokens from myPlex

Server Version#: docker; lscr.io/linuxserver/plex:latest
Player Version#: 4.69.1
Total plex newb here, never had a working setup (which is why i cant find the exact server version easily, sorry); I’m running into this issue with access token
@ChuckPa - I followed your advise and am including my logs. Logs.tar.gz (27.9 KB)

The container starts fine and I am able to access the webUI to the setup page, but the setup page eventually gives an error that core plex services failed, which I could see from the docker logs (not included in the tarball)

...
Starting Plex Media Server.                                                                                    
[services.d] done.                                                                                             
Error starting framework core for /usr/lib/plexmediaserver/Resources/Plug-ins-c8bd13540/PlexMovieNew.bundle.   
Error starting framework core for /usr/lib/plexmediaserver/Resources/Plug-ins-c8bd13540/TheMovieDB.bundle.     
Error starting framework core for /usr/lib/plexmediaserver/Resources/Plug-ins-c8bd13540/LocalMedia.bundle.
...

Please let me know if any more info could be useful, and thanks in advance for any help!

@rkyathappala

Thanks for providing the logs with your post.

From looking at your logs, it appears you aren’t giving PMS enough time to complete its initial setup (create the directories, unzip the database, etc) before trying to access it.

In both your logs, you started it and stopped it within 1 minute.

Mar 02, 2022 01:17:35.742 [0x7ffa895d2b38] INFO - Plex Media Server v1.25.6.5577-c8bd13540 - Docker Docker Container (LinuxServer.io) x86_64 - build: linux-x86_64 debian - GMT -05:00
Mar 02, 2022 01:17:35.743 [0x7ffa895d2b38] INFO - Linux version: 5.4.0-100-generic, language: en-US
Mar 02, 2022 01:17:35.743 [0x7ffa895d2b38] INFO - Processor: 4-core        Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz
Mar 02, 2022 01:17:35.743 [0x7ffa895d2b38] INFO - Compiler is - Clang 11.0.1 (https://plex.tv b587490162c22e078c314e3f7dc560c691d126aa)
Mar 02, 2022 01:17:35.743 [0x7ffa895d2b38] INFO - /usr/lib/plexmediaserver/Plex Media Server
Mar 02, 2022 01:17:35.743 [0x7ffa8ccc1ac8] DEBUG - BPQ: [Idle] -> [Starting]

stopping at

Mar 02, 2022 01:17:51.816 [0x7ffa8ccc1ac8] DEBUG - Database: Shutting down.
Mar 02, 2022 01:17:51.873 [0x7ffa887acb38] INFO - Network Service: Abandoning advertise socket, it was closed.
Mar 02, 2022 01:17:51.952 [0x7ffa8ccc1ac8] DEBUG - Database: Shutting down.

You need to be more patient with it.

Your CPU (i5-3230M), which is 9 years old, isn’t that fast. It has somewhat less performance than most NAS CPUs now.

Recommend erasing the container contents (what’s under the /config directory),
Start the container again.
Wait 2-3 minutes for it to stabilize before accessing it

@ChuckPa Thanks for the quick attention! When I sent the last logs I had removed the config dir and let run for 2 min uninterrupted (checked the docker logs) before stopping the container and taring the Logs dir, I didn’t manually disable the database
OK, so this time I deleted the config dir, and actually did a full image removal and repulled. I started the container detached, but followed the logs and still immediately see the Error starting framework core for /usr/lib/plexmediaser.... If I look in Logs/Plex Media Server.log, I see the error in the topic title. If I go to Logs/PMS Plugin Logs/ and each of the named core services is giving this error when I tail the log

  File "/usr/lib/plexmediaserver/Resources/Python/python27.zip/urllib2.py", line 429, in open                  
    response = self._open(req, data)                                                                           
  File "/usr/lib/plexmediaserver/Resources/Python/python27.zip/urllib2.py", line 447, in _open                 
    '_open', req)                                                                                              
  File "/usr/lib/plexmediaserver/Resources/Python/python27.zip/urllib2.py", line 407, in _call_chain           
    result = func(*args)                                                                                       
  File "/usr/lib/plexmediaserver/Resources/Python/python27.zip/urllib2.py", line 1228, in http_open            
    return self.do_open(httplib.HTTPConnection, req)                                                           
  File "/usr/lib/plexmediaserver/Resources/Python/python27.zip/urllib2.py", line 1198, in do_open              
    raise URLError(err)                                                                                        
URLError: <urlopen error [Errno 111] Connection refused>

I can see you’ve personally dealt with this before, and I’m reading through to see if you’ve already solved this - thanks for the help; past and present!

And here are the updated logs from about 10 mins Logs.2.tar.gz (58.0 KB)

For context since I think this is likely network related; I am running container in docker bridge network so it is connected to my reverse proxy (nginx proxy manager)

Now you’re throttled.

Mar 02, 2022 11:16:18.114 [0x7feda013eb38] DEBUG - [HttpClient] HTTP/2.0 (0.4s) 422 response from POST https://plex.tv/servers.xml?auth_token=xxxxxxxxxxxxxxxxxxxx
Mar 02, 2022 11:16:18.114 [0x7feda0161b38] DEBUG - MyPlex: Published Mapping State response was 422

You created and deleted multiple containers.
Those all count against your daily quota.

I removed the 5 partially deleted servers.
The current container remains.

To clear your current throttling, I reset your certificate.

All you need to do is restart the server and give it a bit.

You need to keep an eye on your networking,
This contributed to being throttled. (12 retries is excessive)

Mar 02, 2022 10:58:48.670 [0x7feda013eb38] DEBUG - [HttpClient] HTTP/2.0 (0.1s) 200 response from GET https://plex.tv/api/v2/devices/3244ec06fbf0ebaccb528446799e48ede76ae829/certificate/download (reused)
Mar 02, 2022 10:58:48.671 [0x7fed9fe38b38] DEBUG - CERT: Downloaded new cert from plex.tv; took 12 tries.
Mar 02, 2022 10:58:48.678 [0x7fed9fe38b38] DEBUG - MyPlex: Updating device connections (from timer: 0)

@ChuckPa Thanks! But I am not sure I understand fully - so I get that me deleting and recreating containers maxxed out the quota of servers i am allowed, so am I supposed to be restarting containers for testing/setup? cus that hasn’t allowed env variables (PLEX_CLAIM) to be reset in container

Also I restarted the container, waited a few minutes then accessed from local browser and am still seeing the same messages

Stop the container.
Grab the logs (tar.gz)
attach here.

Let me see where you’re at.

FYI: Proxies and Plex do not play well unless PERFECTLY configured.
I use Pfsense instead of a Proxy. It made my life so much easier

THanks for all the help!
Logs.3.tar.gz (107.6 KB)

I’ve heard only good things about pfsense, and may give it a try in the future. I am currently just in a “proof-of-concept” phase for an application server. I am testing stuff out on this old laptop I have and plan to repurpose my less-old gaming rig to run this and other apps once i know what i’m doing.

Port 8080???

Mar 02, 2022 11:53:34.763 [0x7f83c5faab38] DEBUG - WebSocket: Performing handshake from origin http://localhost:8080

What is 192.168.64.1 ? Is that the proxy server at the head of the subnet?

For academic purposes, have you considered setting up a container with host networking solely for the purpose of getting the container established?

Asking this because, once the server is defined using host networking, by keeping the /config data, you can re-instantiate the already-existing, claimed and working server by spinning a new container definition with different networking.

This will allow you to work with your networking configuration without blowing through so many downstream server issues.

@ChuckPa I think that port 8080 is from my ssh tunnel so I can access to the container directly, at one point I thought there was a permissions issue…

I did try host networking, but it never displayed a webui. and the docker logs looked the same with the Error starting framework core ...
Perhaps it had already been throttled? I didn’t check the logs too thoroughly at that time

If I start a new container now in host mode so that I can share the logs, will I be throttled?

The logs you just gave me are not throttled.

Be careful how you recreate the container.

  1. Remove the container
  2. DO NOT purge the data. (I presume /config is mapped to a persistent location in the file system)
  3. Create new container with host networking using the existing /config
  4. Open it via http://127.0.0.1 (See below)

The server / host is having a lot of networking problems in general. This is what we can hopefully isolate / resolve by going ‘host’ mode.

When SSH tunnel is done correctly, PMS will not know it’s tunneled. SSH/sshd handle all port translations transparently. Port 8080 would not appear in any logs.

The ideal way of doing this (8888 is the local port, 32400 is the remote)

ssh -L  8888:127.0.0.1:32400   ip.addr.of.host

Note here I expressly use 127.0.0.1. I want absolute control over which adapter and protocol is being used on the other end of the tunnel to PMS port 32400.

Sorry for the delayed response, I started a plex container with host networking, but forgot to cp config the first time (my b). Here are those logs Logs.4.tar.gz (39.3 KB)

So I removed container, removed/replaced config dir and started. I configured PuTTy with the settings you explained and connected to tunnel on browser localhost:8888. I again got the same core services error message.
Logs.5.tar.gz (127.4 KB)

I was AFK for a while too. No worries.

What is the IP address you’re accessing 192.168.64.4 from?

Its my windows laptop, same LAN.

when on the same subnet (RFC-1918 compliant), and using HOST networking,
you can open the Plex port directly in the browser (http://ip.addr.of.host:32400/web)

No need to SSH or anything.

This is why I suggested minimizing the network layer to the base host for if the base host isn’t going to work, something else in the LAN has problems.

Hey there! So is there anything else I could try with host networking setup that would make my plex install work?

This is my compose file for both bridge and network:

#Network Bridge
version: "2.4"

services:
  plex:
    image: lscr.io/linuxserver/plex
    container_name: plex
    networks:
      - myNet
    ports:
      - 32400:32400
#      - 1900:1900/udp
      - 3005:3005
#      - 5353:5353/udp
      - 8324:8324
      - 32410:32410/udp
      - 32412:32412/udp
      - 32413:32413/udp
      - 32414:32414/udp
      - 32469:32469
    environment:
      - TZ=America/New_York
      - PLEX_CLAIM=claim-UyUdzaXQaVpU2bf-zUL7
      - PUID=1001
      - PGID=1001
      - VERSION=docker
    volumes:
      - ./config:/config
      - /media/plex:/media
    restart: unless-stopped

networks:
  myNet:
    external: true
    name: my-net
#Network Host
version: "2.4"

services:
  plex:
    image: lscr.io/linuxserver/plex
    container_name: plex
    network_mode: host
    ports:
      - 32400:32400
#      - 1900:1900/udp
      - 3005:3005
#      - 5353:5353/udp
      - 8324:8324
      - 32410:32410/udp
      - 32412:32412/udp
      - 32413:32413/udp
      - 32414:32414/udp
      - 32469:32469
    environment:
      - TZ=America/New_York
      - PLEX_CLAIM=claim-JDyZJzysznL6FoWUeieX
      - PUID=1001
      - PGID=1001
      - VERSION=docker
    volumes:
      - ./config:/config
      - /media/plex:/media
    restart: unless-stopped

Why are you specifying ports when using host mode networking?

Here:

This is my docker setup. I don’t use compose. i let run do it.

[chuck@lizum docker.2001]$ cat dockerplex
sudo docker stop plex
sudo docker rm plex

# Remove old image if exists
Image="$(sudo docker images | grep -i plex | awk '{print $3}')"

if [ "$Image" != "" ]; then

  sudo docker stop plex
  sudo docker stop plex
  sudo docker rm plex
  sudo docker rmi -f $Image
fi


sudo docker run \
-d \
--name plex \
--network=host \
-e PLEX_CLAIM="claim-2rZSB3JW2t56cJngN9kt" \
-e TZ="EST" \
-e LANG="en_US.UTF-8" \
-e PLEX_UID=1000 \
-e PLEX_GID=1000 \
-e PUID=1000 \
-e PGID=1000 \
-h dockerplex \
-v /sata/dockerplex:/config \
-v /sata/dockerplex/tmp:/tmp \
-v /sata/dockerplex/transcode:/transcode \
-v /vie:/data \
--device=/dev/dri:/dev/dri \
plexinc/pms-docker:plexpass

#docker start plex
#docker update --restart=unless-stopped plex
[chuck@lizum docker.2002]$

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.