Fresh Install - Unable to Claim (Ubuntu)

I reinstalled plex after a server crash, and ran into problems with the initial setup. I can not get through the first steps (after defining a friendly name and click next). I’ve included the errors I believe are most useful in the log.

Please note, I’ve tried the github script to claim the server manually, but I don’t see the server listed when logged in.

Server Version#: 1.32.5.7349-8f424887
OS: Ubuntu 22.04

Sep 13, 2023 20:46:43.548 [140485865143096] DEBUG - [Req#d4/HCl#4d] HTTP requesting POST https://plex.tv/servers.xml?auth_token=xxxxxxxxxxxxxxxxxxxx
Sep 13, 2023 20:46:43.608 [140485905910584] DEBUG - [HttpClient/HCl#4d] HTTP/2.0 (0.1s) 429 response from POST https://plex.tv/servers.xml?auth_token=xxxxxxxxxxxxxxxxxxxx (reused)
Sep 13, 2023 20:46:43.609 [140485865143096] DEBUG - [Req#d4] MyPlex: Published Mapping State response was 429
Sep 13, 2023 20:46:43.609 [140485865143096] WARN - [Req#d4] MyPlex: Invalid response when mapping state (code=429):
Sep 13, 2023 20:46:43.609 [140485865143096] DEBUG - [Req#d4] MyPlex: updating mapped state - current state: ‘Mapped - Not Published’
Sep 13, 2023 20:46:43.609 [140485865143096] DEBUG - [Req#d4] MyPlex: mapping state set to ‘Mapped - Not Published (Bad Response)’.
Sep 13, 2023 20:46:43.609 [140485865143096] DEBUG - [Req#d4] MyPlex: Updating device connections (from timer: 0)

Here is my latest try with more details.

Sep 14, 2023 08:41:01.975 [140293488458552] DEBUG - [Req#5b] MyPlex: Sending Server Info to myPlex (user=my@email.address, ip=, port=0)
Sep 14, 2023 08:41:02.028 [140293499013944] DEBUG - [HttpClient/HCl#2c] HTTP/2.0 (0.1s) 429 response from POST https://plex.tv/servers.xml?auth_token=xxxxxxxxxxxxxxxxxxxx (reused)
Sep 14, 2023 08:41:02.028 [140293488458552] DEBUG - [Req#5b] MyPlex: Published Mapping State response was 429
Sep 14, 2023 08:41:02.028 [140293488458552] WARN - [Req#5b] MyPlex: Invalid response when mapping state (code=429): 
Sep 14, 2023 08:41:02.028 [140293488458552] DEBUG - [Req#5b] MyPlex: updating mapped state - current state: 'Not Mapped'
Sep 14, 2023 08:41:02.028 [140293488458552] DEBUG - [Req#5b] MyPlex: mapping state set to 'Not Mapped'.
Sep 14, 2023 08:41:02.028 [140293488458552] DEBUG - [Req#5b] MyPlex: Updating device connections (from timer: 0)
Sep 14, 2023 08:41:02.028 [140293488458552] DEBUG - [Req#5b/HCl#2e] HTTP requesting PUT https://plex.tv/devices/<removed>?Connection[][uri]=http://1xx.xxx.xxx.xxx:32400&httpsEnabled=0&httpsRequired=0&dnsRebindingProtection=0&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx
Sep 14, 2023 08:41:02.081 [140293499013944] DEBUG - [HttpClient/HCl#2e] HTTP/2.0 (0.1s) 200 response from PUT https://plex.tv/devices/<removed>?Connection[][uri]=http://1xx.xxx.xxx.xxx:32400&httpsEnabled=0&httpsRequired=0&dnsRebindingProtection=0&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx (reused)
Sep 14, 2023 08:41:02.082 [140293488458552] DEBUG - [Req#5b] CERT: Version mismatch, fetching a new one.
Sep 14, 2023 08:41:02.084 [140293488458552] ERROR - [Req#5b] PKCS12_parse failed: error:11800071:PKCS12 routines::mac verify failure
Sep 14, 2023 08:41:02.084 [140293488458552] DEBUG - [Req#5b] CERT: Unable to parse existing certificate, fetching a new one.
Sep 14, 2023 08:41:02.084 [140293488458552] DEBUG - [Req#5b/HCl#2f] HTTP requesting GET https://plex.tv/api/v2/devices/<removed>/certificate/subject
Sep 14, 2023 08:41:02.139 [140293499013944] DEBUG - [HttpClient/HCl#2f] HTTP/2.0 (0.1s) 200 response from GET https://plex.tv/api/v2/devices/<removed>/certificate/subject (reused)
Sep 14, 2023 08:41:02.343 [140293488458552] DEBUG - [Req#5b/HCl#30] HTTP requesting PUT https://plex.tv/api/v2/devices/<removed>/certificate/csr?reason=unreadable&invalidIn=0
Sep 14, 2023 08:41:02.481 [140293499013944] DEBUG - [HttpClient/HCl#30] HTTP/2.0 (0.1s) 204 response from PUT https://plex.tv/api/v2/devices/<removed>/certificate/csr?reason=unreadable&invalidIn=0 (reused)
Sep 14, 2023 08:41:02.481 [140293488458552] DEBUG - [Req#5b/HCl#31] HTTP requesting GET https://plex.tv/api/v2/devices/<removed>/certificate/download
Sep 14, 2023 08:41:02.545 [140293499013944] DEBUG - [HttpClient/HCl#31] HTTP/2.0 (0.1s) 202 response from GET https://plex.tv/api/v2/devices/<removed>/certificate/download (reused)
Sep 14, 2023 08:41:03.545 [140293488458552] DEBUG - [Req#5b/HCl#32] HTTP requesting GET https://plex.tv/api/v2/devices/<removed>/certificate/download
Sep 14, 2023 08:41:03.593 [140293499013944] DEBUG - [HttpClient/HCl#32] HTTP/2.0 (0.0s) 202 response from GET https://plex.tv/api/v2/devices/<removed>/certificate/download (reused)
Sep 14, 2023 08:41:04.593 [140293488458552] DEBUG - [Req#5b/HCl#33] HTTP requesting GET https://plex.tv/api/v2/devices/<removed>/certificate/download
Sep 14, 2023 08:41:04.638 [140293499013944] DEBUG - [HttpClient/HCl#33] HTTP/2.0 (0.0s) 202 response from GET https://plex.tv/api/v2/devices/<removed>/certificate/download (reused)
Sep 14, 2023 08:41:05.638 [140293488458552] DEBUG - [Req#5b/HCl#34] HTTP requesting GET https://plex.tv/api/v2/devices/<removed>/certificate/download
Sep 14, 2023 08:41:05.689 [140293499013944] DEBUG - [HttpClient/HCl#34] HTTP/2.0 (0.1s) 202 response from GET https://plex.tv/api/v2/devices/<removed>/certificate/download (reused)
Sep 14, 2023 08:41:06.657 [140293459532600] DEBUG - [Req#5b/PubsubServerManager/process/HCl#35] HTTP requesting GET https://plex.tv/services/pubsub/servers
Sep 14, 2023 08:41:06.689 [140293488458552] DEBUG - [Req#5b/HCl#36] HTTP requesting GET https://plex.tv/api/v2/devices/<removed>/certificate/download
Sep 14, 2023 08:41:06.704 [140293499013944] DEBUG - [HttpClient/HCl#35] HTTP/2.0 (0.0s) 200 response from GET https://plex.tv/services/pubsub/servers (reused)
Sep 14, 2023 08:41:06.735 [140293499013944] DEBUG - [HttpClient/HCl#36] HTTP/2.0 (0.0s) 202 response from GET https://plex.tv/api/v2/devices/<removed>/certificate/download (reused)
Sep 14, 2023 08:41:07.474 [140293459532600] DEBUG - [Req#5b/PubsubServerManager/process] Time to connect to pubsub.plex.tv was 23 ms.
Sep 14, 2023 08:41:07.474 [140293459532600] DEBUG - [Req#5b/PubsubServerManager/process] Time to connect to 139.162.134.123 was 23 ms.
Sep 14, 2023 08:41:07.474 [140293459532600] DEBUG - [Req#5b/PubsubServerManager/process] Time to connect to 109.237.24.233 was 73 ms.
Sep 14, 2023 08:41:07.474 [140293459532600] DEBUG - [Req#5b/PubsubServerManager/process] Time to connect to 172.104.213.234 was 290 ms.
Sep 14, 2023 08:41:07.474 [140293459532600] DEBUG - [Req#5b/PubsubServerManager/process] Time to connect to 172.105.97.53 was 328 ms.
Sep 14, 2023 08:41:07.474 [140293459532600] DEBUG - [Req#5b/PubsubServerManager/process] Time to connect to 45.79.211.188 was 352 ms.
Sep 14, 2023 08:41:07.474 [140293459532600] DEBUG - [Req#5b/PubsubServerManager/process] Time to connect to 72.14.179.64 was 393 ms.
Sep 14, 2023 08:41:07.474 [140293459532600] DEBUG - [Req#5b/PubsubServerManager/process] Time to connect to 45.56.82.212 was 498 ms.
Sep 14, 2023 08:41:07.474 [140293459532600] DEBUG - [Req#5b/PubsubServerManager/process] Time to connect to 172.105.203.197 was 763 ms.
Sep 14, 2023 08:41:07.474 [140293459532600] DEBUG - [Req#5b/PubsubServerManager/process] Time to connect to 172.104.44.222 was 768 ms.
Sep 14, 2023 08:41:07.474 [140293459532600] DEBUG - [Req#5b/PubsubServerManager/process] Updating best ping time for pubsub.plex.tv to 23 ms.
Sep 14, 2023 08:41:07.736 [140293488458552] DEBUG - [Req#5b/HCl#37] HTTP requesting GET https://plex.tv/api/v2/devices/<removed>/certificate/download

Sep 14, 2023 08:41:18.086 [140293488458552] DEBUG - [Req#5b] CERT: Downloaded new cert from plex.tv; took 12 tries.
Sep 14, 2023 08:41:18.113 [140293515639608] DEBUG - [CERT] MyPlex: Updating device connections (from timer: 0)
Sep 14, 2023 08:41:18.113 [140293515639608] DEBUG - [CERT/HCl#40] HTTP requesting PUT https://plex.tv/devices/<removed>?Connection[][uri]=http://1xx.xxx.xxx.xxx:32400&httpsEnabled=1&httpsRequired=0&dnsRebindingProtection=0&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx
Sep 14, 2023 08:41:18.173 [140293513530168] DEBUG - Auth: Refreshing tokens inside the token-based authentication filter.
Sep 14, 2023 08:41:18.173 [140293513530168] DEBUG - [HCl#41] HTTP requesting GET https://plex.tv/api/v2/server/access_tokens?auth_token=xxxxxxxxxxxxxxxxxxxx&unknownToken=xxxxxxxxxxxxxxxxxxxx
Sep 14, 2023 08:41:18.190 [140293499013944] DEBUG - [HttpClient/HCl#40] HTTP/2.0 (0.1s) 200 response from PUT https://plex.tv/devices/<removed>?Connection[][uri]=http://1xx.xxx.xxx.xxx:32400&httpsEnabled=1&httpsRequired=0&dnsRebindingProtection=0&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx (reused)
Sep 14, 2023 08:41:18.218 [140293499013944] DEBUG - [HttpClient/HCl#41] HTTP/2.0 (0.0s) 403 response from GET https://plex.tv/api/v2/server/access_tokens?auth_token=xxxxxxxxxxxxxxxxxxxx&unknownToken=xxxxxxxxxxxxxxxxxxxx (reused)
Sep 14, 2023 08:41:18.218 [140293486115640] ERROR - MyPlex: Error 403 requesting XML from: https://plex.tv/api/v2/server/access_tokens?auth_token=xxxxxxxxxxxxxxxxxxxx&unknownToken=xxxxxxxxxxxxxxxxxxxx
Sep 14, 2023 08:41:18.218 [140293513530168] ERROR - MyPlex: Couldn't get list of access tokens from myPlex.
Sep 14, 2023 08:41:18.218 [140293513530168] DEBUG - Auth: authenticating user as guest
Sep 14, 2023 08:41:18.218 [140293472222008] DEBUG - Auth: Refreshing tokens inside the token-based authentication filter.
Sep 14, 2023 08:41:18.218 [140293513530168] DEBUG - Request: [127.0.0.1:52484 (Loopback)] GET /library/sections (4 live) #7d GZIP Signed-in Token ()
Sep 14, 2023 08:41:18.218 [140293472222008] DEBUG - [HCl#42] HTTP requesting GET https://plex.tv/api/v2/server/access_tokens?auth_token=xxxxxxxxxxxxxxxxxxxx
Sep 14, 2023 08:41:18.218 [140293513530168] DEBUG - Completed: [127.0.0.1:52484] 401 GET /library/sections (4 live) #7d GZIP 0ms 357 bytes
Sep 14, 2023 08:41:18.259 [140293499013944] DEBUG - [HttpClient/HCl#42] HTTP/2.0 (0.0s) 403 response from GET https://plex.tv/api/v2/server/access_tokens?auth_token=xxxxxxxxxxxxxxxxxxxx (reused)
Sep 14, 2023 08:41:18.259 [140293486115640] ERROR - MyPlex: Error 403 requesting XML from: https://plex.tv/api/v2/server/access_tokens?auth_token=xxxxxxxxxxxxxxxxxxxx
Sep 14, 2023 08:41:18.259 [140293472222008] ERROR - MyPlex: Couldn't get list of access tokens from myPlex.
Sep 14, 2023 08:41:18.259 [140293515639608] DEBUG - Auth: Refreshing tokens inside the token-based authentication filter.
Sep 14, 2023 08:41:18.260 [140293515639608] DEBUG - [HCl#43] HTTP requesting GET https://plex.tv/api/v2/server/access_tokens?auth_token=xxxxxxxxxxxxxxxxxxxx&unknownToken=xxxxxxxxxxxxxxxxxxxx
Sep 14, 2023 08:41:18.283 [140293499013944] DEBUG - [HttpClient/HCl#3f] HTTP/1.1 (0.2s) 200 response from GET http://r3.o.lencr.org/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Sep 14, 2023 08:41:18.283 [140293459532600] INFO - [CERT/OCSP] Successfully retrieved response.
Sep 14, 2023 08:41:18.306 [140293499013944] DEBUG - [HttpClient/HCl#43] HTTP/2.0 (0.0s) 403 response from GET https://plex.tv/api/v2/server/acces

Getting the exact same as e18n

Oct 18, 2023 19:43:27.778 [139679277988664] DEBUG - [HttpClient/HCl#91] HTTP/2.0 (0.1s) 429 response from POST https://plex.tv/servers.xml?auth_token=xxxxxxxxxxxxxxxxxxxx (reused)
Oct 18, 2023 19:43:27.778 [139679221009208] DEBUG - MyPlex: Published Mapping State response was 429
Oct 18, 2023 19:43:27.778 [139679221009208] WARN - MyPlex: Invalid response when mapping state (code=429):
Oct 18, 2023 19:43:27.778 [139679221009208] DEBUG - MyPlex: updating mapped state - current state: 'Mapped - Not Published (Bad Response)'
Oct 18, 2023 19:43:27.778 [139679221009208] DEBUG - MyPlex: mapping state set to 'Mapped - Not Published (Bad Response)'.

Some kind of rate limiting happening only on that specific endpoint, not sure why.

Using Docker here.

@y_tol

You need to confirm your email.

Your account is not setup correctly from what I see here.

I created another account and commented on the forum with the new one (rookie mistake) as I thought there might indeed be something wrong with my account. Is there also something wrong with this one? As I tried with both and always ending with the 429 error.

That being said, it seems I can constantly not claim one specific server, claiming a server on a different IP works just fine. Don’t really feel like publishing the IP of the server here tho.

Might it be that the IP of my server got (partially) blocked ?

What’s happening is that Plex.tv is seeing the constant claim attempts and saying NO NO NO!

Stop the server for 15-30 minutes and let it calm down.
stop the container.

Are you familiar with using the PLEX_CLAIM method of creating and claiming a container?

I have removed all the old, expired, servers from your account (3+ years old / not seen)

After it’s had time to cool down,

  1. Create a new container with a new claim token in it.
  2. Let it start on its own.
  3. If it does not claim
    – Stop the container
    – Make a tar.gz of the logs
    – Attach that tar.gz here for me to see why
  4. Don’t hammer on Plex.tv as it will throttle you (429) again
1 Like

Hey ChuckPa,

Thanks for reverting.

I’m aware of the PLEX_CLAIM method, but to be honest I don’t really want to reset the server I just thought it would be my only way out as this issue suddenly occurred 1-2d ago when the server suddenly disappeared from my account for no reason but remained accessible to my family (but not on all devices).

I wasn’t able to PLEX_CLAIM new servers either so really seemed to be the public IP being rate limited (afaik at least). Was about to get a new IP when I saw your answer.

As advised, server is stopped, I’ll wait tomorrow and I’ll tunnel & claim that way as it should have the same effect I believe.

I wasn’t sure about the rate limiting either as other endpoints of plex.tv seemed to work just fine.

Here’s my script.

This will claim the container (inside) at the command line with the plex service stopped

After things calm down, this will allow you to claim an existing server/container

Thanks, I’ll give that a try then but I don’t hope much. I tried the regular claiming system with the tunnel, I’ve literally 1 POST request going to servers.xml in the logs but still a 429 even tho 7h passed by.

Oct 19, 2023 08:05:25.846 [140381631630136] DEBUG - [Req#7c] MyPlex: mapping state set to 'Unknown'.
Oct 19, 2023 08:05:25.847 [140381631630136] DEBUG - [Req#7c] MyPlex: Sending Server Info to myPlex (user=me@example.com, ip=PUBLIC_IP_V4, port=32400)
Oct 19, 2023 08:05:25.847 [140381631630136] DEBUG - [Req#7c/HCl#28] HTTP requesting POST https://plex.tv/servers.xml?auth_token=xxxxxxxxxxxxxxxxxxxx
Oct 19, 2023 08:05:25.925 [140381641788216] DEBUG - [HttpClient/HCl#28] HTTP/2.0 (0.1s) 429 response from POST https://plex.tv/servers.xml?auth_token=xxxxxxxxxxxxxxxxxxxx (reused)

Regular claiming with the tunnel requires a handshake from PMS to perform the authentication then get a PlexOnlineToken to store in your Preferences.xml file.

My tool takes the Plex Claim Token you get from https://plex.tv/claim
and asks for the final PlexOnlineToken. It then edits Preferences.xml (PMS is stopped) with all the needed fields in place.

This succeeds where other attempts fail because you’re not fighting PMS through a tunnel (different subnets or FQDN x-forwarded-for)

As long as you’ve not stalled out (throttled) your IP with “429” status. it will work.

Ok, but still seems plex.tv rate limiting needs to be reviewed a bit, don’t you think?

Hey @ChuckPa

Well even with this method, I’m still getting 429 response codes.

Here is a redacted copy of the Preference.xml

<?xml version="1.0" encoding="utf-8"?>
<Preferences
 MachineIdentifier="57..SOME_GUID..48"
 ProcessedMachineIdentifier="76..SOME_STRING..aa"
 customConnections=""
 TranscoderTempDirectory="/transcode"
 OldestPreviousVersion="legacy"
 AnonymousMachineIdentifier="19..SOME_GUID..5f"
 MetricsEpoch="1"
 CertificateVersion="3"
 LanguageInCloud="1"
 PubSubServer="139.162.134.185"
 PubSubServerRegion="fra"
 PubSubServerPing="18"
 FriendlyName="NAME_OF_MY_SERVER"
 PublishServerOnPlexOnlineKey="1"
 LastAutomaticMappedPort="0"
 ManualPortMappingMode="1"
 FSEventLibraryUpdatesEnabled="1"
 GenerateBIFBehavior="never"
 GdmEnabled="0"
 TranscoderQuality="2"
 DlnaEnabled="0"
 CloudSyncNeedsUpdate="0"
 TranscoderH264BackgroundPreset="medium"
 DvrIncrementalEpgLoader="0"
 GenerateChapterThumbBehavior="never"
 OnDeckWindow="4"
 ScheduledLibraryUpdateInterval="1800"
 ScheduledLibraryUpdatesEnabled="1"
 CinemaTrailersFromLibrary="0"
 GlobalMusicVideoPathMigrated="1"
 DisableTLSv1_0="0"
 CertificateUUID="67..NOT_REALLY_A_UUID..a8"
 PlexOnlineUsername="MY_USERNAME_OK"
 PlexOnlineMail="MY_EMAIL_OK"
 PlexOnlineToken="SOME_SHORT_TOKEN"
 AcceptedEULA="1"/>

I left the head and tails of the IDs in case you have access to any logs where you may see something.

Happy to include logs but are they made public or do I need to redact any PII data in it?

Are you using a German hosting provider ?

That’s correct! Any problem with that?

Well the datacenter is in Germany at least.

@YouriT

Check your PM please (Upper right)