Plex Server stopped Loading on Raspberry Pi (Service Will No Longer Start)

I had an installation of Plex Server on my Raspberry Pi 4 (running Ubuntu Server) which was working fine. I recently had to restart the machine, and now the Plex Media Server service will not start. When I check the output with journalctl -xe, I get this output:

The job identifier is 337574.
Feb 19 17:34:25 ubuntu Plex Media Server[92412]: /bin/sh: 1: exec: /usr/lib/plexmediaserver/Plex Media Server: Permission denied
Feb 19 17:34:25 ubuntu systemd[1]: plexmediaserver.service: Main process exited, code=exited, status=126/n/a
– Subject: Unit process exited
– Defined-By: systemd
– Support: http://www.ubuntu.com/support

I have the Plex server running as the user ubuntu, which is the owner of the /usr/lib/plexmediaserver/ folder, which seems correct. Any ideas about what else I can check in order to try and get the server to start again?

By default, /usr/lib/plexmediaserver and all files in it are owned by the package manager (root).

Did you change permission when you changed ownership?

I did. In my frustration, I changed the plexmediaserver folder to 777. Still no dice.

since there is no harm to your data by uninstalling the package and reinstalling it,

sudo dpkg -r plexmediaserver

Now reinstall the package

I’m using the snap version, but your point is taken. Purging the old version and reinstalling was the first thing I did, to no avail.

if uninstalling and purging the snap didn’t resolve it, there is something more systemic

what does journalctl -xe | grep -i plex show?

ubject: A start job for unit plexmediaserver.service has finished successfu>
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A start job for unit plexmediaserver.service has finished successfully.
-- 
-- The job identifier is 337964.
Feb 19 22:37:10 ubuntu systemd[1]: plexmediaserver.service: Main process exited>
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- An ExecStart= process belonging to unit plexmediaserver.service has exited.
-- 
-- The process' exit code is 'exited' and its exit status is 126.
Feb 19 22:37:10 ubuntu Plex Media Server[94741]: /bin/sh: 1: exec: /usr/lib/ple>
Feb 19 22:37:10 ubuntu systemd[1]: plexmediaserver.service: Failed with result >
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- The unit plexmediaserver.service has entered the 'failed' state with result >
lines 2002-2024/2024 (END)
Feb 19 22:37:10 ubuntu systemd[1]: Started Plex Media Server.
-- Subject: A start job for unit plexmediaserver.service has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A start job for unit plexmediaserver.service has finished successfully.
-- 
-- The job identifier is 337964.
Feb 19 22:37:10 ubuntu systemd[1]: plexmediaserver.service: Main process exited, code=exited, status=126/n/a
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- An ExecStart= process belonging to unit plexmediaserver.service has exited.
-- 
-- The process' exit code is 'exited' and its exit status is 126.
Feb 19 22:37:10 ubuntu Plex Media Server[94741]: /bin/sh: 1: exec: /usr/lib/plexmediaserver/Plex Media Server: Permission denied
Feb 19 22:37:10 ubuntu systemd[1]: plexmediaserver.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- The unit plexmediaserver.service has entered the 'failed' state with result 'exit-code'.
~
Feb 19 22:37:05 ubuntu Plex Media Server[94729]: /bin/sh: 1: exec: /usr/lib/plexmediaserver/Plex Media Server: Permission denied
Feb 19 22:37:05 ubuntu systemd[1]: plexmediaserver.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- The unit plexmediaserver.service has entered the 'failed' state with result 'exit-code'.
Feb 19 22:37:08 ubuntu sudo[94720]: pam_unix(sudo:session): session closed for user root
Feb 19 22:37:10 ubuntu systemd[1]: plexmediaserver.service: Scheduled restart job, restart counter is at 2.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Automatic restarting of the unit plexmediaserver.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
Feb 19 22:37:10 ubuntu systemd[1]: Stopped Plex Media Server.
-- Subject: A stop job for unit plexmediaserver.service has finished
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A stop job for unit plexmediaserver.service has finished.
-- 
-- The job identifier is 337964 and the job result is done.
Feb 19 22:37:10 ubuntu systemd[1]: Starting Plex Media Server...
-- Subject: A start job for unit plexmediaserver.service has begun execution
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A start job for unit plexmediaserver.service has begun execution.
-- 
-- The job identifier is 337964.
Feb 19 22:37:10 ubuntu systemd[1]: Started Plex Media Server.
-- Subject: A start job for unit plexmediaserver.service has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A start job for unit plexmediaserver.service has finished successfully.
-- 
-- The job identifier is 337964.
Feb 19 22:37:10 ubuntu systemd[1]: plexmediaserver.service: Main process exited, code=exited, status=126/n/a
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- An ExecStart= process belonging to unit plexmediaserver.service has exited.
-- 
-- The process' exit code is 'exited' and its exit status is 126.
Feb 19 22:37:10 ubuntu Plex Media Server[94741]: /bin/sh: 1: exec: /usr/lib/plexmediaserver/Plex Media Server: Permission denied
Feb 19 22:37:10 ubuntu systemd[1]: plexmediaserver.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- The unit plexmediaserver.service has entered the 'failed' state with result 'exit-code'.

Thanks.

please check the permissions on /usr, /usr/lib and make certain they are 755 and owned by root

drwxr-xr-x 11 root root 4096 Feb 4 00:03 usr
drwxr-xr-x 101 root root 4096 Feb 19 17:16 lib

They seem to be. Should I change ownership of the plexmediaserver folder (which I created manually, BTW) back to root?

are you showing me /usr and /lib ?

I need to see /usr/lib too :slight_smile:

No, sorry. Those are the results for ls -l / (so it shows /usr) and ls -l /usr/ (so it shows /usr/lib)

ok. thanks for clarifying. easy to misunderstand when the commands not seen :wink:

I would uninstall and purge again.

Also, please remove /usr/lib/plexmediaserver.

the installer & package manager will create what’s needed.

DEB files get /usr/lib/plexmediaserver
SNAP files get their own space in /vvar/snap

Gotcha. I ran the following and got pretty much back to where I was:

`ubuntu@ubuntu:~$ sudo rm -r /usr/lib/plexmediaserver
ubuntu@ubuntu:~$ sudo snap remove --purge plexmediaserver
Disconnect plexmediaserver:opengl from snapd:opengl |Disconnect plexmediaserver:opengl from snapd:opengl /plexmediaserver removed
ubuntu@ubuntu:~$ sudo snap install plexmediaserver
plexmediaserver 1.25.5.5492-12f6b8c83 from Plex, Inc. (plexinc✓) installed
ubuntu@ubuntu:~$ sudo service plexmediaserver start
ubuntu@ubuntu:~$ sudo service plexmediaserver status
● plexmediaserver.service - Plex Media Server
Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; ven>
Active: activating (auto-restart) (Result: exit-code) since Sat 2022-02-1>
Process: 95753 ExecStartPre=/bin/sh -c /usr/bin/test -d "${PLEX_MEDIA_SERV>
Process: 95756 ExecStart=/bin/sh -c export PLEX_MEDIA_SERVER_INFO_VENDOR=>
Main PID: 95756 (code=exited, status=127)
ubuntu@ubuntu:~$ sudo service plexmediaserver status
● plexmediaserver.service - Plex Media Server
Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; ven>
Active: failed (Result: exit-code) since Sat 2022-02-19 22:52:21 UTC; 296>
Process: 95950 ExecStartPre=/bin/sh -c /usr/bin/test -d "${PLEX_MEDIA_SERV>
Process: 95952 ExecStart=/bin/sh -c export PLEX_MEDIA_SERVER_INFO_VENDOR=>
Main PID: 95952 (code=exited, status=127)

Feb 19 22:52:21 ubuntu systemd[1]: plexmediaserver.service: Scheduled restart >
Feb 19 22:52:21 ubuntu systemd[1]: Stopped Plex Media Server.
Feb 19 22:52:21 ubuntu systemd[1]: plexmediaserver.service: Start request repe>
Feb 19 22:52:21 ubuntu systemd[1]: plexmediaserver.service: Failed with result>
Feb 19 22:52:21 ubuntu systemd[1]: Failed to start Plex Media Server.
lines 1-12/12 (END)

`

This is the non-scrolling status:

plexmediaserver.service - Plex Media Server
Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2022-02-19 22:52:21 UTC; 3min 8s ago
Process: 95950 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)
Process: 95952 ExecStart=/bin/sh -c export PLEX_MEDIA_SERVER_INFO_VENDOR="$(grep ^NAME= /etc/os-release | awk -F= “{print $2}” | tr -d " )"; export PLEX_MEDIA_SERVER_INFO_DEVICE=“PC”; export PLEX_MEDIA_SERVER_INFO_MODEL="$(uname -m)"; export PLEX_MEDIA_SERVER_INFO_PLATFORM_VERSION="$(grep ^VERSION= /etc/os-release | awk -F= “{print $2}” | tr -d " )"; export LD_LIBRARY_PATH=/usr/lib/plexmediaserver/lib; exec “/usr/lib/plexmediaserver/Plex Media Server” (code=exited, status=127)
Main PID: 95952 (code=exited, status=127)

Feb 19 22:52:21 ubuntu systemd[1]: plexmediaserver.service: Scheduled restart job, restart counter is at 3.
Feb 19 22:52:21 ubuntu systemd[1]: Stopped Plex Media Server.
Feb 19 22:52:21 ubuntu systemd[1]: plexmediaserver.service: Start request repeated too quickly.
Feb 19 22:52:21 ubuntu systemd[1]: plexmediaserver.service: Failed with result ‘exit-code’.
Feb 19 22:52:21 ubuntu systemd[1]: Failed to start Plex Media Server.

I know they just updated the snap.

I’ve not had time to test it yet.

I wonder if something got broken. :frowning:

Would you be adverse to trying the normal DEB file?
(you can move /var/lib/plexmediaserver easily)

Not at all. Give me a few; I’ve got to get dinner ready, but I’ll give it a try tonight.

I purged the snap version and reinstalled with the .deb. Everything seems to have gone through successfully, and it’s functioning normally. Thanks a million for the help.

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