I then accessed the local web client address and could see the server, but when I click the “claim” button it briefly spins and returns to read “Claim Server”
Server is 192.168.17.5
Workstation is also 192.168.17.5 (though I have tried on a laptop at 192.168.17.158)
No FQDN. The server/workstation name is bic, but no domain
Thanks!
First, please don’t get bogged down trying to understand attempting curl to plex.tv. It’s a very closed off URL which only responds when all the right pieces (info attached to the query) are present. Attempting ‘plain’ access will get you nothing.
As for getting the server reclaimed:
You can talk to us here (presumably from 192.168.17.5) so the whole SSL mechanism is working correctly
There have been cases where I’ve seen the “PlexOnlineToken” (in Preferences.xml) become a NULL value PlexOnlineToken="". They’re rare; yes it’s a race condition in PMS somewhere, and unfortunately we haven’t found it yet but still trying to.
To reclaim your server, there are a couple options
– Manual method - Edit Preferences.xml and use a manual CURL command
– Semi automatic - Use a shell script which does the editing of Preferences.xml and CURL for you.
If you want to use the scripted/semi-automatic method, here’s the URL on github to what I wrote. (You’ll need be root - ‘sudo’ to run it)
If you want to do it manually:
Edit Preferences.xml, removing the Name="value" pairs for:
– PlexOnlineUsername
– PlexOnineMail
– PlexOnlineToken
– PlexOnlineHome (if it exists)
save Preferences.xml and start PMS. Let it sit there. Don’t touch it yet.
My Preferences.xml did have the PlexOnlineToken=“” so stopped PMS, removed that pair, and restarted PMS. The other three pairs were not present.
I got the claim code, but running the curl command (both as plex and root users) and got a 500 error code. Here is the exact command and output:
plex@bic:~$ curl -X POST 'http://127.0.0.1:32400/myplex/claim?token=claim-xxxxxxxxxxxxxxxxxxxx'
<html><head><title>Internal Server Error</title></head><body><h1>500 Internal Server Error</h1></body></html>
I put x’s in place of the claim code because I’m not sure if it is specific to my source IP, etc.
I checked my Preferences.xml afterwards and the PlexOnlineToken=“” was back in there.
I made sure that I did not have any browser tabs open to the local web client
I also tried with my local IP in place of 127.0.0.1 in case there was any difficulty with the loopback, but the behaviour was identical.
I tried testing the connection directly with curl using a portion of the command in the github shell script and got this:
plex@bic:~$ curl -X POST https://plex.tv/api/claim/exchange?token=claim-xxxxxxxxxxxxxxxxxxxx
curl: (60) SSL: no alternative certificate subject name matches target host name 'plex.tv'
More details here: https://curl.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
I stopped PMS, elevated to root, and ran. Here is the command and output (again with x’s instead of the real code).
Appears to be the same issue?
root@bic:~# ./UserCredentialReset.sh
Plex Media Server user credential reset and reclaim tool (Ubuntu 22.04.2 LTS)
This utility will reset the server's credentials.
It will next reclaim the server for you using a Plex Claim token you provide from https://plex.tv/claim
Please enter Plex Claim Token copied from http://plex.tv/claim : claim-xxxxxxxxxxxxxxxxxxxx
Clearing Preferences.xml
Getting new credentials from Plex.tv
ERROR: Could not get credentials from plex.tv (Error: 60)
In case anyone else is looking at this thread in the future, ChuckPa and I tried several things to no avail.
The next morning (and following a router reboot) I was able to claim the server.
Mysterious.