Closed Spazholio closed 1 year ago
Arch is not a supported platform at this point.
Because it's not supported as part of Plex main distribution, I have no knowledge of how it might be installed on a host.
Things I need to know:
Arch Linux
( a file in /etc usually works for this - /etc/os-release, etc )Plex SQLite
)logger
is the system logging tool.There might be a few other tweaks but these are the known variables to fill in as HostConnfig()
runs and configures the script to run on the host.
Understood. If you have any interest in adding Arch as a supported platform, here are the answers to at least those 5 questiions:
The output of /etc/os-release
is:
NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://bugs.archlinux.org/"
PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
LOGO=archlinux-logo
Additionally, the output of uname -r
is 6.2.12-arch1-1
which feels weaker than using /etc/os-release
/usr/lib/plexmediaserver/Plex\ SQLite
I don't have this set as an environment variable, but /var/lib/plex/Plex Media Server/
contains the following:
drwxr-xr-x 5 plex plex 4.0K Apr 11 12:43 Codecs
drwxr-xr-x 37 plex plex 4.0K May 1 17:40 'Crash Reports'
drwxr-xr-x 2 plex plex 4.0K Apr 8 19:01 Diagnostics
drwxr-xr-x 3 plex plex 4.0K Apr 8 19:01 Drivers
drwxr-xr-x 4 plex plex 4.0K May 4 15:12 Logs
drwxr-xr-x 3 plex plex 4.0K Apr 8 19:05 Media
drwxr-xr-x 7 plex plex 4.0K Apr 8 19:05 Metadata
-rw-r--r-- 1 plex plex 7 May 1 17:40 plexmediaserver.pid
drwxr-xr-x 4 plex plex 4.0K Apr 19 14:11 Plug-ins
drwxr-xr-x 8 plex plex 4.0K Apr 8 19:21 'Plug-in Support'
-rw------- 1 plex plex 1.8K May 3 17:40 Preferences.xml
drwxr-xr-x 4 plex plex 4.0K Apr 19 14:12 Scanners
-rw------- 1 plex plex 13K May 2 22:07 'Setup Plex.html'
drwxr-xr-x 2 plex plex 4.0K Apr 8 19:21 Update
systemctl [start|stop] plexmediaserver.service
I'm uncertain about this one. I know that Plex logs to standalone log files, but I'm don't know if journalctl
is thrown into the mix there.
try man logger
and see if you get a man page.
As for the environment variables, they all will be defined in /lib/systemd/system/plexmediaserver.service
if the start/stop is systemd compliant.
I get a man page, yes.
And the contents of /lib/systemd/system/plexmediaserver.service
are:
[Unit]
Description=Plex Media Server
After=network.target network-online.target
[Service]
# In this file, set LANG and LC_ALL to en_US.UTF-8 on non-English systems to avoid mystery crashes.
EnvironmentFile=/etc/conf.d/plexmediaserver
ExecStart=/usr/lib/plexmediaserver/Plex\x20Media\x20Server
SyslogIdentifier=plexmediaserver
Type=simple
User=plex
Group=plex
Restart=on-failure
RestartSec=5
StartLimitInterval=60s
StartLimitBurst=3
[Install]
WantedBy=multi-user.target
And the contents of /etc/conf.d/plexmediaserver
are:
LD_LIBRARY_PATH=/usr/lib/plexmediaserver/lib
PLEX_MEDIA_SERVER_HOME=/usr/lib/plexmediaserver
PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/var/lib/plex
PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6
PLEX_MEDIA_SERVER_TMPDIR=/tmp
TMPDIR=/tmp
Thanks.
That's what I need to add Arch Linux support.
I'll try to craft up a draft version this weekend.
No rush, I appreciate the efforts. Please let me know if you need a guinea pig.
@Spazholio
On branch chuckpa/add-arch-support
, you will find:
Please let me know what you find.
Color me dumb, but I don't see that branch yet?
You do now. The :monkey: pushed the :eject_button: :rofl:
Running as root (tried as regular user and as sudo as well):
Given application support directory override specified does not exist: ''. Ignoring.
ERROR: Cannot write to Databases directory. Insufficient privilege.
Additionally, on line 471, that isn't a directory that exists on my filesystem.
DAMN IT.
How do you have it in /etc/systemd/system/plexmediaserver.service.d/override.conf ?
I thought PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR points to
AppSuppDir="/var/lib/plex/Library/Application Support"
Did I misunderstand you?
Nevermind, I did. :)
Please edit line 471 and remove the Application Support
part from the path.
Here's what's in that file:
[Unit]
After=mnt-data-media-movies.mount mnt-data-media-tvshows.mount mnt-data-media-videos.mount mnt-data-media-musicvideos.mount mnt-data-media-music.mount
Requires=mnt-data-media-movies.mount mnt-data-media-tvshows.mount mnt-data-media-videos.mount mnt-data-media-musicvideos.mount mnt-data-media-music.mount
But this file doesn't normally exist and was just recently added a couple of days ago to make sure that my network were mounts before Plex starts up. Otherwise it kinda sorta nukes my entire library.
And as per /etc/conf.d/plexmediaserver
:
PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/var/lib/plex
It's common for networking to be slower than Plex.
On Ubuntu/Debian/Redhat, we have it
[Unit]
Description=Plex Media Server
After=network.target network-online.target
Check that on your system. "network-online.target" is systemd's signal that the network is ready
Found my problem with reading the override.
use this please:
# Where is the data
AppSuppDir="/var/lib/plex"
# Find the metadata dir if customized
if [ -e /etc/systemd/system/plexmediaserver.service.d ]; then
# Get custom AppSuppDir if specified
NewSuppDir="$(GetOverride PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR)"
if [ "$NewSuppDir" != "" ]; then
if [ -d "$NewSuppDir" ]; then
AppSuppDir="$NewSuppDir"
else
Output "Given application support directory override specified does not exist: '$NewSuppDir'. Ignoring."
fi
fi
fi
I have an improvement suggestion for your package maintainer.
The service file should be updated to handle the network configuration delay. (SSD systems boot faster than the network hardware can init)
Add the After=
clause
[Unit]
Description=Plex Media Server
After=network.target network-online.target
[Service]
@Spazholio
Paul, Have you had an opportunity to try both these changes ?
Shoot! Sorry, life gets in the way sometimes. It appears to be working quite well now.
@Spazholio
If you're happy with these changes, I'll commit then to the branch and merge
I have a PR. care to review it ? Thoughts?
Sure thing.
Completed.
Unsure what you need from me to diagnose/troubleshoot, but I'm running on the latest version of Arch and getting the above error when attempting to run.