I have the following configuration: Ubuntu Server 20.04 with most recent (as of 10/30) Plex Media Server (nonfunctional so I cannot access what version). When I upgraded the server, access to PMS was cut off with the following output from systemctl status plexmediaserver:
● plexmediaserver.service - Plex Media Server
Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vend>
Active: failed (Result: exit-code) since Tue 2020-11-03 05:04:08 EST; 2h 4>
Main PID: 1228 (code=exited, status=127)
Nov 03 05:04:08 ubuntuserver2 systemd[1]: plexmediaserver.service: Scheduled re>
Nov 03 05:04:08 ubuntuserver2 systemd[1]: Stopped Plex Media Server.
Nov 03 05:04:08 ubuntuserver2 systemd[1]: plexmediaserver.service: Start reques>
Nov 03 05:04:08 ubuntuserver2 systemd[1]: plexmediaserver.service: Failed with >
Nov 03 05:04:08 ubuntuserver2 systemd[1]: Failed to start Plex Media Server.
In doing some research, I saw references to configuration information in /etc/systemd/system/plexmediaserver. There is no reference to Plex in the file system. I also checked ```
netstat -la | grep 32400 (and 32401) and did not see anything listening on those ports.
There is no Plex Media Server log from after the Ubuntu upgrade.
I am trying to avoid reinstalling PMS and scanning from scratch. I see discussions on copying data and metadata files and overwriting files after PMS installation. Is re-installation the only way to get Plex running?
I do have a system image of my Ubuntu 18 OS made immediately prior to the upgrade using Clonezilla.
journalctl -xe | grep plex (look for the error message and details
ls -la /var/lib/plexmediaserver
The first tells us the exact error as recorded by systemctl
the second is a directory listing. ( the permissions of /var/lib/plexmediaserver are prone to change during Ubuntu system upgrade )
Nov 03 07:02:45 ubuntuserver2 sudo[55367]: tim : TTY=pts/0 ; PWD=/home/tim ; USER=root ; COMMAND=/bin/systemctl status plexmediaserver
Nov 03 07:05:10 ubuntuserver2 sudo[59434]: tim : TTY=pts/0 ; PWD=/home/tim ; USER=root ; COMMAND=/bin/systemctl status plexmediaserver
Nov 03 07:06:04 ubuntuserver2 sudo[61231]: tim : TTY=pts/1 ; PWD=/home/tim ; USER=root ; COMMAND=/bin/systemctl status plexmediaserver
Nov 03 07:07:43 ubuntuserver2 sudo[63873]: tim : TTY=pts/2 ; PWD=/home/tim ; USER=root ; COMMAND=/bin/systemctl status plexmediaserver
Nov 03 07:08:31 ubuntuserver2 sudo[65317]: tim : TTY=pts/1 ; PWD=/home/tim ; USER=root ; COMMAND=/bin/systemctl status plexmediaserver
ls -la /var/lib/plexmediaserver:
drwxr-xr-x 3 plex plex 4096 Nov 17 2018 .
drwxr-xr-x 76 root root 4096 Oct 30 18:48 …
drwxr-xr-x 3 plex plex 4096 Nov 17 2018 Library
Note: second line above corresponds to date and time of update.
Yesterday, I did attempt to change permissions using sudo chown -R plex:plex /var/lib/plexmediaserver command. It went through its paces for atleast 15 minutes.
I cannot find the plexmediaserver program using dkpg-query.
This also brings up something I noted above:
TTY=pts/1 ; PWD=/home/tim ; USER=root ; COMMAND=/bin/systemctl status plexmediaserver.
There has never been any Plex data stored in the /home/tim tree.
I had added a couple of years ago the LXDE desktop onto my Linux server to give it graphical front end. I don’t recall having any issue doing so with Plex. I also never had trouble with Plex in the last couple of years. I also note that there is no Plex software listed in the Synaptic package,
manager.
There now is clear difference in the front ends. Under 18.04 LTS, the desktop said LXDE. Under 20.04LTS it says Lubuntu 20.04.
I primarily use Webmin to administer the server. I can’t find Plexmediaserver using those commands. But, Webmin still lists the Plex Media Server service as start on boot up, but it says “no” to running. When I try to restart the service from there, I get:
Nov 03 15:06:27 ubuntuserver2 pkexec[564814]: pam_unix(polkit-1:session): session opened for user root by (uid=1000)
Nov 03 15:06:27 ubuntuserver2 pkexec[564814]: tim: Executing command [USER=root] [TTY=unknown] [CWD=/home/tim] [COMMAND=/usr/lib/update-notifier/package-system-locked]
Nov 03 15:06:46 ubuntuserver2 systemd[1]: plexmediaserver.service: Start request repeated too quickly.
Nov 03 15:06:46 ubuntuserver2 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’.
Nov 03 15:06:46 ubuntuserver2 systemd[1]: Failed to start Plex Media Server.
– Subject: A start job for unit plexmediaserver.service has failed
– Defined-By: systemd
– Support: http://www.ubuntu.com/support
– A start job for unit plexmediaserver.service has finished with a failure.
– The job identifier is 23955 and the job result is failed.
I wonder if that the update to Ubuntu/Lubuntu deleted the Plex program, but left the data and some elements intact. I am pretty sure I used LXDE’s command line program to do the upgrade with the “get do-release-upgrade” command.
Are you attempting to install from the Ubuntu store or using dpkg -i filename.deb ?
If you are installing using the Ubuntu store – you can remove that.
The Ubuntu store, as of 20.04 only offers & supports SNAP packages.
PMS, although offered in SNAP form, will not function as well as it does when installed via dpkg . SNAP does not have hardware transcoding capability. This is a limitation of SNAP.
I have not yet attempted to restore Plex. I have never used the Ubuntu store for Plex. I have used dpkg in the LXDE environment along with apt-get. Although I have made a copy of my /var/lib/plexmediaserver/application folder on a data disk, will there be any issue with my data (assuming I am not using purge)?
I found this topic that has a couple of elements that I wonder would pertain to my situation:
Basically, I want to place a backup copy of my database over the default installation database.
Do I need to make any other changes to configuration files?
Here’s another element that I want to ask about: I have a system disk that pretty much has nothing but the ubuntu os, programs and the plex database. All the other data is located on 4 data disks that use samba to for my windows pc acess. In reading the above link and the ones linked, I get the impression that I can do place the database files off the system disk. That would indicate that this would prevent this issue in future Ubuntu LTS updates.Is my reading of this correct?
At this point, I want to restore the PMS database to the system disk. Once I have that, I can image the system disk and experiment.
Putting Plex’s main metadata directory on a USB drive, mounted in /media by the automounter, is asking for trouble
Experience has shown that moving PMS’s metadata on a persistent partition , such as /home is the best. Other internal HD’s, mounted with ‘exec’ option, are also viable.
Fundamental requirements are:
Local file systems only - Network shares are not safe due to file locking requirements
A linux-native file system formatting - xfs, btrfs, or ext4
3, drive / partition mounted in /etc/fstab with exec privilege asserted.
Changing where PMS’ metadata is (moving from /var/lib/plexmediaesrver)
Hummm. I reinstalled PMS, rebooted the system, launched the Plex management console and everything is there and functioning. Still can’t get over that the upgrade to 20.04 deleted the program and left everything else intact.
Thanks for the help! Not only did you remind me of the need to backup the PMS data, but how to properly do it.I’m sure when 22.00 LTS comes out, I’ll be much better prepared!
I have the exact same problem - I have uninstall the package, reinstall - but it wont start up
Seriously lost to get it online
root@Intelnuc:/opt/plexupdate# journalctl -xe | grep plex
Jan 27 11:32:10 Intelnuc jackett[269143]: 01-27 11:32:10 Info App config/log directory: /home/plex/.config/Jackett
Jan 27 11:32:10 Intelnuc jackett[269143]: 01-27 11:32:10 Info Loading Cardigann indexers from: /home/plex/.config/cardigann/definitions/, /etc/xdg/cardigan/definitions/, /opt/Jackett/Definitions
Jan 27 11:40:01 Intelnuc CRON[269857]: pam_unix(cron:session): session opened for user plex by (uid=0)
Jan 27 11:40:01 Intelnuc CRON[269858]: (plex) CMD (/usr/local/bin/rtcheck irssi rtorrent)
Jan 27 11:40:01 Intelnuc CRON[269857]: pam_unix(cron:session): session closed for user plex
Jan 27 11:50:01 Intelnuc CRON[270701]: pam_unix(cron:session): session opened for user plex by (uid=0)
Jan 27 11:50:01 Intelnuc CRON[270702]: (plex) CMD (/usr/local/bin/rtcheck irssi rtorrent)
Jan 27 11:50:02 Intelnuc CRON[270701]: pam_unix(cron:session): session closed for user plex
Jan 27 11:50:48 Intelnuc sudo[270767]: root : TTY=pts/3 ; PWD=/opt/plexupdate ; USER=root ; COMMAND=/bin/systemctl start plexmediaserver
– Subject: A start job for unit plexmediaserver.service has begun execution
– A start job for unit plexmediaserver.service has begun execution.
– Subject: A start job for unit plexmediaserver.service has finished successfully
– A start job for unit plexmediaserver.service has finished successfully.
Jan 27 11:50:48 Intelnuc systemd[1]: plexmediaserver.service: Main process exited, code=exited, status=1/FAILURE
– An ExecStart= process belonging to unit plexmediaserver.service has exited.
Jan 27 11:50:48 Intelnuc systemd[1]: plexmediaserver.service: Failed with result ‘exit-code’.
– The unit plexmediaserver.service has entered the ‘failed’ state with result ‘exit-code’.
Jan 27 11:31:28 Intelnuc systemd[1]: plexmediaserver.service: Main process exited, code=exited, status=1/FAILURE
Jan 27 11:31:28 Intelnuc systemd[1]: plexmediaserver.service: Failed with result ‘exit-code’.
Plex Media Server installation configuration info: Wed 27 Jan 2021 11:31:15 AM CET