Upgraded from Ubuntu 16.04 to 18.04

I just updated from Ubuntu 16.04 to 18.04 and Plex no longer starts. I have tried stopping and starting plex ( sudo service plexmediaserver start

sudo service plexmediaserver stop)

Any idea on how to get it started again?

I need two pieces of information:

  1. Please gather the logs manually sudo tar cfz /tmp/Logs.tar.gz "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs"

Attach the Logs.tar.gz which is in /tmp here with your next post.

  1. Please inspect the system journal for obvious errors resulting from the upgrade itself (It’s not always 100% smooth)

sudo journalctl -xe | grep -i plex

You will spot obvious errors. Status/fluff messages are of no importance.

1 Like

I have attached the log file and below is the system journal:Logs.tar.gz (2.9 MB)

Aug 28 15:43:24 Media-Server systemd[1]: /etc/systemd/system/plexmediaserver.service:11: Ignoring unknown escape sequences: “LD_LIBRARY_PATH=/usr/lib/plexmediaserver /usr/lib/plexmediaserver/Plex\ Media\ Server”
Aug 28 15:43:24 Media-Server systemd[1]: /etc/systemd/system/plexmediaserver.service.d/override.conf:11: Failed to parse mode value, ignoring: 0002 # this must be 4 digits of octal
Aug 28 15:43:24 Media-Server systemd[1]: /etc/systemd/system/plexmediaserver.service:11: Ignoring unknown escape sequences: “LD_LIBRARY_PATH=/usr/lib/plexmediaserver /usr/lib/plexmediaserver/Plex\ Media\ Server”
Aug 28 15:43:24 Media-Server systemd[1]: /etc/systemd/system/plexmediaserver.service.d/override.conf:11: Failed to parse mode value, ignoring: 0002 # this must be 4 digits of octal
Aug 28 15:43:24 Media-Server systemd[1]: /etc/systemd/system/plexmediaserver.service:11: Ignoring unknown escape sequences: “LD_LIBRARY_PATH=/usr/lib/plexmediaserver /usr/lib/plexmediaserver/Plex\ Media\ Server”
Aug 28 15:43:24 Media-Server systemd[1]: /etc/systemd/system/plexmediaserver.service.d/override.conf:11: Failed to parse mode value, ignoring: 0002 # this must be 4 digits of octal
Aug 28 15:43:24 Media-Server systemd[1]: /etc/systemd/system/plexmediaserver.service:11: Ignoring unknown escape sequences: “LD_LIBRARY_PATH=/usr/lib/plexmediaserver /usr/lib/plexmediaserver/Plex\ Media\ Server”
Aug 28 15:43:24 Media-Server systemd[1]: /etc/systemd/system/plexmediaserver.service.d/override.conf:11: Failed to parse mode value, ignoring: 0002 # this must be 4 digits of octal
Aug 28 15:43:33 Media-Server sudo[2922]: santo : TTY=pts/0 ; PWD=/home/santo ; USER=root ; COMMAND=/usr/sbin/service plexmediaserver start
Aug 28 15:43:33 Media-Server systemd[1]: /etc/systemd/system/plexmediaserver.service:11: Ignoring unknown escape sequences: “LD_LIBRARY_PATH=/usr/lib/plexmediaserver /usr/lib/plexmediaserver/Plex\ Media\ Server”
Aug 28 15:43:33 Media-Server systemd[1]: /etc/systemd/system/plexmediaserver.service.d/override.conf:11: Failed to parse mode value, ignoring: 0002 # this must be 4 digits of octal
Aug 28 15:43:33 Media-Server systemd[1]: Starting Plex Media Server for Linux…
– Subject: Unit plexmediaserver.service has begun start-up
– Unit plexmediaserver.service has begun starting up.
Aug 28 15:43:33 Media-Server systemd[1]: Started Plex Media Server for Linux.
– Subject: Unit plexmediaserver.service has finished start-up
– Unit plexmediaserver.service has finished starting up.
Aug 28 15:43:33 Media-Server sh[2952]: /bin/sh: 1: /usr/lib/plexmediaserver/Plex Media Server: not found
Aug 28 15:43:33 Media-Server systemd[1]: plexmediaserver.service: Main process exited, code=exited, status=127/n/a
Aug 28 15:43:33 Media-Server systemd[1]: plexmediaserver.service: Failed with result ‘exit-code’.
Aug 28 15:43:38 Media-Server systemd[1]: plexmediaserver.service: Service hold-off time over, scheduling restart.
Aug 28 15:43:38 Media-Server systemd[1]: plexmediaserver.service: Scheduled restart job, restart counter is at 1.
– Automatic restarting of the unit plexmediaserver.service has been scheduled, as the result for
Aug 28 15:43:38 Media-Server systemd[1]: Stopped Plex Media Server for Linux.
– Subject: Unit plexmediaserver.service has finished shutting down
– Unit plexmediaserver.service has finished shutting down.
Aug 28 15:43:38 Media-Server systemd[1]: Starting Plex Media Server for Linux…
– Subject: Unit plexmediaserver.service has begun start-up
– Unit plexmediaserver.service has begun starting up.
Aug 28 15:43:38 Media-Server systemd[1]: Started Plex Media Server for Linux.
– Subject: Unit plexmediaserver.service has finished start-up
– Unit plexmediaserver.service has finished starting up.
Aug 28 15:43:38 Media-Server sh[2956]: /bin/sh: 1: /usr/lib/plexmediaserver/Plex Media Server: not found
Aug 28 15:43:38 Media-Server systemd[1]: plexmediaserver.service: Main process exited, code=exited, status=127/n/a
Aug 28 15:43:38 Media-Server systemd[1]: plexmediaserver.service: Failed with result ‘exit-code’.
Aug 28 15:43:44 Media-Server systemd[1]: plexmediaserver.service: Service hold-off time over, scheduling restart.
Aug 28 15:43:44 Media-Server systemd[1]: plexmediaserver.service: Scheduled restart job, restart counter is at 2.
– Automatic restarting of the unit plexmediaserver.service has been scheduled, as the result for
Aug 28 15:43:44 Media-Server systemd[1]: Stopped Plex Media Server for Linux.
– Subject: Unit plexmediaserver.service has finished shutting down
– Unit plexmediaserver.service has finished shutting down.
Aug 28 15:43:44 Media-Server systemd[1]: Starting Plex Media Server for Linux…
– Subject: Unit plexmediaserver.service has begun start-up
– Unit plexmediaserver.service has begun starting up.
Aug 28 15:43:44 Media-Server systemd[1]: Started Plex Media Server for Linux.
– Subject: Unit plexmediaserver.service has finished start-up
– Unit plexmediaserver.service has finished starting up.
Aug 28 15:43:44 Media-Server sh[2960]: /bin/sh: 1: /usr/lib/plexmediaserver/Plex Media Server: not found
Aug 28 15:43:44 Media-Server systemd[1]: plexmediaserver.service: Main process exited, code=exited, status=127/n/a
Aug 28 15:43:44 Media-Server systemd[1]: plexmediaserver.service: Failed with result ‘exit-code’.
Aug 28 15:43:49 Media-Server systemd[1]: plexmediaserver.service: Service hold-off time over, scheduling restart.
Aug 28 15:43:49 Media-Server systemd[1]: plexmediaserver.service: Scheduled restart job, restart counter is at 3.
– Automatic restarting of the unit plexmediaserver.service has been scheduled, as the result for
Aug 28 15:43:49 Media-Server systemd[1]: Stopped Plex Media Server for Linux.
– Subject: Unit plexmediaserver.service has finished shutting down
– Unit plexmediaserver.service has finished shutting down.
Aug 28 15:43:49 Media-Server systemd[1]: plexmediaserver.service: Start request repeated too quickly.
Aug 28 15:43:49 Media-Server systemd[1]: plexmediaserver.service: Failed with result ‘exit-code’.
Aug 28 15:43:49 Media-Server systemd[1]: Failed to start Plex Media Server for Linux.
– Subject: Unit plexmediaserver.service has failed
– Unit plexmediaserver.service has failed.

Thanks,
Now it’s clear. You have somehow created a full service override file in /etc. This isn’t how it’s done.

The instructions how to do this correctly are here. Customizing your Plex configuration

If you need help, paste the contents of /etc/systemd/system/plexmediaserver.service and I will edit it for you.

Better have you do it just in case I’d probably screw it up:

[Unit]
Description=Plex Media Server for Linux
After=network.target

[Service]
Environment=“PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/var/lib/plexmediaserver/Library/Application Support”
Environment=PLEX_MEDIA_SERVER_HOME=/usr/lib/plexmediaserver
Environment=PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6
Environment=PLEX_MEDIA_SERVER_TMPDIR=/tmp
ExecStartPre=/bin/sh -c ‘/usr/bin/test -d “${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}” || /bin/mkdir -p “${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}”’
ExecStart=/bin/sh -c ‘LD_LIBRARY_PATH=/usr/lib/plexmediaserver /usr/lib/plexmediaserver/Plex\ Media\ Server’
Type=simple
User=plex
Group=plex
Restart=on-failure
RestartSec=5
StartLimitInterval=60s
StartLimitBurst=3

[Install]
WantedBy=multi-user.target

My override in system/plexmediaserver.service.d is:

Customize Plex’s config

[Service]
Environment=“PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/var/lib/plexmediaserver/Library/Application Support”

These values are only needed if you wish to change user & group

User=santo
Group=santo

This is needed to change the default umask

UMask=0002 # this must be 4 digits of octal

Confirming your configuration customization:

  1. Metadata in default location
  2. User=santo
  3. Group=santo
  4. UMask=0002

Results in:

  1. Remove file /etc/systemd/system/plexmediaserver.service
  2. Create directory /etc/systemd/system/plexmediaserver.service.d
  3. Creating file override.conf in /etc/systemd/system/plexmediaserver.service.d
    4… Placing the following in it.

Easy way to do this:

  1. stop PMS
  2. Delete the existing override you have (as root)
  3. sudo systemctl daemon-reload (tell systemd it’s gone)
  4. sudo systemctl edit plexmediserver
  5. Paste the following text in the file. Systemctl will do the next steps for you .
# My Plex configuration
[Service]

User=santo
Group=santo

UMask=0002
  1. After saving the file, systemctl will write it
  2. sudo systemctl daemon-reload
  3. sudo systemctl start plexmediserver

this is what I get now when I start plexmediaserver

santo@Media-Server:~$ sudo systemctl start plexmediaserver
Job for plexmediaserver.service failed because the control process exited with error code.
See “systemctl status plexmediaserver.service” and “journalctl -xe” for details.
santo@Media-Server:~$ systemctl status plexmediaserver.service
● plexmediaserver.service - Plex Media Server for Linux
Loaded: loaded (/etc/systemd/system/plexmediaserver.service; disabled; vendor
Active: activating (auto-restart) (Result: exit-code) since Wed 2018-08-29 14
Process: 3856 ExecStartPre=/bin/sh -c ‘/usr/bin/test -d “${PLEX_MEDIA_SERVER_A
lines 1-4/4 (END)…skipping…
● plexmediaserver.service - Plex Media Server for Linux
Loaded: loaded (/etc/systemd/system/plexmediaserver.service; disabled; vendor
Active: activating (auto-restart) (Result: exit-code) since Wed 2018-08-29 14
Process: 3856 ExecStartPre=/bin/sh -c ‘/usr/bin/test -d “${PLEX_MEDIA_SERVER_A

Journalctl -xe give me

santo@Media-Server:~$ journalctl -xe
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Unit plexmediaserver.service has begun starting up.
Aug 29 14:03:42 Media-Server sh[3856]: -d: 1: -d: ‘/usr/bin/test: not found
Aug 29 14:03:42 Media-Server systemd[1]: plexmediaserver.service: Control process exited, code=exited sta
Aug 29 14:03:42 Media-Server systemd[1]: plexmediaserver.service: Failed with result 'exit-code'.
Aug 29 14:03:42 Media-Server systemd[1]: Failed to start Plex Media Server for Linux.
-- Subject: Unit plexmediaserver.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Unit plexmediaserver.service has failed.
-- 
-- The result is RESULT.
Aug 29 14:03:42 Media-Server systemd[1]: Configuration file /etc/systemd/system/plexmediaserver.service i
Aug 29 14:03:48 Media-Server systemd[1]: plexmediaserver.service: Service hold-off time over, scheduling 
Aug 29 14:03:48 Media-Server systemd[1]: plexmediaserver.service: Scheduled restart job, restart counter 
-- 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.
Aug 29 14:03:48 Media-Server systemd[1]: Stopped Plex Media Server for Linux.
-- Subject: Unit plexmediaserver.service has finished shutting down
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Unit plexmediaserver.service has finished shutting down.
Aug 29 14:03:48 Media-Server systemd[1]: plexmediaserver.service: Start request repeated too quickly.
Aug 29 14:03:48 Media-Server systemd[1]: plexmediaserver.service: Failed with result 'exit-code'.
Aug 29 14:03:48 Media-Server systemd[1]: Failed to start Plex Media Server for Linux.
-- Subject: Unit plexmediaserver.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Unit plexmediaserver.service has failed.
-- 
-- The result is RESULT.

Moderator edit for readability

You did not delete the file /etc/systemd/system/plexmediaserver.service.

I deleted it and then made a new file in there… this is what I get if I delete it and then try to create one in terminal

santo@Media-Server:~$ sudo systemctl edit plexmediaserver
No files found for plexmediaserver.service.
Run ‘systemctl edit --force plexmediaserver.service’ to create a new unit.
santo@Media-Server:~$ systemctl edit --force plexmediaserver.service
Failed to create directories for “/etc/systemd/system/plexmediaserver.service.d/override.conf”: Permission denied

  1. Systemctl must always b run as root (sudo)
  2. Services are edited after they’re installed. Did you delete the package ?

I deleted the plexmediaserver.service.d directory and plexmediaserver.service file as you said to do

I just force edited using sudo (must have forgotten to type that first) and after I reload and go to start plexmediaserver I still get that plexmediaserver.service is not found

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