Restoring Plex on a fresh install of Ubuntu with a new computer name, cannot connect to restored DB

Server Version#: 4.33.2
Player Version#: 1.6.5.1097-3bb9dc68

I just restored my Plex media and database following the instructions here:

Everything went well, but the old version of Plex was called plex2, and the computer name this time around is simply “plex”.

So now, when restarting Plex after restoring the database, I’m getting messages saying “plex2 is unreachable.”

What should I do?

Remove the authentication tokens of all the old server instances from your plex account: https://app.plex.tv/desktop#!/settings/devices/pms

Then you might have to perform the ‘Reset customization’ procedure on all plex clients:
https://support.plex.tv/articles/customizing-the-mobile-apps-2#reset
https://support.plex.tv/articles/customizing-the-apps#reset
https://support.plex.tv/articles/customizing-plex-web#resethome

It seems to have worked! I’m going to wait until the scan is finished to “reclaim” my libraries, but it’s up and running. Thanks, @OttoKerner!

Hm – sorry, @OttoKerner, a follow-up: the server now populates a “Claim This Server” warning, but if I claim the server, the problem of not connecting to the DB reverts to the earlier issue of saying I don’t have permission to connect to Plex2 (the old name of the computer).

I’ve dismissed the “claim server” notice for now – is it truly important, and is there a fix for this?

If I may be of help?

When you restored the previous , what exactly did you restore?
This is important.

Sure, Chuck – I backed up, then restored, the entire contents of /var/lib/plexmediaserver/Library/Application Support/Plex Media Server.

It’s slooooowwwlyyy scanning all the files (there’s about 2TB of stuff, mostly music), and the music etc. seems to be playing fine. It’s just the Claim This Server warning that seems to disconnect me from the database when I tried it (once – now I’m waiting for the scan to finish before trying again, which may take a couple of hours).

In classic linux fashion,

  1. tar cf style ?
  2. cp ?

after the restoration of the files

  1. sudo chown -R plex:plex /var/lib/plexmediaserver

I ask because the most you’d have needed to do is

  1. With PMS stopped
  2. The above filesystem stuff
  3. Remove the old server name from authorized devices
  4. Start PMS
  5. Verify it signed in when it started on the host.

So I think I’ve done all of that but not in that order, due to having run the reinstall before knowing I had to remove the old server name from authorized devices.

Steps were:

Stopping PMS


sudo sh
cd /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/
rm -rf *


tar xf /media/plex/EXTBKUP/PlexLibrary.tar.gz

cd /var/lib/plexmediaserver

chown -R plex:plex .

Start PMS

Log into Plex

Remove server name from authorized devices

Re-map media folders in Plex

Waiting for the scan to finish…

The “Claiming” issues have happened while I’m waiting for the scan…

“Claim Server” notice
Click, login, claim server
Back to Plex – now says it can’t connect to Plex2 (old computer name)
Remove server name from authorized sources
Plex now working again, but claim server notice is back

what changed with the host?

IP ? subnet?

Tarball backups are foolproof

I’m really not sure what happened. The old computer was called “plex2” and I’ve named the new install “plex,” and all the issues seem to be coming from the authentication tokens @OttoKerner referred to above.

IP and subnet are the same as before I reinstalled Ubuntu.

Preferences.xml has not been touched? (where all the auth is stored)

No, haven’t touched Preferences.xml. The only difference between two days ago and now, that I can think of, is that the computer used to be called “plex2” and is now called “plex”.

That would change the “Friendly Name” unless you had expressly set it

Go to App.Plex.tv -> Settings - Authorized Devices - Servers tab

Which server(s) do you see?

There’s currently no servers.

If I try “Claim Server” in the Plex server settings, it spins, then presents “Claim Server” again as though I hadn’t done anything.

Then, if i refresh the app.plex.tv page, a server DOES appear (named Plex).

But when I return to my Plex server, it once again shows “plex2 - unreachable” in my home screen, and “No soup for you! You do not have access to this server” if I click on any particular library.

If I return to app.plex.tv and DELETE the server from the Authorized Devices, my Plex server display returns to normal and connects to its database again.

give me a bit but think this you’ll probably have to drop it out of the account completely (edit Preferences.xml) and then ‘claim as if fresh’ ).

Confirm for me? LAN IP range? (this is all local ?)

I’m not entirely sure what that means, but yes, it’s running on an old Optiplex 990 in the corner of my office, a standalone machine that’s not used as anything but the Plex server and some simple home filesharing through Samba. Its IP is 192.168.1.113.

ip addr of the host you’re attempting to claim with?
ip addr of the server machine?

I’m running the Plex server on the previously mentioned Optiplex 990, whose address is 192.168.1.113. That’s the only computer I’m concerned with at the moment. There are no other computers in the mix. I have the server running (localhost:32400) in one tab in Firefox and apps.plex.tv in another tab. This conversation is in a third tab.

Ok… so it’s time to get a bigger hammer. Let’s start with the simplest one?

Remove owner info from the Preferences.xml file

  1. Stop Plex
  2. Edit Preferences.xml , removing the “name=value” pairs:
    a. PlexOnlineUsername
    b. PlexOnlineEmail
    c. PlexHome / PlexOnlineHome
    d. PlexOnlineToken
  3. Save
  4. Sign out of the Plex/web app
  5. Open fresh INCOGNITO Window.
  6. Start Plex
  7. Open 127.0.0.1:32400/web – In that Incognito window
  8. It will want to go through the sign in & claim.
  9. Let’s see if this is enough. If not, we can get a even bigger hammer :smiling_imp:

Should I wait for the media scan to finish, or is this kind of scan-agnostic? It’s still re-connecting everything to the new media folders.