New install on Ubuntu 22: cannot get past Plex Pass screen and claiming does not work

Server Version#: plexmediaserver_1.40.4.8679-424562606_amd64
Player Version#: (accessing via localhost:8888/web)

Hello,
New to plex and trying to install plex on a VPS I rent, running Ubuntu 22.04.4 LTS.
Sorry for the elaborate post - I am completely stumped and not sure where to start

What I did initially:

  • download deb file, install it, it does not give any errors
  • checking whether plexmediaserver daemon is running and it is (it is ‘started’ and no errors are mentioned
  • as per the docs, I set up a tunnel to access it on my home PC (running windows 11): ssh -L 8888:127.0.0.1:32400 server2
  • when the tunnel is opened I go to: 127.0.0.1:8888/web
  • I get a welcome screen that mentions how Plex works
  • I then get a second screen with the Plex Pass info
    PROBLEM 1: I cannot close this screen. Pressing the X in the top right corner does not close it, no matter what I do, how long I wait, or what browser I use.
  • Since I could not close this screen, I opened a second tab in my browser where I went to localhost:8888/web again. This gets me past the Plex Pass screen and I drop in Plex
    • the left menu shows More > with a yellow exclamation. I click this one
    • Left menu changes and shows an item for my server (with again a yellow exclamation badge)
    • this pops up a screen that the server is unclaimed with a button to ‘claim it now’
    • I do this, and get another page where I then click ‘claim server’
    • the page tells me that I am not authorized
      PROBLEM 2: I seem to be unable to claim the server even though I am signed in, and the server appears in my account as an ‘authorized device’

(PS: no error messages in syslog, no firewall active)

What I tried then:

  • sudo apt-get remove --purge plexmediaserver to completely start over: same thing.
  • sudo apt-get remove --purge plexmediaserver, removing the server from my ‘authorised devices’ and then start over: same
  • edit Preferences.xml to remove some of the key-value pairs mentioned in other posts and revisited localcost:8888/web: same
  • removed&purged everything, started again, while the ‘Plex Pass’ screen was showing, followed a post to generate a token and use it to try and claim the server. Results of curl below - it gives me a xml results that seem ok (?) but still no luck (no server shows up and I cannot even claim anything anymore)
  • created an entire new Plex user to see if it would be something with my account. Signed out everything everywhere, removed&purged plexserver again, reinstalled it, went to localhost:8888/web and signed in with new account: same problem (so not linked to my account, it seems).
  • started a local vmware instance with an ubuntu 22.04 and installed it there. This I can access so it’s either something with my server or due to the tunneling ???

==== after installing:

PlexMediaServer install: Pre-installation Validation.
PlexMediaServer install: Pre-installation Validation complete.
Unpacking plexmediaserver (1.40.4.8679-424562606) …
Setting up plexmediaserver (1.40.4.8679-424562606) …
PlexMediaServer install: PlexMediaServer-1.40.4.8679-424562606 - Installation starting.
PlexMediaServer install:
PlexMediaServer install: Now installing based on:
PlexMediaServer install: Installation Type: New
PlexMediaServer install: Process Control: systemd
PlexMediaServer install: Plex User: plex
PlexMediaServer install: Plex Group: plex
PlexMediaServer install: Video Group: video
PlexMediaServer install: Metadata Dir: /var/lib/plexmediaserver/Library/Application Support
PlexMediaServer install: Temp Directory: /tmp
PlexMediaServer install: Lang Encoding: en_US.UTF-8
PlexMediaServer install: Processor: AMD EPYC 7443P 24-Core Processor
PlexMediaServer install: Intel i915 Hardware: Not found
PlexMediaServer install: Nvidia GPU card: Not Found
PlexMediaServer install:
PlexMediaServer install: Completing final configuration.
PlexMediaServer install: PlexMediaServer-1.40.4.8679-424562606 - Installation successful. Errors: 0, Warnings: 0

==== claiming using token:
$ curl -X POST "http://127.0.0.1:32400/myplex/claim?token=claim-TOKEN_COPIED_HERE"
returns:

<?xml version="1.0" encoding="UTF-8"?>
<MyPlex authToken="<token removed for post>" username="<username removed for post>" mappingState="mapped" mappingError="" signInState="ok" publicAddress="" publicPort="0" privateAddress="" privatePort="0" subscriptionFeatures="044a1fac-6b55-47d0-9933-25a035709432,04d7d794-b76c-49ef-9184-52f8f1f501ee, .... , server-manager,shared-radio,tuner-sharing,type-first,unsupportedtuners" subscriptionActive="0" subscriptionState="Inactive">
</MyPlex>```

Some VPS’s are blocked.

I see - is there a way I can check this ?

I tried a telnet to port 32400 from another machine which times out; is that supposed to work before the server is claimed and remote access is enabled ?

Restart the server and view the ‘Plex Media Server.log’ file for requests to plex.tv. It could be a general DNS/DNS rebinding failure or your ip could be blocked.

Which provider are you renting your VPS from. Is it Hetzner?

No, a smaller provider in Italy (Prometeus), not Hetzner as far as I know.

Restarted.
Looking through the log I see many successful requests related to certs, stapling,etc. So I guess this means my local instance is talking to plex.tv as expected ?

Eg. this part where it does some token exchange and seems to get the correct username and email address to register with:

Blockquote
5846 Aug 14, 2024 13:57:32.156 [139837484817208] DEBUG - [HttpClient/HCl#7c] HTTP/2.0 (0.2s) 200 response from POST https://plex.tv/api/claim/exchange?token=xxxxxxxxxxxxxxxxxxxxBZQbWy
5847 Aug 14, 2024 13:57:32.156 [139837474048824] DEBUG - [Req#202] MyPlex: Did token exchange for claim (returnCode: 200)
5848 Aug 14, 2024 13:57:32.157 [139837474048824] DEBUG - [Req#202] MyPlex: Stored token xxxxxxxxxxxxxxxxxxxx
5849 Aug 14, 2024 13:57:32.157 [139837474048824] DEBUG - [Req#202] MyPlex: Got a token poked, let’s act on it.
5850 Aug 14, 2024 13:57:32.158 [139837474048824] DEBUG - [Req#202] MyPlex: username is onetwothreesix, login is my_correct_email_address, home is 0, no pin
5851 Aug 14, 2024 13:57:32.159 [139837486926648] DEBUG - [Req#202/HCl#7d] HTTP requesting GET https://plex.tv/api/v2/server/webhooks?X-Plex-Token=xxxxxxxxxxxxxxxxxxxx

But a bit further on:

Blockquote
6008 Aug 14, 2024 13:58:02.459 [139837505997624] VERBOSE - WebSocket: processed 1 frame(s)
6009 Aug 14, 2024 13:58:08.464 [139837505997624] VERBOSE - We didn’t receive any data from 127.0.0.1:50646 in time, dropping connection.
6010 Aug 14, 2024 13:58:08.465 [139837505997624] VERBOSE - Didn’t receive a request from 127.0.0.1:50646: End of file

6131 Aug 14, 2024 14:07:22.162 [139837486926648] DEBUG - [Req#202/ViewStateSync] Starting
6132 Aug 14, 2024 14:07:22.162 [139837486926648] DEBUG - [Req#202/ViewStateSync] Fetching user tokens
6133 Aug 14, 2024 14:07:22.162 [139837486926648] DEBUG - [Req#202/ViewStateSync/HCl#9e] HTTP requesting GET https://plex.tv/api/v2/server/users/services?auth_token=xxxxxxxxxxxxxxxxxxxx
6134 Aug 14, 2024 14:07:22.314 [139837484817208] DEBUG - [HttpClient/HCl#9e] HTTP/2.0 (0.2s) 200 response from GET https://plex.tv/api/v2/server/users/services?auth_token=xxxxxxxxxxxxxxxxxxxx
6135 Aug 14, 2024 14:07:22.316 [139837476158264] DEBUG - [Req#202/ViewStateSync] No user tokens found; stopping

Is this expected ? It looks like this may be the claiming problem ?

1.40.5.8854

Updated to latest version, did clean install of plexmediaserver.
After install, visited local page, clicked away the ‘how plex works screen’, then tried to click away the Plex Pass screen (first want to get it to run…) but it still does not go away. Attaching full logs here
Plex Media Server.log (810.9 KB)

Then opened a second tab, where I can see ‘server2’ (my server) and try to claim it, which does not work: after clicking ‘claim server’ I get a page that I am not authoirized BUT it does show up as an authorized device and there seems to be communication with plex.tv (looking at the logs).
I attached the logs after that point in time as well

Plex Media Server-after claiming.log (883.9 KB)

No idea why I can’t get past the Plex Pass screen nor why the claiming in the second tab does not work.

Maybe these full logs are helpful ?

The IP address of the server is a PUBLIC IP address (37.x.x.x)

PMS expects to be on the LAN.
192.168.x.x, 10.x.x.x, or 172.16.x.x → 172.31.x.x

If you wish to configure the network this way, you must connect via SSH tunnel

e.g ssh -L 8888:127.0.0.1:32400 ip.addr.of.server

and then open browser http://127.0.0.1:8888/web to talk to it through the tunnel.

Yes, that is indeed how I connect (tunnel from my local machine to the remote server and then open a localhost:8888/web (or 127.0.0.1, does not make a difference) to visit the webpage.

Any way you can try an older version say 1.32.8.7639?

Many thanks, yes I can.

I used GitHub - axlecrusher/plex_download_urls: Archive of Plex mediaserver download URLs to find archives of URLS to use and v1.32.8.7639 works out of the box, as advertised!

I then proceeded to install other versions listed to find the one that made a breaking change: 1.40.4.8679 breaks (1.40.1.8227 to 1.40.3.8555 work).