Plex Media Server (Latest) fails on Centos 7

● plexmediaserver.service - Plex Media Server for Linux
Loaded: loaded (/usr/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Thu 2018-08-09 20:42:17 EDT; 3min 14s ago
Process: 24779 ExecStart=/bin/sh -c LD_LIBRARY_PATH=/usr/lib/plexmediaserver “/usr/lib/plexmediaserver/Plex Media Server” (code=exited, status=255)
Process: 24775 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: 24779 (code=exited, status=255)

what does sudo journalctl -xe | grep -i plex report? Anything obvious Plex related?

That failing, try a direct-execution in your home directory. If successful, it will create a Library directory and all below it.

Open a terminal window.
/bin/sh -c 'LD_LIBRARY_PATH=/usr/lib/plexmediaserver/lib "/usr/lib/plexmediaserver/Plex Media Server"'

this is all i get with a “jornalctl” … Aug 09 20:42:12 centos.techiearmy.local systemd[1]: plexmediaserver.service: main process exited, code=exited, status=255/n/a
Aug 09 20:42:12 centos.techiearmy.local systemd[1]: Unit plexmediaserver.service entered failed state.
Aug 09 20:42:12 centos.techiearmy.local systemd[1]: plexmediaserver.service failed.
Aug 09 20:42:17 centos.techiearmy.local systemd[1]: plexmediaserver.service holdoff time over, scheduling restart.
Aug 09 20:42:17 centos.techiearmy.local systemd[1]: start request repeated too quickly for plexmediaserver.service
– Subject: Unit plexmediaserver.service has failed
– Unit plexmediaserver.service has failed.
Aug 09 20:42:17 centos.techiearmy.local systemd[1]: Unit plexmediaserver.service entered failed state.
Aug 09 20:42:17 centos.techiearmy.local systemd[1]: plexmediaserver.service failed.

/usr/lib/plexmediaserver/Plex Media Server: error while loading shared libraries: libboost_atomic.so.1.59.0: cannot open shared object file: No such file or directory

Then what are the contents of /usr/lib/plexmediaserver ?

Something went sideways with your installation. Let’s find out what did.

I have a minor error.

Please edit /lib out of what i listed for LD_LIBRARY_PATH.

I had accidentally copied from my development system.

/bin/sh -c ‘LD_LIBRARY_PATH=/usr/lib/plexmediaserver “/usr/lib/plexmediaserver/Plex Media Server”’

“/usr/lib/plexmediaserver/Plex: ‘LD_LIBRARY_PATH=/usr/lib/plexmediaserver: No such file or directory

Plex is installed, right? Where’s the directory you listed above??

Plex has been running for a year on this box, I have not uninstalled it. I will see if I can find the binary.

“/usr/lib/plexmediaserver” is where that ‘ls’ was run from.

/bin/sh -c ‘LD_LIBRARY_PATH=/usr/lib/plexmediaserver “/usr/lib/plexmediaserver/Plex Media Server”’ —> the bold portion of this is not valid for my system it seems.

Do you have /usr/lib/plexmediaserver on a non-OS drive? (the exec bit is needed)

No, is is on the only drive on the system.

[root@centos plexmediaserver]# find / -name “Plex Media Server”
/usr/lib/plexmediaserver/Plex Media Server

I was mistaken

ok… time to hack. (not going to be pretty)

as your username

cd /usr/lib/plexmediaserver
export LD_LIBRARY_PATH=`pwd`
./Plex\ Media\ Server

If this doesn’t start up and sit there (warnings about libraries are allowed), your Centos or Plex installation is hosed.

Please copy/paste all console output from this operation

It is running, no output … can connect to it, but all my libraries are gone.

excellent.

If you look in your linux home directory, you’ll see Library has been created :slight_smile: PMS has prepared a new server Library instance which, at this point, is totally empty.

You can Ctrl-C out of that and rm -rf ~/Library

Now we know it’s not anything at the binary /process execution level.

Just to be pedantic, ls -la /var/lib/plexmediaserver (or wherever you have your Library, if you moved it). If it, including all files beneath it, is not owned by plex:plex, it won’t start either.

If you see a numeric UID and/or GID and not the expected plex:plex… we’ve got the problem…

[chuck@lizum plexmediaserver.113]$ ll
total 4
drwxr-xr-x.  3 plex plex   21 Aug  7 19:20 ./
drwxr-xr-x. 66 root root 4096 Aug  9 00:21 ../
drwxr-xr-x.  3 plex plex   33 Aug  7 19:20 Library/
[chuck@lizum plexmediaserver.114]$ 

[root@centos ~]# ls -la /var/lib/plexmediaserver/
total 0
drwxr-xr-x 3 plex plex 21 Jun 13 09:52 .
drwxr-xr-x. 7 root root 75 Jun 13 09:49 …
drwxrwxrwx. 3 plex plex 33 Apr 19 16:17 Library

Something’s wrong in there. Force it all sudo chown -R plex:plex /var/lib/plexmediaserver

If that’s still not it, copy/paste your plexmediaserver.service file.

Just an FYI … “/usr/lib/plexmediaserver” is a symbolic link to “/home/plex” … I did this only because I didn’t have enough allocated space in the /lib storage pool.

which plexmediaserver.service … I have on under /etc/systemd … and one under /usr/lib

I would have been really nice to know this before chasing down red herrings caused by completely a completely non-standard installation.

  • Moving /var/lib/plexmediaserver (your metadata) is 100% normal and expected. I have How-To’s on accomplishing this. Linux Tips
  • Moving the PMS executables is not supported. They are under the control of rpm.
  • Modifying /lib/systemd/system/plexmediaserver.service is pointless. I overwrite it with each update.
  • Local configuration customizations are supported through the systemd standard override.conf file and so documented in the Linux Tips linked above.

Please remember, the executables belong in root and /usr/lib. It’s ~120 MB fully expanded.
Your metadata, which can grow to 10-15-20 GB, is fully relocatable.

Because they are stored in different locations, they are independent of each other. I do not remove your library data should you uninstall the binaries. This allows for downgrading version with ease.

How can I now assist you in bringing this into proper operational status with a configuration which works for you ?

1 Like

But why would it stop working after a year of working in this configuration? All I moved was the metadata, everything else is in the installed location.