Cannot claim newly installed PLEX Media Server

Server Version: 1.24.5.5173-8dcc73a59_amd64:
Player Version#:
I cannot claim my Plex Media Server.
It has been freshly installed on headless Debian 10 Buster VM.

When trying to connect to WebGUI via SSH-Tunnel webpage just doesnt load.
I use putty to establish the tunnel like this: Using Putty to claim your Plex Server - QuickBox.IO

Netstat on the system tells the following:
tcp 0 0 127.0.0.1:32600 0.0.0.0:* LISTEN 26729/Plex Tuner Se
tcp 0 0 127.0.0.1:39097 0.0.0.0:* LISTEN 26729/Plex Tuner Se
tcp 0 0 127.0.0.1:44987 0.0.0.0:* LISTEN 26729/Plex Tuner Se
tcp 0 0 127.0.0.1:39751 0.0.0.0:* LISTEN 26729/Plex Tuner Se
tcp 0 0 127.0.0.1:43949 0.0.0.0:* LISTEN 26639/Plex Plug-in
tcp 0 0 127.0.0.1:32401 0.0.0.0:* LISTEN 26619/Plex Media Se
tcp6 0 0 :::32400 :::* LISTEN 26619/Plex Media Se

Firewall has been configured according to required ports. Also disabled it completly.

Does anyone have an idea how i’d be able to claim my server?

Yep:

  1. SSH into it (regular) let that sit there with Plex running for a minute
  2. Back in the browser: http://plex.tv/claim
  3. COPY the claim token to your browser
  4. Back to the SSH session

curl -X POST 'http://127.0.0.1:32400/myplex/claim?token=PASTE_TOKEN_HERE'

It will look like
curl -X POST 'http://127.0.0.1:32400/myplex/claim?token=claim-xxxxxxxxxx'

Hit enter,
Let PMS and Plex.tv negotiate with that token.

In about 20-30 seconds (maybe less) It will respond with your Feature flags.

Job done :slight_smile:

1 Like

I got the idea.

Unfortunately I get this error:
curl: (7) Failed to connect to 127.0.0.1 port 32400: Die Wartezeit fĂĽr die Verbindung ist abgelaufen
which essentially means “The response time for the connections has expired”

Does this mean my plex server isnt running properly?

@Shin

If it can’t connect to loopback, There’s a bigger issue.

Stop Plex.

Make a tar.gz of the Logs directory please and attach it.

Thanks in advcance!
log.tar.gz (61.3 KB)

Thanks for the logs.

Easily found.

CURL error 6 = DNS lookup failure

Nov 03, 2021 19:53:52.458 [0x7ff48c220b38] ERROR - Error issuing curl_easy_perform(handle): 28
Nov 03, 2021 19:53:52.458 [0x7ff48c220b38] DEBUG - HTTP simulating 408 after curl timeout
Nov 03, 2021 19:53:52.458 [0x7ff48c220b38] DEBUG - Grabber: Failed to retrieve device data
Nov 03, 2021 19:53:58.961 [0x7ff48c60eb38] ERROR - [MediaProviderManager] Error issuing curl_easy_perform(handle): 6
Nov 03, 2021 19:54:00.497 [0x7ff48c2f6b38] ERROR - Error issuing curl_easy_perform(handle): 6
Nov 03, 2021 19:54:00.497 [0x7ff48c2f6b38] WARN - HTTP error requesting GET https://plex.tv/api/v2/user/privacy?X-Plex-Token=xxxxxxxxxxxxxxxxxxxxe host name) (getaddrinfo() thread failed to start
)
Nov 03, 2021 19:54:00.497 [0x7ff48c5ebb38] ERROR - Error issuing curl_easy_perform(handle): 6
Nov 03, 2021 19:54:00.497 [0x7ff48c5ebb38] WARN - HTTP error requesting GET https://plex.tv/api/photos/profile (6, Couldn't resolve host name) (getaddrinfo() thread failed to start
)
Nov 03, 2021 19:54:00.497 [0x7ff48c2f6b38] WARN - [Analytics] Couldn't get analytics privacy settings. Trying again soon.
Nov 03, 2021 19:54:00.497 [0x7ff48c5ebb38] ERROR - AutoTagging: unable to retrieve updated word lists
Nov 03, 2021 19:54:00.497 [0x7ff48c2f6b38] DEBUG - Running database fix-ups.
Nov 03, 2021 19:54:00.498 [0x7ff48c2f6b38] DEBUG - Database Fixups: Destroyed 0 transient items.

I figured that out. Thanks for the hint!

I’ve now received content when entering the curl command.
Something like this:

<?xml version="1.0" encoding="UTF-8"?>

Unfortunately the new plex server sint shwoing up in my account yet.
Is there anything else I need to do ?

@Shin

Did you add /web to the end of the browser URL ?

Looks like you didn’t

It took quite a while until i could reach the server via ssh.-tunnel.
But it still isnt showing up in my plex account.

When i browse to http://localhost:32400/web/
i need to select my user.
After that it tells me “No Permission - You do not have the permission to access this server” (translated from german)

the final URL is http://localhost:32400/web/index.html#!/setup/RANDOMTOKENHERE
Any ideas?

OK. Let’s take it back down to the basics (sign it out and then bring it back in)

  1. Open the SSH tunnel to the host

  2. once there, as root

  3. Stop Plex

  4. Edit Preferences.xml

  5. Carefully remove the Name="Value" pairs for

  • PlexOnlineUsername
  • PlexOnlineEmail
  • PlexOnlineToken
  • PlexOnlineHome (this may or may not exist)
  1. Save the file

  2. Start Plex

  3. Open a fresh browser tab to https://plex.tv/claim

  4. It will present you with a claim token – COPY it to your browser (the button)

  5. within the next 5 minutes, in the SSH window, type

curl -X POST 'http://127.0.0.1:32400/myplex/claim?token=PASTE_TOKEN_HERE'

  1. Again, It will look like
    curl -X POST 'http://127.0.0.1:32400/myplex/claim?token=claim-xxxxxxxxxx'

  2. Hit enter and let it communicate with Plex and Plex.tv

  3. It will return ERROR (you still have host network problems) or a list of Feature Flags

  4. Go back to the browser, open a new tab to https://app.plex.tv

  5. Your host should be there and read to add library sections.

That’s a nope.

I got the feature flags right away with content such as:

MyPlex authToken=“THISISATOKEN” username="my@mail.com" mappingState=“mapped” mappingError="" signInState=“ok” publicAddress="" publicPort=“0” privateAddress="" privatePort=“0” subscriptionFeatures=“STUFFHERE” subscriptionActive=“1” subscriptionState=“Active”/MyPlex

On https://app.plex.tv/ there is just my regular plex app screen. I relogged an retried.
After oopening a SSH-Tunnel I still get that “No permission” error when trying to acces localhost:32400/web

:frowning:

@Shin

If you got the feature flags immediately – that’s wrong. There should be a 10-15 second delay while it renegotiates new credentials. That tells me it didn’t negotiate new credentials. ( the server you were working on still had username, password, token, and email )

I see a few servers on your account. Which server are we dealing with here?

I completely removed the attributes from preferences.xml whilest plex server is stopped.
I just tried again and received the feature flags as soon as 2-3 seconds after send the cURL command.

I got 2 servers connected already the third I’m trying to claim r ight now is not listed in my plex app yet.

@Shin

On the hosts claimed, Please verify the contents of Preferences.xml after claiming.

Something isn’t right… It’s going to be something silly too.

Everything owned by the plex usernane?

You did stop plex before making the edits then restarted after ?

I can’t see anything wrong. I can even see “ProcessedMachineIdentifier” being shown in URL when entering initial setup mode via http://localhost:32400/web/index.html#!/setup/

Formatting and Syntax of preferences.xml look fine to me too. :confused:

Are you typing the URL http://localhost:32400/web/index.html#!/setup/ or is Plex echoing it?

SSH tunnel should be :

  1. ssh -L 8888:127.0.0.1:32400 ip.addr.of.host
  2. In local browser: http://127.0.0.1:8888/web

I tried ssh -L 8888:127.0.0.1:32400 ip.addr.of.host and ssh -L 32400:127.0.0.1:32400 ip.addr.of.host
Although it didnt work then. I now get setup from one of my already existing (and claimed) servers.

I dont know what’s going on here :confused:

SIgn out of Plex/web – Open an Incognito window

In that incognito window: http://127.0.0.1:8888/web

You need to fool Plex/web (it’s annoyingly too smart for its own good)

I did the following:

  1. Cleared everything in Google Chrome via Ctrl + Shift + Del
  2. Logged out of Plex Desktop App for Windows
  3. SSH-Tunnel ssh -L 8888:127.0.0.1:32400 ip.addr.of.host via puTTy
  4. Opened an incognito window in Google Chrome
  5. Navigated to http://127.0.0.1:8888/web in that new window
  6. I get redirected to “http://127.0.0.1:8888/web/index.html#!/setup/TOKENHERE”
  7. I get redirected to “https://app.plex.tv/auth” for login
  8. Logged in with the same user I got the claim-token with
  9. I get redirected to “http://127.0.0.1:8888/web/index.html#!/login?pinID=IDHERE”
  10. I get redirected to “http://127.0.0.1:8888/web/index.html#!/”

Result: I can see my existing Plex Media Servers and running series and movies. But still no setup for the new server. Not sure how this is even possible :confused:

I’m sorry this takes so long. I’ve never had so much trouble configuring a new plex instance :S

1 Like

I finally solved it.
Something went wrong when installing PLEX.

I’ve completly uninstalled Plex Media Server and reintsalled it freshly.
Configuration via SSH-:Tunnel worked like a charme.

Thanks for your assistance. I appreciate the fact that Plex Mods are this actively helping!
This threat can be marked as solved :slight_smile:

Have a good one.