Linux/Plex preferences.xml failed to load

Server Version#:1.25.7.5604-980a13e02
Player Version#: N/A

I got plex up and running last night, was able to watch a few shows on it no problem no hitch or anything.

This morning, I go to continue watching and I see that plex is down? I login and see what I can’t access http://localhost:32400/web. I check the status of plex and I see that it failed to load the preferences.xml file? It also shows active for 8 hours, what could have caused this or where can I go from here to troubleshoot? I am new to linux so any help would be appreciated!

● plexmediaserver.service - Plex Media Server
Loaded: loaded (/usr/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: disabled)
Active: active (running) since Sat 2022-03-12 23:40:03 EST; 8h ago
Process: 1664 ExecStartPre=/bin/sh -c /usr/bin/test -d “${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}” || /bin/mkdir -p “${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}” (code=exited, status=0/SUCCESS)
Main PID: 1703 (PMS RunServer)
Tasks: 2 (limit: 408206)
Memory: 67.0M
CGroup: /system.slice/plexmediaserver.service
└─1703 /usr/lib/plexmediaserver/Plex Media Server

Mar 12 23:40:03 BigDaddyServer systemd[1]: Starting Plex Media Server…
Mar 12 23:40:03 BigDaddyServer systemd[1]: Started Plex Media Server.
Mar 12 23:40:03 BigDaddyServer sh[1703]: Failed to load preferences at /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Preferences.xml
Mar 12 23:40:05 BigDaddyServer sh[1703]: Failed to load preferences at /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Preferences.xml

Not sure if this is also something I needed to do but I tried to re-claim my server and this is the error I get:

curl -X POST ‘http://127.0.0.1:32400/myplex/claim?token=TOKENREMOVED

curl: (7) Failed to connect to 127.0.0.1 port 32400: Connection refused

As an update I followed the steps at the bottom even though I am not using Ubuntu, I was able to get everything set back up.

The curl connection was refused because the server was down. To me, the error loading Preferences file is a symptom of another problem you might have with your host, but I’m glad you’ve got it running again

Is there anywhere I can possibly look into linux that would show what might have caused it?

To add,

The plex package has been completely overhauled since Ubuntu 18.

Removing Preferences.xml is not necessary and will ‘make a mess’ by causing duplicate servers with the same hostname.

I wasn’t even able to get to the GUI, I wasn’t sure what the best practice approach should have been and was only guessing.

Is there a link to what I should have done, in case this happens again?

How far along are you in the setup process?

I ask because there are two approaches.

Once I deleted the xml file I was able to bring everything back up as if nothing had happened, it took me back through the setup process but my server was still there

1 Like

Preferences.xml contains the server’s identity information too.
It’s important to NOT delete it.

The instructions you showed, with exception of the SSH tunnel, aren’t applicable anymore.

I get that, but something happened. Is there a log somewhere that I can pull to see what might have caused it?

the only log you might find is the system log (journalctl)

I will take a look, I also did check the .xml file before deleting it and it was empty. Is that to be expected?

If it’s empty, the only way that’ll happen (99% of the time) is when the runtime username changes or the directories are moved (APP_SUPPORT_DIR changes) and perms are not set correctly)

What do you need to see so I can show you my perms to make sure they are setup correctly? I think maybe that was it? Because it looks like it is happening again

Anything you recommend that I can check on?

Hello,

I’m running Plex 1.25.6.5577 on Fedora, and I had to restart the server for an update, and I get the same error message.
The server is not starting and the Preferences.xml file is empty…

If you stop plex then delete the preferences file, then start plex again are you able to get the setup menu to show when logging in locally?

1 Like

What info as far as permissions do you need to check to confirm everything is setup correctly?

@hoopie88

If you haven’t customized Plex and it’s running as the default username plex:plex,
you can confirm everything is as it should be with the command:

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

This will set, without looking, the ownership of all files in /var/lib/plexmediaserver to plex’s ownership (as it should be).

If anything was changed (damaged) in there, this will correct it.

If you customized PMS to run as a different user, repeat the above command to be that username

1 Like

Had an unfortunate reboot caused by circumstances out of my control and upon startup, getting the same error from plex. Running 1.25.6.5577 . Preferences.xml is now a completely empty file. Is this a widespread issue?

edit: resolved by moving the empty Preferences.xml file out of the default dir, running setup again using 32400/web. Thankfully this did not alter plex data for libraries at all, just the home screen.

1 Like