This thread serves to focus and coordinate the resolution of any issues which arise with the newly released universal packaging for Debian-based Linux systems.
Installation environment including whether: Native package, Docker, or Linux Container.
Details of problem encountered.
Copy/paste of console output (best) or screenshot.
Note: This thread is being opened in advance of the actual release of by Engineering. Please hold all questions & comments until after the binaries are released later today (Monday, 20 Jan 2020)
First update to fail for CHOWN plex issues. My plexmediaserver files are located on an NTFS drive which doesn’t support chown -R plex. All previous updates worked just fine.
Native package install - Linux (Debian Stretch)
Moved Plex files many months ago to an external NTFS drive due to drive space requirements
#dpkg -i plexmediaserver_1.18.5.2260-056ab4be9_amd64.deb
(Reading database ... 89948 files and directories currently installed.)
Preparing to unpack plexmediaserver_1.18.5.2260-056ab4be9_amd64.deb ...
Removed /etc/systemd/system/multi-user.target.wants/plexmediaserver.service.
PlexMediaServer install: Pre-installation Validation.
PlexMediaServer install: Error: "/var/lib/plexmediaserver/Library/Application Support" is not owned by "plex", UID: 114. Found "root" UID: 0 . Please correct before continuing.
dpkg: error processing archive plexmediaserver_1.18.5.2260-056ab4be9_amd64.deb (--install):
subprocess new pre-installation script returned error exit status 1
Created symlink /etc/systemd/system/multi-user.target.wants/plexmediaserver.service → /lib/systemd/system/plexmediaserver.service.
Processing triggers for libc-bin (2.24-11+deb9u4) ...
Errors were encountered while processing:
plexmediaserver_1.18.5.2260-056ab4be9_amd64.deb
It’s not failing for chown. It’s telling you PMS doesn’t own the Application Support directory which has always been a requirement.
You’ll also see where the mount is telling you sees ROOT as the UID owning the data while Plex’s UID as that which is in charge. root is the default for the NTFS-3G driver but it can be overridden in /etc/fstab.
2020-01-21 14:17:14 (99.5 MB/s) - 'plex.deb' saved [87109412/87109412]
Selecting previously unselected package plexmediaserver.
(Reading database ... 11218 files and directories currently installed.)
Preparing to unpack plex.deb ...
PlexMediaServer install: Pre-installation Validation.
PlexMediaServer install: ERROR: Plex Media Server can only be installed on 'init' or 'systemd' based systems.
PlexMediaServer install: Your system has sh but minimally required files are missing.
dpkg: error processing archive plex.deb (--install):
new plexmediaserver package pre-installation script subprocess returned error exit status 1
Processing triggers for libc-bin (2.29-9) ...
Errors were encountered while processing:
plex.deb
Running from a docker-compose with a debian base image
so yes I don’t have systemv/systemd because of docker, is that now a requirement ?
# Make sure we have either init or systemd (Upstart will redirect to systemd so no consideration being given)
if [ $(($Systemd + $Init)) -eq 0 ]; then
Output both "ERROR: Plex Media Server can only be installed on 'init' or 'systemd' based systems."
Output user " Your system has $(cat /proc/1/comm) but minimally required files are missing."
exit 1
fi
Kinda fun when the changelog says that it only adds support to SysVinit
Yes. I specifically test for that during pre-install.
I look to see if the base is linuxserver.io and, knowing it’s already working, let it continue.
# Looks like Docker (s6-svscan = Plex/Linuxserver.io; tini = binhex)
if [ "$(cat /proc/1/comm)" = "s6-svscan" ] || [ "$(cat /proc/1/comm)" = "tini" ]; then
Output both "Docker detected. Preinstallation validation not required."
exit 0
fi
This update is failing and disabling my systemd service in the process.
I’m running this on Ubuntu 18.04 on a bare-metal server.
# dpkg -i plexmediaserver_1.18.5.2260-056ab4be9_amd64.deb
(Reading database ... 246805 files and directories currently installed.)
Preparing to unpack plexmediaserver_1.18.5.2260-056ab4be9_amd64.deb ...
PlexMediaServer install: Pre-installation Validation.
PlexMediaServer install: Pre-installation Validation complete.
Unpacking plexmediaserver (1.18.5.2260-056ab4be9) over (1.18.5.2260-056ab4be9) ...
Setting up plexmediaserver (1.18.5.2260-056ab4be9) ...
PlexMediaServer install:
PlexMediaServer install: Now installing based on:
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: /var/lib/plexmediaserver/tmp_transcoding
PlexMediaServer install: Lang Encoding: en_US.UTF-8
PlexMediaServer install: Config file used: /etc/systemd/system/plexmediaserver.service.d/override.conf
PlexMediaServer install: HW transcoding: Found
PlexMediaServer install:
PlexMediaServer install: Completing final configuration.
useradd: user 'plex' already exists
dpkg: error processing package plexmediaserver (--install):
installed plexmediaserver package post-installation script subprocess returned error exit status 9
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Errors were encountered while processing:
plexmediaserver
The primary problem is that the installation is trying to add a user that already exists.
The installation appears to be running a simple grep command against /etc/passwd to check if the plex user exists. That doesn’t work on my system. On my system, the plex user and plex group are both provided by an external FreeIPA server.
To account for a case such as this, I suggest using the getent passwd plex command instead. That returns more reliable results than grep, as does getent group plex.
Nothing is overridden that I’m aware of. This is simply the first update that failed and the output shows why. Previous updates have never reported back this way … they just worked.
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=897fd7ba-c42d-42e4-90a8-ebd6b01d4445 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=1d209f60-ecfb-424a-bbfb-6ea7ea089428 none swap sw 0 0
tmpfs /tmp tmpfs defaults 0 0
# >>> [openmediavault]
/dev/disk/by-label/4T /srv/dev-disk-by-label-4T ntfs defaults,nofail 0 2
/dev/disk/by-label/EFI /srv/dev-disk-by-label-EFI vfat defaults,nofail 0 2
/dev/disk/by-label/10T_2 /srv/dev-disk-by-label-10T_2 ntfs defaults,nofail 0 2
/dev/disk/by-label/10T_1 /srv/dev-disk-by-label-10T_1 ntfs defaults,nofail 0 2
/dev/disk/by-label/2T_1 /srv/dev-disk-by-label-2T_1 ntfs defaults,nofail 0 2
/dev/disk/by-label/2T_2 /srv/dev-disk-by-label-2T_2 ntfs defaults,nofail 0 2
/dev/disk/by-label/10T_3 /srv/dev-disk-by-label-10T_3 ntfs defaults,nofail 0 2
/dev/disk/by-label/Elements /srv/dev-disk-by-label-Elements ntfs defaults,nofail 0 2
/dev/disk/by-label/10T_4 /srv/dev-disk-by-label-10T_4 ntfs defaults,nofail 0 2
# <<< [openmediavault]
Thanks for letting me know about OMV . That does change things a bit but, as I said,
It’s not failing with a chown
It is attempting to verify the UID plex runs as is the owner of the PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR
I asked if an override was in use because the User and Group PMS can be started as can be changed with a systemd override
To resolve this:
Does Plex Media Server run as User plex or does it run as another user ID ?
If it runs as another user id, I need to understand how that is set in OMV so I can accommodate it. There has never been official support for OMV before. If I can make it possible now, now is the time.
We have chatted here about how to deal with cat /proc/1/comm returning sh (a home-rolled container)
There’s nothing blocking cat /proc/1/comm returning sh
I will add that, with other changes I have, and included in the next PlexPass beta update
@zoltair
I’ve made the changes. Those will be part of the next update to the PlexPass beta.
@annunaki
I’m trying to setup an OMV environment now so I can ensure installing on OMV is possible. I would like to work with you further on this.
Regarding NTFS, in particular UID checking, the ERROR will be backed down to a WARNING and installation will continue at the user’s risk. I will make this change.
All the above changes will be available together in the next update (as soon as reviewed and approved) in PlexPass beta.
If you can confirm for me that getent passwd ADplex resolves correctly then I have already fixed it. Those changes have been submitted for an update build.