Server inaccessible and libraries deleted after logging server back in

Server Version#: 1.28.2.6151-914ddd2b3

I did a password reset last week but didn’t log out my devices. I had no issues using Plex until today. My Plex media server is showing up as inaccessible in clients. In Plex Media Server.log I saw a 403 on http://resources-cdn.plexapp.com/hashes.json so I thought the server might have gotten logged out.

I went directly to the web interface at https://host:32400/web and was prompted to log it into my Plex acount again, and then saw the initial setup screens which I clicked through.

After that the server was kind of accessible again but now none of my previous libraries exist in the settings which seem to have been completely reset. That means 5+ years of watch history for like 15 people are now gone.

Plug-in Support/Databases doesn’t have any backups either, even though I’m pretty sure I had the regular scheduled backup task. My entire Plex Media Server directory went from several gigabytes to 6MB.

If you didn’t delete the actual databases, it’s all still there.

Please advise.

We can reset your server’s credentials easily enough. There is an active thread with a utility (custom written for this) available.

I’m pretty good with Linux so if there’s a chance, I’ll help you pull it back.

Update: Ok, found the link:

Thanks for the fix, it worked on my end, after running the script, and logging out and in on the server everything was there again!

Would be nice if you can link the referenced thread, ChukPa.

I also see no local library, and also all the settings regarding adding local library are missing on my side. Since the password reset.

Any help apreciated anyway, but I also don’t want to play around.

Resetting the password does not reset the server’s databases. The two are completely separate scope.

I am very specific in what I touch and there is no need to go anywhere near the databases.

I need to see your log files for this.

Lastly, I’m too tired to play around.

The database backups are gone; ~plex/Library/Application Support/Plex Media Server appears to be completely fresh, there are no files from before today. Even the plug-ins I had in the Plug-ins dir were removed. The only actions I’ve taken through the console on that system since I found the server in an inaccessible state are:

  • Read the log files in Logs
  • Update from plexmediaserver 1.28.2.6106-44a5bbd28 to plexmediaserver 1.28.2.6151-914ddd2b3

I have a backup from when I migrated from another machine last September that I’m going to try to restore.

The server is authenticated but I guess it has a completely new identifier now:

I’m going to copy the old Preferences.xml from last year and see if that can give me back the old ID (don’t remember if it kept the previous ID when I migrated last year).

DId you INSTALL 22.04 on top of 20.04 -OR- Did you “dist-ugprade” while it was live?

I used do-release-upgrade, but that was yesterday and Plex was still working last night.

Thanks. Let me go see what that does. It should not have reformatted the partition / wipe out Plex.

The OS upgrade didn’t break anything else I had on the system, but it’s possible the Plex upgrade did?

Good news though! I restored Preferences.xml and the databases from the 2021 backup on the other machine. It does seem to have recovered the correct identifiers for the server and, importantly, restored the libraries that are being shared with other accounts. Lost about a year of watch history but at least our less tech-savvy friends don’t have to figure out how to locate and re-pin the libraries.

The Plex upgrade wouldn’t have touched a thing.

I let DPKG do all the work because I trust it.

Remember, the code is kept in /usr/lib/plexmediaserver.
The data (your databases) are in /var/lib/plexmediaserer.

At no point in time, even when uninstalling/upgrading is /var/lib/plexmediaserver touched

–UNLESS–

The user performs an uninstall --purge. DPKG is what performs the actual purge.

Speaking so much of dpkg, you might want to look at the log / history and see what it has in it

I just recreated your scenario in a VM.

  1. 20.04 installed and upgraded
  2. PMS installed and a media library section fully loaded
  3. do-release-upgrade (with PMS running)

Thanks, yeah I’m pretty sure it wasn’t the OS upgrade that could’ve removed Plex entirely. That and the Plex package upgrade were the only changes that happened between yesterday and today.

Going to look through more of the dpkg logs since this is really weird.

At least the restored, if slightly old, Plex database is working fine now.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.