Plex media server not working after installation completing without error on ubuntu 16.04 LTS

That is absolutely not an official distribution file. It looks like someone’s template on how to change the username and group Plex runs as and didn’t do it correctly.

Of interest look at:

User=user
Group=group

You are having problems because there is no user named user and no group named group.

Here is from the official package.

chuck@udummy:/etc/systemd/system$ cd 
chuck@udummy:~$ ls -la /lib/systemd/system/plexmediaserver.service 
-rw-r--r-- 1 root root 746 Dec 21 18:37 /lib/systemd/system/plexmediaserver.service
chuck@udummy:~$ cat /lib/systemd/system/plexmediaserver.service 
[Unit]
Description=Plex Media Server for Linux
After=network.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 'LD_LIBRARY_PATH=/usr/lib/plexmediaserver /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
chuck@udummy:~$ uname -a
Linux udummy 4.4.0-59-generic #80-Ubuntu SMP Fri Jan 6 17:47:47 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
chuck@udummy:~$ 

To fix this:

  1. sudo rm /etc/systemd/system/plexmediaserver.service
  2. sudo systemctl daemon-reload
  3. sudo systemctl start plexmediaserver

@ChuckPa & @aschmidtm
Thanks again for all your help and support.

After wasting these many hours and not succeeding. I decided to go to Ubuntu 14.X. There are thousand blogs around how to setup plex on ubuntu.

What’s the official steps to install Plex server on it?

Hi - it’s not because I want to hijack the thread, but I’m having the “exact” same issue on Ubuntu 16.04 lts.

Exact being “exact”, because I have just upgraded to 1.3.4 from 1.3.3 - and I got the error now. If I downgrade to 1.33, the error disappears. I read the sticky, and deleting /etc/systemd/system/plexmediaserver.service does not fix it.

Output from systemctl status:
`● plexmediaserver.service - Plex Media Server for Linux
Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/plexmediaserver.service.d
└─local.conf
Active: activating (auto-restart) (Result: exit-code) since Fri 2017-02-03 11:16:39 CET; 4s ago
Process: 27078 ExecStart=/bin/sh -c LD_LIBRARY_PATH=/usr/lib/plexmediaserver /usr/lib/plexmediaserver/Plex\ Media\ Server (code=exited, status=127)
Process: 27073 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: 27078 (code=exited, status=127)

Feb 03 11:16:39 dak systemd[1]: plexmediaserver.service: Unit entered failed state.
Feb 03 11:16:39 dak systemd[1]: plexmediaserver.service: Failed with result ‘exit-code’.
`

Another thing, plexmediaserver.service is located in /lib/systemd/system/ and not in /usr/lib/systemd/system (that path doesn’t exist at all)

cat of /lib/systemd/system/plexmediaserver.service:
`[Unit]
Description=Plex Media Server for Linux
After=network.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 ‘LD_LIBRARY_PATH=/usr/lib/plexmediaserver /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
`

I have no override.conf file (if I ever need to customize stuff, I will make one, I like the “unified” idea for configuration.

Permissions and ownership for /var/lib/plexmediaserver/Library/* are correctly set to plex:plex with rwx

I’ve run out of ideas now, and read a bunch of threads of similar problems but none have a solution that fixes my predicament.

Should I make a new thread instead of posting in this one with a similar issue ?

I don’t mind if nobody else does. (I’m just the hired help around here anyway LOL)

Ubuntu does keep things separate. If I’ve eluded to the contrary, I apologize. On redhat systems (Fedora) /lib/systemd is a hard link to /usr/lib/systemd

Your output from systemd shows it did find a configuration file

Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/plexmediaserver.service.d
└─local.conf

The override (a Service override) is /etc/systemd/system/plexmediaserver.service.d/local.conf

If you’re using a purely stock configuration with /var/lib/plexmediaserver/Library, user plex, and group plex, there’s no reason you should need that.
I therefore suggest you remove it and have systemd rescan

sudo rm -rf /etc/systemd/system/plexmediaserver.service.d
sudo systemctl daemon-reload

With respect to your actual Library permissions, I would like to suggest making things a little more sane in your library if you’re up to it. It will make directory listings a lot easier to read at the terminal level without all the highlighting.

  1. Directories will be owned by plex:plex but allow for anyone in the plex group to modify them
  2. Files will be the same. I do caution of the obvious dangers of modifying things without understanding repercussions.

If you wish to do this, while PMS is stopped.

sudo find /var/lib/plexmediaserver -type d -exec chmod 775 {} \;
sudo find /var/lib/plexmediaserver -type f -exec chmod 664 {} \;

Data files don’t need 777 permission (execute). Everything in your Library is data. All the executables are in /usr/lib/plexmediaserver

Depending on the size of your library currently, this might take a bit to complete. The drive(s) will rattle :smiley:

Once complete, start PMS

sudo service plexmediaserver start

Hi ChuckPa

the library permissions are 766 atm - and correct, I should change that. I doubt that will have any influence on my current problem though. And my drives should be fine I think:
`

Enc# Slot# ModelName Capacity Usage

1 01 Slot#1 N.A. 0.0GB N.A.
2 01 Slot#2 N.A. 0.0GB N.A.
3 01 Slot#3 N.A. 0.0GB N.A.
4 01 Slot#4 N.A. 0.0GB N.A.
5 01 Slot#5 N.A. 0.0GB N.A.
6 01 Slot#6 N.A. 0.0GB N.A.
7 01 Slot#7 N.A. 0.0GB N.A.
8 01 Slot#8 N.A. 0.0GB N.A.
9 02 SLOT 01 ST31500341AS 1500.3GB Free
10 02 SLOT 02 ST31500341AS 1500.3GB Free
11 02 SLOT 03 ST_M13FQBL 0.0GB Failed
12 02 SLOT 04 ST31500341AS 1500.3GB Free
13 02 SLOT 05 ST4000VN000-2AH166 4000.8GB archive
14 02 SLOT 06 ST4000VN000-1H4168 4000.8GB archive
15 02 SLOT 07 ST31500341AS 1500.3GB linuxboot
16 02 SLOT 08 ST31500341AS 1500.3GB linuxboot
17 02 SLOT 09 N.A. 0.0GB N.A.
18 02 SLOT 10 N.A. 0.0GB N.A.
19 02 SLOT 11 N.A. 0.0GB N.A.
20 02 SLOT 12 ST4000VN000-2AH166 4000.8GB archive
21 02 SLOT 13 ST4000VN000-1H4168 4000.8GB archive
22 02 SLOT 14 ST4000VN000-1H4168 4000.8GB archive
23 02 SLOT 15 ST4000VN000-1H4168 4000.8GB archive
24 02 SLOT 16 ST4000VN000-1H4168 4000.8GB archive
25 02 SLOT 17 ST4000VN000-1H4168 4000.8GB archive
26 02 SLOT 18 ST4000VN000-1H4168 4000.8GB archive
27 02 SLOT 19 ST4000VN000-1H4168 4000.8GB archive
28 02 SLOT 20 ST4000VN000-1H4168 4000.8GB archive
29 02 SLOT 21 ST4000VN000-1H4168 4000.8GB archive
30 02 SLOT 22 ST4000VN000-1H4168 4000.8GB archive
31 02 SLOT 23 ST4000VN000-1H4168 4000.8GB archive
32 02 SLOT 24 ST4000VN000-1H4168 4000.8GB archive
33 02 EXTP 01 N.A. 0.0GB N.A.
34 02 EXTP 02 N.A. 0.0GB N.A.
35 02 EXTP 03 N.A. 0.0GB N.A.
36 02 EXTP 04 N.A. 0.0GB N.A.

GuiErrMsg<0x00>: Success.

Name Raid Name Level Capacity Ch/Id/Lun State

1 vol_archive archive Raid6 52000.0GB 00/00/00 Normal
2 ARC-1880-VOL#002 linuxboot Raid1+0 1000.0GB 00/00/02 Normal

GuiErrMsg<0x00>: Success.
`

I removed local.conf, did systemctl daemon-reload and upgraded to plexmediaserver_1.3.4.3285-b46e0ea_i386.deb

issue remains, same error:

`
● plexmediaserver.service - Plex Media Server for Linux
Loaded: loaded (/etc/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled)
Active: inactive (dead) (Result: exit-code) since Sat 2017-02-04 06:37:55 CET; 3min 35s ago
Process: 23598 ExecStart=/bin/sh -c LD_LIBRARY_PATH=/usr/lib/plexmediaserver /usr/lib/plexmediaserver/Plex\ Media\ Server (code=exited, status=127)
Process: 23593 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: 23598 (code=exited, status=127)

Feb 04 06:37:50 dak systemd[1]: plexmediaserver.service: Unit entered failed state.
Feb 04 06:37:50 dak systemd[1]: plexmediaserver.service: Failed with result ‘exit-code’.
Feb 04 06:37:55 dak systemd[1]: plexmediaserver.service: Service hold-off time over, scheduling restart.
Feb 04 06:37:55 dak systemd[1]: Stopped Plex Media Server for Linux.
Feb 04 06:37:55 dak systemd[1]: plexmediaserver.service: Start request repeated too quickly.
Feb 04 06:37:55 dak systemd[1]: Failed to start Plex Media Server for Linux.
`

[edit] edited for readability, output from raidcontroller contained lines with loads of =-signs

Please do correct the directory and file permissions.

766 means only the owner plex can even traverse a directory. That’s really non-standard and asks for trouble.

Now that you have the override gone,

Please do sudo journalctl -xe and start scrolling up/down and looking for the and of the log and PMS’s last entries. This is where you’ll find what systemd doesn’t keep track of.

It will look like this:

chuck@udummy:/usr/lib$ journalctl -xe | grep plex
Feb 04 00:18:36 udummy systemd[1]: [/lib/systemd/system/plexmediaserver.service:11] Invalid escape sequences in line, correcting: "/bin/sh -c 'LD_LIBRARY_PATH=/usr/lib/plexmediaserver /usr/lib/plexmediaserver/Plex\ Media\ Server'"
Feb 04 00:18:46 udummy kernel: e1000: enp0s3 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
-- Subject: Unit plexmediaserver.service has begun start-up
-- Unit plexmediaserver.service has begun starting up.
-- Subject: Unit plexmediaserver.service has finished start-up
-- Unit plexmediaserver.service has finished starting up.
chuck@udummy:/usr/lib$

You’ll see it spitting errors at what’s stopping it. -xe (without the trailing grep) will let you scroll up/down and read interactively.

Sorry, got pulled away to work, apparantly someone decided to demote a domain-controller in the middle of the workday. And delete the DNS zones. /sigh.

Right, to business:

  Feb 04 21:31:34 dak systemd[1]: Reloading.
 Feb 04 21:31:35 dak systemd[1]: [/etc/systemd/system/plexmediaserver.service:11] Invalid escape sequences in line, correcting: "/bin/sh -c 'LD_LIBRARY_PATH=/usr/lib/plexmediaserver /usr/lib/plexmediaserver/Plex\ Media\ Server'"
 Feb 04 21:31:35 dak systemd[1]: snapd.refresh.timer: Adding 3h 18min 13.791102s random time.
 Feb 04 21:31:35 dak systemd[1]: apt-daily.timer: Adding 8h 56min 54.256043s random time.
 Feb 04 21:31:35 dak systemd[1]: Started ACPI event daemon.
 -- Subject: Unit acpid.service has finished start-up
 -- Defined-By: systemd
 -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
 --
 -- Unit acpid.service has finished starting up.
 --
 -- The start-up result is done.
 Feb 04 21:31:46 dak systemd[1]: Reloading.
 Feb 04 21:31:35 dak systemd[1]: [/etc/systemd/system/plexmediaserver.service:11] Invalid escape sequences in line, correcting: "/bin/sh -c 'LD_LIBRARY_PATH=/usr/lib/plexmediaserver /usr/lib/plexmediaserver/Plex\ Media\ Server'"
 Feb 04 21:31:46 dak systemd[1]: apt-daily.timer: Adding 16min 6.511743s random time.
 Feb 04 21:31:46 dak systemd[1]: snapd.refresh.timer: Adding 5h 9min 47.497830s random time.
 Feb 04 21:31:46 dak systemd[1]: Starting Daily apt activities...
 -- Subject: Unit apt-daily.service has begun start-up
 -- Defined-By: systemd
 -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
 -- The start-up result is done.
 Feb 04 21:31:46 dak sh[15998]: /bin/sh: 1: /usr/lib/plexmediaserver/Plex Media Server: not found
 Feb 04 21:31:46 dak systemd[1]: plexmediaserver.service: Main process exited, code=exited, status=127/n/a
 Feb 04 21:31:46 dak systemd[1]: plexmediaserver.service: Unit entered failed state.
 Feb 04 21:31:46 dak systemd[1]: plexmediaserver.service: Failed with result 'exit-code'.
 Feb 04 21:31:46 dak systemd[1]: Started Daily apt activities.
 -- Subject: Unit apt-daily.service has finished start-up
 -- Defined-By: systemd
 -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
 --
 -- Unit apt-daily.service has finished starting up.
 --
 -- The start-up result is done.
 Feb 04 21:31:46 dak systemd[1]: apt-daily.timer: Adding 7h 33min 1.707090s random time.
 Feb 04 21:31:46 dak systemd[1]: apt-daily.timer: Adding 50min 23.769113s random time.
 Feb 04 21:31:47 dak systemd[1]: Reloading.
 Feb 04 21:31:47 dak systemd[1]: [/etc/systemd/system/plexmediaserver.service:11] Invalid escape sequences in line, correcting: "/bin/sh -c 'LD_LIBRARY_PATH=/usr/lib/plexmediaserver /usr/lib/plexmediaserver/Plex\ Media\ Server'"
 Feb 04 21:31:47 dak systemd[1]: apt-daily.timer: Adding 7h 25min 52.961224s random time.
 Feb 04 21:31:47 dak systemd[1]: snapd.refresh.timer: Adding 1h 42min 51.397773s random time.
 Feb 04 21:31:47 dak systemd[1]: Started ACPI event daemon.
 -- Subject: Unit acpid.service has finished start-up
 -- Defined-By: systemd
 -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
 --
 -- Unit acpid.service has finished starting up.
 -- Unit plexmediaserver.service has finished shutting down.
 Feb 04 21:32:07 dak systemd[1]: plexmediaserver.service: Start request repeated too quickly.
 Feb 04 21:32:07 dak systemd[1]: Failed to start Plex Media Server for Linux.
 -- Subject: Unit plexmediaserver.service has failed
 -- Defined-By: systemd
 -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
 --
 -- Unit plexmediaserver.service has failed.
 --
 -- The result is failed.

I’ve removed a bunch of duplicate entries, as it tries to start it several times.

I tried the fix in the other thread, removing /etc/systemd/system/plexmediaserver.service - reloading and starting the service again. Same end-result, server won’t start but the error-msg changes slightly to:

Feb 04 21:59:48 dak systemd[1]: [/lib/systemd/system/plexmediaserver.service:11] Invalid escape sequences in line, correcting: "/bin/sh -c 'LD_LIBRARY_PATH=/usr/lib/plexmediaserver /usr/lib/plexmediaserver/Plex\ Media\ Server'"

Mother of all that’s unholy and blightridden!!!

I found my error - I have somehow made a copy/paste error when wget the package… I had the 32bit package… using the 64bit solved it instantly. I’m sorry for this, I feel like a damn idiot! And I’m allowed to say that, I’ve updated plex at least 30 times over the years and never made such a simple mistake!

1 Like

It happens. Glad it’s solved. Please mark the appropriate answer(s) for the benefit of others.

I can’t see where to do that - is it only thread-starter who can do that ?

See the “Yes” or “No” those are it :smiley:

and yes, the OP has that privilege

OMG. Made the same stupid error as the OP. To our defense, it is a little tricky right clicking on the popup to get the url to paste in a terminal window. In addition, the order is 64-bit first and then 32-bit and out of long habit I just assume 64 comes after 32.

@dakliegg said:
OMG. Made the same stupid error as the OP. To our defense, it is a little tricky right clicking on the popup to get the url to paste in a terminal window. In addition, the order is 64-bit first and then 32-bit and out of long habit I just assume 64 comes after 32.

64 is much more popular and considerably more efficient when you have to transcode. … Hint :wink:

hi is server down not been able to connect to it for a week now please help

I hope this is the right pace to post this issue…

You have a zero-byte package in your repo for Debian. Trying to retrieve latest with:

wget https://downloads.plex.tv/repo/deb/pool/p/plexmediaserver/plexmediaserver_1.3.4.3285-b46e0ea_i386.deb

returns a zero-byte file.

@TheSidewinder said:
I hope this is the right pace to post this issue…

You have a zero-byte package in your repo for Debian. Trying to retrieve latest with:

wget https://downloads.plex.tv/repo/deb/pool/p/plexmediaserver/plexmediaserver_1.3.4.3285-b46e0ea_i386.deb

returns a zero-byte file.

Please check your system and networking.

[chuck@lizum /tmp.111]$ wget https://downloads.plex.tv/repo/deb/pool/p/plexmediaserver/plexmediaserver_1.3.4.3285-b46e0ea_i386.deb
--2017-03-01 12:28:04--  https://downloads.plex.tv/repo/deb/pool/p/plexmediaserver/plexmediaserver_1.3.4.3285-b46e0ea_i386.deb
Resolving downloads.plex.tv (downloads.plex.tv)... 104.20.7.9, 104.20.6.9, 2400:cb00:2048:1::6814:709, ...
Connecting to downloads.plex.tv (downloads.plex.tv)|104.20.7.9|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 94001012 (90M) [application/octet-stream]
Saving to: ‘plexmediaserver_1.3.4.3285-b46e0ea_i386.deb’

plexmediaserver_1.3.4.3285-b46e0ea 100%[================================================================>]  89.65M  3.18MB/s    in 2m 41s  

2017-03-01 12:30:46 (571 KB/s) - ‘plexmediaserver_1.3.4.3285-b46e0ea_i386.deb’ saved [94001012/94001012]

[chuck@lizum /tmp.112]$

This is happening on two different machines. The one running Debian, and my desktop which I’m using to reply here.

Both return zero-byte files. I just clicked that link you posted, same result.

wget the URL and it’s a zero-byte file.

Using the URL directly in this browser:

https://downloads.plex.tv/repo/deb/pool/p/plexmediaserver/plexmediaserver_1.3.4.3285-b46e0ea_i386.deb

does exact same thing.

And all **other ** downloads via wget or direct URL, to either machine, work fine, so I don’t believe it’s a local networking issue. I do know AWS had huge issues yesterday, if that could be related, though I doubt it.

I should add, that I can retrieve an older version, 1.3.3, via direct URL or wget:

apt-get install plexmediaserver=1.3.3.3165-ed2f710

this works fine. It’s only v1.3.4 that is coming in as zero-byte.