Server no longer reachable after updating, on Ubuntu 18.04

I had a working setup on Ubuntu 18.04, running Plex 1.15. After updating to 1.16, my server is no longer reachable, even though the service is marked as “active”. So I tried downgrading to 1.15 which didn’t solve the problem. Then I tried installing the .deb from the new linux installer topic. Installation is successful, and this happens when i start the service:

root@Ubuntu-1804-bionic-64-minimal ~ # sudo service plexmediaserver start
root@Ubuntu-1804-bionic-64-minimal ~ # sudo service plexmediaserver status
● plexmediaserver.service - Plex Media Server
   Loaded: loaded (/lib/systemd/system/plexmediaserver.service; disabled; vendor preset: enabled)
   Active: active (running) since Fri 2019-06-21 18:30:56 CEST; 3s ago
  Process: 2640 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: 2642 (sh)
    Tasks: 6 (limit: 4915)
   CGroup: /system.slice/plexmediaserver.service
           ├─2642 /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-re
           └─2652 /usr/lib/plexmediaserver/Plex Media Server

Jun 21 18:30:56 Ubuntu-1804-bionic-64-minimal systemd[1]: Starting Plex Media Server...
Jun 21 18:30:56 Ubuntu-1804-bionic-64-minimal systemd[1]: Started Plex Media Server.
root@Ubuntu-1804-bionic-64-minimal ~ # ps aux | grep plex
plex      2642  0.0  0.0   4628   832 ?        Ss   18:30   0:00 /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"
plex      2652  0.0  0.0 396948 28512 ?        Sl   18:30   0:00 /usr/lib/plexmediaserver/Plex Media Server
root      2664  0.0  0.0  18960  1088 pts/0    S+   18:31   0:00 grep --color=auto plex

However, the server is not reachable anymore according to plex web, or by going to http://ip:32400. There are also no recent lines in /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs/Plex Media Server.log.

Does anyone know what happened here, or what I did wrong? Thanks for the assistance!

Thanks for creating here.

You can take the new installer info out. It’s not needed.

Please do the normal:

  1. Sign your Plex/web session out (upper right corner)
  2. Open an incognito window to the server IP
  3. See if you can sign in that way.

If not, we will get more drastic and force a ‘soft reset/reclaim’ (this is a common problem now)

Also, as a direct comparison, back down to current Public PMS, get it working again.
Then use Plex Pass beta.

I followed to steps, unfortunately without success. Going to the server ip in my browser gives me a connection refused error, and also when I try on the box directly:

root@Ubuntu-1804-bionic-64-minimal ~/pp # wget http://127.0.0.1:32400
--2019-06-21 19:39:24--  http://127.0.0.1:32400/
Connecting to 127.0.0.1:32400... failed: Connection refused.

I will try going back to public version of the server and report back, thanks.

Edit: tried v1.16.0.1226, unfortunately it didn’t solve the issue.

If there is no socket, then PMS isn’t even running.

The wget would have returned 401 if PMS is running.

Please manually grab the log files.

sudo tar cfz /tmp/Logs.tar.gz "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs"

Attach the tar.gz from /tmp here.

If there is no socket, then PMS isn’t even running.

That’s what I thought as well, but ps does show it running

root@Ubuntu-1804-bionic-64-minimal ~ # ps aux | grep plex
plex      3331  0.0  0.0   4628   788 ?        Ss   19:44   0:00 /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"
plex      3341  0.0  0.0 396948 28536 ?        Sl   19:44   0:00 /usr/lib/plexmediaserver/Plex Media Server

I checked Plex Media Server.log but there are no new entries in it, its really weird. Here is the tar file: Logs.tar.gz (2.7 MB)

Did Plex’s UID/GID change or permissions to /var/lib/plexmediaserver get changed to root ? It’s about the only thing which would halt a running system.

sudo journalctl -xe | grep -i plex

Look through there, see if you spot any major errors from when PMS starts.

Also,

sudo systemctl restart plexmediaserver
sudo systemctl status plexmediaserver

See what status is returned.

journalctl doesnt show any errors, just a bunch of stops and starts.

The sudo systemctl restart plexmediaserver command hangs, i have to manually kill -9 the /usr/lib/plexmediaserver/Plex Media Server process. Then when I run it:

root@Ubuntu-1804-bionic-64-minimal ~ # sudo systemctl start plexmediaserver
root@Ubuntu-1804-bionic-64-minimal ~ # sudo systemctl status plexmediaserver
● plexmediaserver.service - Plex Media Server
   Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2019-06-21 20:32:48 CEST; 6s ago
  Process: 3591 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: 3593 (sh)
    Tasks: 6 (limit: 4915)
   CGroup: /system.slice/plexmediaserver.service
           ├─3593 /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-re
           └─3603 /usr/lib/plexmediaserver/Plex Media Server

Jun 21 20:32:48 Ubuntu-1804-bionic-64-minimal systemd[1]: Starting Plex Media Server...
Jun 21 20:32:48 Ubuntu-1804-bionic-64-minimal systemd[1]: Started Plex Media Server.

Ok, let’s find out what’s really going on.

netstat -an | grep 32400
netstat -rn 
ps -ef | grep -i plex
ls -la "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server"

EDIT: Forgot one line.

root@Ubuntu-1804-bionic-64-minimal ~ # netstat -an | grep 32400
root@Ubuntu-1804-bionic-64-minimal ~ # netstat -rn 
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         XXX.XXX.XXX.XXX 0.0.0.0         UG        0 0          0 eno1
root@Ubuntu-1804-bionic-64-minimal ~ # ps -ef | grep -i plex
plex      3593     1  0 20:32 ?        00:00:00 /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"
plex      3603  3593  0 20:32 ?        00:00:00 /usr/lib/plexmediaserver/Plex Media Server
root      3621  2960  0 20:59 pts/0    00:00:00 grep --color=auto -i plex
root@Ubuntu-1804-bionic-64-minimal ~ # ls -la "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server"
total 52
drwxr-xr-x 11 plex plex 4096 Jun 21 17:40  .
drwxr-xr-x  3 plex plex 4096 Mar 18 22:34  ..
drwxr-xr-x  6 plex plex 4096 Jun 21 17:32  Cache
drwxr-xr-x  4 plex plex 4096 Mar 18 23:51  Codecs
drwxr-xr-x  6 plex plex 4096 Jun 21 19:44 'Crash Reports'
drwxr-xr-x  2 root root 4096 Mar 21 02:04  Diagnostics
drwxr-xr-x  3 plex plex 4096 Jun 21 17:38  Logs
drwxr-xr-x  3 root root 4096 Mar 18 23:24  Media
drwxr-xr-x  4 root root 4096 Mar 19 23:50  Metadata
drwxr-xr-x  7 plex plex 4096 Mar 18 22:34 'Plug-in Support'
drwxr-xr-x  3 plex plex 4096 Mar 18 22:35  Plug-ins
-rw-------  1 root root  889 Jun 21 17:30  Preferences.xml
-rw-r--r--  1 plex plex    4 Jun 21 20:32  plexmediaserver.pid

Is this server remote or local?

Remote

Now look very carfully at the Plex Media Server directory.

Preferences.xml is owned by root.

Made a manual change in it and forgot?

sudo systemctl stop plex
sudo chown -R plex:plex /var/lib/plexmediaserver
sudo systemctl start plex

Something changed the permissions. Plex doesn’t have permission to read/write its own directories

That fixed it, thanks so much! I checked ownership of some files, but not all haha. I did not manually change anything here so not sure what happened, but at least its fixed now :smiley:

Because of how OS upgrades usually go, I keep my metadata in /home/plexdata
I create a simple override file to access it there.
This method allows PMS to survive an OS re-installation easily.

1 Like

@sarahlezoul4_gmail_com

If your wired network settings are correct, PMS will find the internet.
If the computer can’t get to the internet, that’s something you’ll need to work out.

Sorry

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