Plex Media Server - ubuntu not starting

Server Version#: plexmediaserver_1.22.0.4163-d8c4875dd_i386
Player Version#: NA

Hi folks, I was wondering if anyone can help. about a week ago my PMS just stopped turning up in any player. I rooted around a bit, checked to see if it was running, if it needed updating etc. When I ran it would tell me that it failed to start. So I thought as all my media is safe, maybe best thing to do is to uninstall completely and fresh install.

I ran the command <dpkg -r plexmediaserver>

Then removed the directory </var/lib/plexmediaserver/Library/“Application Support”/“Plex Media Server”/>

restart server, go make a cup of tea whilst it reboots, reinstall with the latest .deb
Installation went fine, run to be greeted with this log.

<rowanook@Kaiju:~ systemctl status plexmediaserver.service ● plexmediaserver.service - Plex Media Server Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Wed 2021-03-17 19:00:41 GMT; 30s ago Process: 7706 ExecStart=/bin/sh -c export PLEX_MEDIA_SERVER_INFO_VENDOR="(grep ^NAME= /etc/os-releas
Process: 7704 ExecStartPre=/bin/sh -c /usr/bin/test -d “${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}”
Main PID: 7706 (code=exited, status=127)

Mar 17 19:00:36 Kaiju systemd[1]: plexmediaserver.service: Main process exited, code=exited, status=127/
Mar 17 19:00:36 Kaiju systemd[1]: plexmediaserver.service: Failed with result ‘exit-code’.
Mar 17 19:00:41 Kaiju systemd[1]: plexmediaserver.service: Service hold-off time over, scheduling restar
Mar 17 19:00:41 Kaiju systemd[1]: plexmediaserver.service: Scheduled restart job, restart counter is at
Mar 17 19:00:41 Kaiju systemd[1]: Stopped Plex Media Server.
Mar 17 19:00:41 Kaiju systemd[1]: plexmediaserver.service: Start request repeated too quickly.
Mar 17 19:00:41 Kaiju systemd[1]: plexmediaserver.service: Failed with result ‘exit-code’.
Mar 17 19:00:41 Kaiju systemd[1]: Failed to start Plex Media Server.

Any ideas on how to tackle this and get my new PMS up and running please.

Many thanks.

Do you has a mismatch between the user running Plex and the owner/group for the PMS folders?

I shouldn’t do, <chmod 755> ??

If you do that, doesn’t that exclude “execute” from everyone but the owner? If so, and your user running Plex is not the same as the owner of the entire PMS folder, it would not allow execution.

What is the user running Plex and what is the owner of the plexmediaserver folder?

hang on i’ll see about that. Thanks for your help.

It seems that PMS folder </var/lib/plexmediaserver> is owned by root.

does that mean it can’t execute?

That is most likely your problem, yes.

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

That should reassign the owner and group to plex:plex for the folder and everything in it. Assuming your PMS is being run by the user plex, you should be all set.

May I be of assist?

… Ditto what bgrngod said. I’m typing slow today.

plex:plex owns all of /var/lib/plexmediaserver

apparently plex is an illegal group name

Uninstall and reinstall the package.

The group will be added when installed.

Show me the installer console output please.

please show /tmp/plexinstaller.log

should I delete the directory too?

DOn’t delete at this point.

Trying to investigate the root problem.

$ sudo dpkg -r plexmediaserver

[sudo] password for rowanook:

(Reading database … 204780 files and directories currently installed.)

Removing plexmediaserver:i386 (1.22.0.4163-d8c4875dd) …

Processing triggers for gnome-menus (3.36.0-1ubuntu1) …

Processing triggers for desktop-file-utils (0.24-1ubuntu3) …

Processing triggers for bamfdaemon (0.5.3+18.04.20180207.2-0ubuntu2) …

Rebuilding /usr/share/applications/bamf-2.index…

Processing triggers for mime-support (3.64ubuntu1) …

followed by:

Selecting previously unselected package plexmediaserver:i386.
(Reading database ... 201643 files and directories currently installed.)
Preparing to unpack plexmediaserver_1.22.0.4163-d8c4875dd_i386.deb ...
PlexMediaServer install: Pre-installation Validation.
PlexMediaServer install: Warning:  "/var/lib/plexmediaserver/Library/Application Support" isn't owned by "plex", UID: 122.  Found "rowanook", UID: 1000 instead. Continuing.
PlexMediaServer install: Pre-installation Validation complete.  Errors: 0, Warnings: 1
Unpacking plexmediaserver:i386 (1.22.0.4163-d8c4875dd) ...
Setting up plexmediaserver:i386 (1.22.0.4163-d8c4875dd) ...
PlexMediaServer install: PlexMediaServer-1.22.0.4163-d8c4875dd - Installation starting.
PlexMediaServer install: 
PlexMediaServer install: Now installing based on:
PlexMediaServer install:   Installation Type:   Update
PlexMediaServer install:   Process Control:     systemd
PlexMediaServer install:   Plex User:           plex
PlexMediaServer install:   Plex Group:          plex
PlexMediaServer install:   Video Group:         video
PlexMediaServer install:   Metadata Dir:        /var/lib/plexmediaserver/Library/Application Support
PlexMediaServer install:   Temp Directory:      /tmp 
PlexMediaServer install:   Lang Encoding:       en_US.UTF-8
PlexMediaServer install:   Intel QSV Hardware:  Not found
PlexMediaServer install:   Nvidia GPU card:     Not Found
PlexMediaServer install:  
PlexMediaServer install:   OpenCL library:      Not Installed
PlexMediaServer install:   Beignet package:     Not Installed
PlexMediaServer install:  
PlexMediaServer install: WARNING: Package 'Beignet', required for hardware transcoding of HDR content, is missing.
PlexMediaServer install:          Please install package:  'beignet-opencl-icd'
PlexMediaServer install: WARNING: The OpenCL library, required for hardware transcoding of HDR content, is missing.
PlexMediaServer install:          Please install package:  'ocl-icd-libopencl1'
PlexMediaServer install:  
PlexMediaServer install: Completing final configuration.
PlexMediaServer install: Starting Plex Media Server.
PlexMediaServer install: PlexMediaServer-1.22.0.4163-d8c4875dd - Installation successful.  Errors: 0, Warnings: 3
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...
Processing triggers for bamfdaemon (0.5.3+18.04.20180207.2-0ubuntu2) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support (3.64ubuntu1) ...

It found the configuration error and reported as a warning.

PlexMediaServer install: Warning:  "/var/lib/plexmediaserver/Library/Application Support" isn't owned by "plex", UID: 122.  Found "rowanook", UID: 1000 instead. Continuing.

Did you forget to create a service override.conf to run as your username?

sorry not sure what that means. do you have an idea how to get it running? I’ve not created a service override config, as I have no idea what one is. Sorry.

sure.

sudo systemctl edit plexmediaserver

In that file:

[Service]
User=<desired username here>
Group=<desired group name her>

Save and exit.

sudo systemctl daemon-reload
sudo chown -R new-user:new-user /var/lib/plexmediaserver
sudo systemctl restart plexmediaserver

The full How-To is here:

thanks for help, i’ve created the override config. i’ve tried using my main user, as well as changing it to plex plex. neither of which seem to work. after reloading and restarting systemctl status is still relativly similar:

plexmediaserver.service - Plex Media Server
Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vend>
Drop-In: /etc/systemd/system/plexmediaserver.service.d
└─override.conf
Active: failed (Result: exit-code) since Thu 2021-03-18 20:58:19 GMT; 34s >
Process: 25272 ExecStartPre=/bin/sh -c /usr/bin/test -d “${PLEX_MEDIA_SERVE>
Process: 25277 ExecStart=/bin/sh -c export PLEX_MEDIA_SERVER_INFO_VENDOR=”>
Main PID: 25277 (code=exited, status=127)

Mar 18 20:58:19 Kaiju systemd[1]: plexmediaserver.service: Scheduled restart jo>
Mar 18 20:58:19 Kaiju systemd[1]: Stopped Plex Media Server.
Mar 18 20:58:19 Kaiju systemd[1]: plexmediaserver.service: Start request repeat>
Mar 18 20:58:19 Kaiju systemd[1]: plexmediaserver.service: Failed with result '>
Mar 18 20:58:19 Kaiju systemd[1]: Failed to start Plex Media Server.
lines 1-14/14 (END)

Please show me:

  1. the override file

  2. ls -la /var/lib/plexmediaserver

…emd/system/plexmediaserver.service.d/.#override.confdc672cf8dcee6bac Modified
[Service]
User=plex
Group=plex

total 20
drwxrwxrwx 4 plex plex 4096 Mar 17 21:35 .
drwxr-xr-x 78 root root 4096 Mar 17 20:55 …
-rw------- 1 plex plex 188 Mar 17 21:35 .bash_history
drwxrwxrwx 3 plex plex 4096 Dec 4 2016 Library
drwx------ 2 plex plex 4096 Dec 4 2016 .ssh

I did it wrong, right?

To satisfy what systemd tells me is the standard, plus what the packaging looks for,
would you please do the following with the override file?

( They document anything ending in .conf works and override.conf is preferred. I support anything ending in .conf but look for override.conf first )

cd /etc/systemd/system/plexmediaserver.service.d
sudo mv <name of that override file>  override.conf
sudo systemctl daemon-reload

Now it should all run as user plex so let’s adjust for maximum smoke :wink:

sudo systemctl restart plexmediaserver