Plex not working after upgrade

If you are on a fresh install, we can try this the easy way. Yesterday I pushed a dynamic update package for upgrading Plex… let’s see if this fixes things.

In ssh as root, type: upgradePlex

It’s possible that it will not update and say your version matches, I only want to be certain before moving forward. Jackett had these same anomalous issues wherein an update was wanted by the application, and thus without updating… it crashed every 10 seconds. It’s possible Plex expressing the same unusual behavior.

Errors were encountered while processing:
plexmediaserver
E: Sub-process /usr/bin/dpkg returned an error code (1)
Job for plexmediaserver.service failed. See ‘systemctl status plexmediaserver.service’ and ‘journalctl -xn’ for details.

Ah, there’s a clue.

What does apt -y update && apt -y upgrade return?

The following packages will be upgraded:
plexmediaserver
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 99.8 MB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://shell.ninthgate.se/packages/debian/ jessie/main plexmediaserver amd 64 1.0.3.2461-35f0caa [99.8 MB]
Fetched 99.8 MB in 2s (43.9 MB/s)
Reading changelogs… Done
(Reading database … 77757 files and directories currently installed.)
Preparing to unpack …/plexmediaserver_1.0.3.2461-35f0caa_amd64.deb …
Removed symlink /etc/systemd/system/multi-user.target.wants/plexmediaserver.serv ice.
Unpacking plexmediaserver (1.0.3.2461-35f0caa) over (1.0.2.2413-7caf41d) …
Processing triggers for systemd (215-17+deb8u4) …
Processing triggers for mime-support (3.58) …
Setting up plexmediaserver (1.0.3.2461-35f0caa) …
Job for plexmediaserver.service failed. See ‘systemctl status plexmediaserver.service’ and ‘journalctl -xn’ for details.
dpkg: error processing package plexmediaserver (–configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
plexmediaserver
E: Sub-process /usr/bin/dpkg returned an error code (1)

Ok, let’s try to uninstall and reinstall.

removepackage-plex
apt-get autoremove
apt-get autoclean
installpackage-plex

Same situation as before

[quote=systemctl status plexmediaserver]
● plexmediaserver.service - Plex Media Server for Linux
Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled)
Active: failed (Result: start-limit) since Sat 2016-07-30 09:29:04 CEST; 3min 9s ago
Process: 20172 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=1/FAILURE)

Jul 30 09:28:59 DZGD1464 systemd[1]: Failed to start Plex Media Server for Linux.
Jul 30 09:28:59 DZGD1464 systemd[1]: Unit plexmediaserver.service entered failed state. [/quote]

Are you ok with shooting me a PM so I can login and take a look. It’s possible you have some conflict within your sources.list. There are several variables at play and it’s easier to check hands on.

Hey @JMSolo

just came back from vacation and gonna jump in on this …tried a

update of QB and then

apt-get update && apt-get -V upgrade

Here´s a log view:

Calculating upgrade... The following package was automatically installed and is            no longer required:
   avahi-utils (0.6.31-5)
Use 'apt-get autoremove' to remove it.
Done
The following packages will be upgraded:
   debhelper (9.20150101 => 9.20150101+deb8u2)
   libapache2-mod-php7.0 (7.0.8-1~dotdeb+8.1 => 7.0.9-1~dotdeb+8.1)
   libdbd-mysql-perl (4.028-2+b1 => 4.028-2+deb8u1)
   libgd3 (2.1.0-5+deb8u4 => 2.1.0-5+deb8u6)
   libmysqlclient18 (5.5.49-0+deb8u1 => 5.5.50-0+deb8u1)
   libperl5.20 (5.20.2-3+deb8u5 => 5.20.2-3+deb8u6)
   mysql-common (5.5.49-0+deb8u1 => 5.5.50-0+deb8u1)
   openssh-client (6.7p1-5+deb8u2 => 6.7p1-5+deb8u3)
   openssh-server (6.7p1-5+deb8u2 => 6.7p1-5+deb8u3)
   openssh-sftp-server (6.7p1-5+deb8u2 => 6.7p1-5+deb8u3)
   perl (5.20.2-3+deb8u5 => 5.20.2-3+deb8u6)
   perl-base (5.20.2-3+deb8u5 => 5.20.2-3+deb8u6)
   perl-modules (5.20.2-3+deb8u5 => 5.20.2-3+deb8u6)
   php5-cli (5.6.23+dfsg-0+deb8u1 => 5.6.24+dfsg-0+deb8u1)
   php5-common (5.6.23+dfsg-0+deb8u1 => 5.6.24+dfsg-0+deb8u1)
   php5-readline (5.6.23+dfsg-0+deb8u1 => 5.6.24+dfsg-0+deb8u1)
   php7.0 (7.0.8-1~dotdeb+8.1 => 7.0.9-1~dotdeb+8.1)
   php7.0-cli (7.0.8-1~dotdeb+8.1 => 7.0.9-1~dotdeb+8.1)
   php7.0-common (7.0.8-1~dotdeb+8.1 => 7.0.9-1~dotdeb+8.1)
   php7.0-curl (7.0.8-1~dotdeb+8.1 => 7.0.9-1~dotdeb+8.1)
   php7.0-dev (7.0.8-1~dotdeb+8.1 => 7.0.9-1~dotdeb+8.1)
   php7.0-fpm (7.0.8-1~dotdeb+8.1 => 7.0.9-1~dotdeb+8.1)
   php7.0-gd (7.0.8-1~dotdeb+8.1 => 7.0.9-1~dotdeb+8.1)
   php7.0-json (7.0.8-1~dotdeb+8.1 => 7.0.9-1~dotdeb+8.1)
   php7.0-mcrypt (7.0.8-1~dotdeb+8.1 => 7.0.9-1~dotdeb+8.1)
   php7.0-mysql (7.0.8-1~dotdeb+8.1 => 7.0.9-1~dotdeb+8.1)
   php7.0-opcache (7.0.8-1~dotdeb+8.1 => 7.0.9-1~dotdeb+8.1)
   php7.0-readline (7.0.8-1~dotdeb+8.1 => 7.0.9-1~dotdeb+8.1)
   php7.0-xml (7.0.8-1~dotdeb+8.1 => 7.0.9-1~dotdeb+8.1)
   php7.0-xmlrpc (7.0.8-1~dotdeb+8.1 => 7.0.9-1~dotdeb+8.1)
   plexmediaserver (1.0.0.2261-a17e99e-debian => 1.0.3.2461-35f0caa)
   syncthing (0.14.0 => 0.14.3)

Said yes to keep config file /etc/php/7.0/cli/php.ini as it wanted to overwrite it.
Said yes to keep Configuration file ‘/etc/init/plexmediaserver.conf’

Plex is now dead here as well…

What does systemctl status plexmediaserver show?

TheBox:~# systemctl status plexmediaserver
● plexmediaserver.service - Plex Media Server for Linux
   Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled)
   Active: failed (Result: start-limit) since Sat 2016-07-30 15:33:50 CEST; 42min ago
  Process: 12303 ExecStart=/bin/sh -c LD_LIBRARY_PATH=/usr/lib/plexmediaserver /usr/lib/plexmediaserver/Plex\ Media\ Server (code=exited, status=1/FAILURE)
  Process: 12300 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: 12303 (code=exited, status=1/FAILURE)

Jul 30 15:33:45 TheBox systemd[1]: Unit plexmediaserver.service entered failed state.
Jul 30 15:33:50 TheBox systemd[1]: plexmediaserver.service holdoff time over, schedul...rt.
Jul 30 15:33:50 TheBox systemd[1]: Stopping Plex Media Server for Linux...
Jul 30 15:33:50 TheBox systemd[1]: Starting Plex Media Server for Linux...
Jul 30 15:33:50 TheBox systemd[1]: plexmediaserver.service start request repeated too...rt.
Jul 30 15:33:50 TheBox systemd[1]: Failed to start Plex Media Server for Linux.
Jul 30 15:33:50 TheBox systemd[1]: Unit plexmediaserver.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.

What does the new command version of upgradePlex return? I wonder if you’re having the same issues as @Grayman. If so, something with Plex isn’t writing the proper permissions on the /var/lib/plexmediaserver for upgrading.

worries me a bit with this output though:

Configuration file '/etc/init/plexmediaserver.conf'
 ==> File on system created by you or by a script.
 ==> File also in package provided by package maintainer.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** plexmediaserver.conf (Y/I/N/O/D/Z) [default=N] ? n
Installing new version of config file /etc/default/plexmediaserver ...

Maybe its just me but “Installing new verseion of…” even though I said n…

First nothing…
TheBox:~# upgradePlex

Tried again and then:
TheBox:~# upgradePlex
Job for plexmediaserver.service failed. See ‘systemctl status plexmediaserver.service’ and ‘journalctl -xn’ for details.

You didn’t say no to installing a new version, you said no to replacing your configuration file (which is normal)

Also, have you updated your QuickBox in the last 24 hours? I don’t think you are running the new command version of Plex Upgrade.

Additionally, try to do:

systemctl stop plexmediaserver
systemctl enable plexmediaserver
systemctl start plexmediaserver

Then check the status once more. However, I can say with almost certainty that this is a permissions issue on the directory needed for making Plex not being of high enough permissions.

You can try to do chmod 777 /var/lib/plexmediaserver then run the update once more.

curious…wondering is this the correct name for file?
It falls out when looking at the rest namevise…

Yes did a QB update shortly before the system update…

Will you do the commands I listed above and also type source /root/.bashrc and then try to check the upgradePlex once more. The output you listed is not in-line with the output that would be returned from the new upgrade method, which is now dynamic in grabbing and comparing versions.

That is just a default location file. That is correct. However, Plex always lives in /var/lib/plexmediaserver. You may even want to do an apt-get autoremove and apt-get autoclean

TheBox:~# systemctl stop plexmediaserver
TheBox:~# systemctl enable plexmediaserver
TheBox:~# systemctl start plexmediaserver
TheBox:~# systemctl status plexmediaserver
● plexmediaserver.service - Plex Media Server for Linux
   Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled)
   Active: failed (Result: start-limit) since Sat 2016-07-30 16:33:31 CEST; 38s ago
  Process: 16849 ExecStart=/bin/sh -c LD_LIBRARY_PATH=/usr/lib/plexmediaserver /usr/lib/plexmediaserver/Plex\ Media\ Server (code=exited, status=1/FAILURE)
  Process: 16846 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: 16849 (code=exited, status=1/FAILURE)

Jul 30 16:33:26 TheBox systemd[1]: Unit plexmediaserver.service entered failed state.
Jul 30 16:33:31 TheBox systemd[1]: plexmediaserver.service holdoff time over, schedul...rt.
Jul 30 16:33:31 TheBox systemd[1]: Stopping Plex Media Server for Linux...
Jul 30 16:33:31 TheBox systemd[1]: Starting Plex Media Server for Linux...
Jul 30 16:33:31 TheBox systemd[1]: plexmediaserver.service start request repeated too...rt.
Jul 30 16:33:31 TheBox systemd[1]: Failed to start Plex Media Server for Linux.
Jul 30 16:33:31 TheBox systemd[1]: Unit plexmediaserver.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.

Changed perms of /var/lib/plexmediaserver to 777

TheBox:~# upgradePlex
TheBox:~# upgradePlex
TheBox:~# upgradePlex
TheBox:~# source /root/.bashrc
You are running QuickBox 2.4.4 - on 3e6bf3e9.rev.stofanet.dk:0.0
Your BASH version is 4.3
Sat Jul 30 16:37:55 CEST 2016

#-------------------------------------------------------------
#  Just type any one of the following commands
#  to turn on different bash prompts
#-------------------------------------------------------------
#  commandprompt_on - this prompt shows last command used & more
#  powerprompt_on - this prompt shows colorful system data
#  basicprompt_on - this prompt shows color coded load & cpu avg.
#  prompt_OFF - this turns off extreme prompts and goes back to default
#-------------------------------------------------------------

TheBox:~# upgradePlex
Downloading plex.deb ...
--2016-07-30 16:38:24--  https://plex.tv/downloads/latest/1?channel=16&build=linux-ubuntu-x86_64&distro=ubuntu&X-Plex-Token=removed
Resolving plex.tv (plex.tv)... 52.17.109.161, 52.19.111.38, 54.76.231.216, ...
Connecting to plex.tv (plex.tv)|52.17.109.161|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://downloads.plex.tv/plex-media-server/1.0.3.2461-35f0caa/plexmediaserver_1.0.3.2461-35f0caa_amd64.deb [following]
--2016-07-30 16:38:24--  https://downloads.plex.tv/plex-media-server/1.0.3.2461-35f0caa/plexmediaserver_1.0.3.2461-35f0caa_amd64.deb
Resolving downloads.plex.tv (downloads.plex.tv)... 2400:cb00:2048:1::6814:709, 2400:cb00:2048:1::6814:609, 104.20.6.9, ...
Connecting to downloads.plex.tv (downloads.plex.tv)|2400:cb00:2048:1::6814:709|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 99819494 (95M) [application/octet-stream]
Saving to: ‘/root/plex-tmp/plex.deb’

/root/plex-tmp/plex.de 100%[=============================>]  95.19M  40.8MB/s   in 2.3s

2016-07-30 16:38:27 (40.8 MB/s) - ‘/root/plex-tmp/plex.deb’ saved [99819494/99819494]

Comparing versions ...
Currently installed version is 1.0.3.2461 ...
Downloaded version is 1.0.3.2461 ...
1.0.3.2461 is not greater than 1.0.3.2461
Deleting downloaded package ...
rm: remove regular file ‘plex.deb’? y
Deleting /root/plex-tmp directory ...
Restarting Plex Media Server ...
[ Upgrade Complete ]
TheBox:~#

Believe it or not, that result is good. This means we’re not facing a permissions issue - or a dependencies lock.

Do you do also the apt-get autoremove and apt-get autoclean

If so, follow that up with apt -y update && apt -y upgrade

Now we’ll start cooking with hot water.

Did all the commands mentioned yes and in that order :slight_smile:

No errors on the apt -y update && apt -y upgrade