Plex server 1.15.0.659 broke my setup

Server Version#: 1.15.0.659
Player Version#:

Very similar (almost exact) issue as this: Plex server 1.15.0.647 broke my setup

$ sudo systemctl status plexmediaserver.service
● plexmediaserver.service - Plex Media Server
   Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2019-02-08 16:10:20 PST; 1min 3s ago
  Process: 1448 ExecStartPre=/bin/sh -c /usr/bin/test -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" || /bin/mkdir -p "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" (code=exited, status=0/SUCCESS)
 Main PID: 1452 (sh)
    Tasks: 6 (limit: 4915)
   CGroup: /system.slice/plexmediaserver.service
           ├─1452 /bin/sh -c  PLEX_MEDIA_SERVER_INFO_VENDOR="$(grep ^NAME= /etc/os-release | awk -F= "{print \$2}" | tr -d \" )"  PLEX_MEDIA_SERVER_INFO_DEVICE="PC"  PLEX_MEDIA_SERVER_INFO_MODEL="$(uname -m)"
           └─1469 /usr/lib/plexmediaserver/Plex Media Server

Feb 08 16:10:20 raph systemd[1]: Starting Plex Media Server...
Feb 08 16:10:20 raph systemd[1]: Started Plex Media Server.

Cannot access the server locally through (site cannot be reached): http://my_ip:32400

$ lsof -i | grep 32400 returns nothing.

Running stop hangs:

$ sudo systemctl stop plexmediaserver.service
$ sudo systemctl status plexmediaserver.service
● plexmediaserver.service - Plex Media Server
   Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled)
   Active: failed (Result: timeout) since Fri 2019-02-08 16:19:42 PST; 6s ago
  Process: 1452 ExecStart=/bin/sh -c  PLEX_MEDIA_SERVER_INFO_VENDOR="$(grep ^NAME= /etc/os-release | awk -F= "{print \$2}" | tr -d \" )"  PLEX_MEDIA_SERVER_INFO_DEVICE="PC"  PLEX_MEDIA_SERVER_INFO_MODEL="$(unam
  Process: 1448 ExecStartPre=/bin/sh -c /usr/bin/test -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" || /bin/mkdir -p "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" (code=exited, status=0/SUCCESS)
 Main PID: 1452 (code=killed, signal=TERM)

Feb 08 16:10:20 raph systemd[1]: Starting Plex Media Server...
Feb 08 16:10:20 raph systemd[1]: Started Plex Media Server.
Feb 08 16:18:12 raph systemd[1]: Stopping Plex Media Server...
Feb 08 16:19:42 raph systemd[1]: plexmediaserver.service: State 'stop-final-sigterm' timed out. Killing.
Feb 08 16:19:42 raph systemd[1]: plexmediaserver.service: Killing process 1469 (Plex Media Serv) with signal SIGKILL.
Feb 08 16:19:42 raph systemd[1]: plexmediaserver.service: Failed with result 'timeout'.
Feb 08 16:19:42 raph systemd[1]: Stopped Plex Media Server.

Logs attached:
Logs.tar.gz (3.4 MB)

Thanks for the logs.

Please check in /etc for a plexmediaserver.service file. It would be under /etc/systemd somewhere if it exists.

sudo journalctl -xe | grep -i plex

will tell us a lot.

We are seeing where some of the Upstart upgraded systems (Ubuntu 15) and early Ubuntu 16 systems had the service file in /etc/systemd/system/plexmediaserver.service.

If any service files for Plex exist in /etc it will most likely prevent it from starting because the variable LD_LIBRARY_PATH changed.

The distributed version is in /lib/systemd/system/plexmediaserver.service

If you wish to have customizations, please let me know and I will assist if needed.

plexmediaserver.service does not exist anywhere under /etc/systemd.

It does exist here:

$ cat /lib/systemd/system/plexmediaserver.service
[Unit]
Description=Plex Media Server
After=network.target network-online.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 '\
PLEX_MEDIA_SERVER_INFO_VENDOR="$(grep ^NAME= /etc/os-release | awk -F= "{print \\$2}" | tr -d \\" )" \
PLEX_MEDIA_SERVER_INFO_DEVICE="PC" \
PLEX_MEDIA_SERVER_INFO_MODEL="$(uname -m)" \
PLEX_MEDIA_SERVER_INFO_PLATFORM_VERSION="$(grep ^VERSION= /etc/os-release | awk -F= "{print \\$2}" | tr -d \\" )" \
LD_LIBRARY_PATH=/usr/lib/plexmediaserver/lib \
"/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

Output of journalctl:

$ sudo journalctl -xe | grep -i plex
Feb 08 17:29:58 raph systemd[1]: Starting Plex Media Server...
-- Subject: Unit plexmediaserver.service has begun start-up
-- Unit plexmediaserver.service has begun starting up.
Feb 08 17:29:58 raph systemd[1]: Started Plex Media Server.
-- Subject: Unit plexmediaserver.service has finished start-up
-- Unit plexmediaserver.service has finished starting up.
Feb 08 17:30:37 raph systemd-udevd[2685]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Feb 08 17:30:37 raph systemd-udevd[2686]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Feb 08 17:30:39 raph systemd-udevd[2895]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Feb 08 17:30:52 raph systemd-udevd[3110]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Feb 08 17:30:52 raph systemd-udevd[3144]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Feb 08 17:30:53 raph systemd-udevd[3178]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Feb 08 17:30:53 raph systemd-udevd[3179]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Feb 08 17:30:53 raph systemd-udevd[3236]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Feb 08 17:30:53 raph systemd-udevd[3237]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.

Thank you…

I already see it.

Environment=PLEX_MEDIA_SERVER_HOME=/usr/lib/plexmediaserver

This is wrong and not how it’s distributed.
Now to figure out how that happened.

Are you certain you installed 1.15.0.659-9311f93fd

I will download and install again here to verify

That’s the one.

$ ll plexmediaserver_1.15.0.659-9311f93fd_amd64.deb
-rw-r--r-- 1 raph raph 81547030 Feb  8 17:52 plexmediaserver_1.15.0.659-9311f93fd_amd64.deb

To be certain it’s not a corrupt file, here’s the SHA256:

$ shasum -a 256 plexmediaserver_1.15.0.659-9311f93fd_amd64.deb
afd83994033904f828641786d99e9075a8e67f5621da762bcdd756c4fb4926fe  plexmediaserver_1.15.0.659-9311f93fd_amd64.deb

Having examined the machine together, @raphattack and I were able to determine the root problem to be a changed UID/GID for /var/lib/plexmediaserver and its contents.

We are uncertain where that is but when downgrading to PMS 1.14.1.5488, we discovered it would not run either meaning the problem originated elsewhere.

We correct the problem by applying

sudo chown -R plex:plex /var/lib/plexmediaserver
sudo find /var/lib/plexmediaserver -type f -exec chmod 644 {} \;
sudo find /var/lib/plexmediaserver -type d -exec chmod 755 {} \;

So I have a file here dated this Dec 14 2018
$ ls -altrh /lib/systemd/system/plexmediaserver.service
-rw-r–r-- 1 root root 768 Dec 14 13:11 /lib/systemd/system/plexmediaserver.service
That sets the Environment=PLEX_MEDIA_SERVER_HOME=/usr/lib/plexmediaserver
You mentioned “This is not how it’s distributed” Well after apt-get remove plexmediaserver, and basically cleaning up a lot of remenants, the dpkg -i ./1.15 isn’t idempotent enough to remove this veriable. Should I presume this var is /var/lib/plexmediaserver instead of /usr/lib/?

As of now, 1.14 is working wth the above. Any insight on the recommended $ENV_VAR for PMS_HOME is sincerely appreciated.

I have been reading patiently on the whole 1.15 on Ubuntu threads, because I finally regressed back to 1.14 after much consternation. I do appreciate Chuck’s knowledgeable help and assistance (and tips/howtos for Linux) I would have done some log captures but my setup is too much a Rube Golberg’s machine to qualify as a clean/semi clean state. However. I just wanted to express from the field, I’ve never had a version go tts up as fast and as frequent as the last OSX debacle and had to regress two versions back as well. Some things I did notice, (since I have 2 servers with reverse DNS enabled. The fancy proxying behind the scenes does not like my setup, and sht the bed probably every 15 minutes until I cleaned, and reverted back to 1.14.1.5488

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