0

plexmediaserver service is not starting what should I do, all i was trying to make external hard drive accessible while attempting to add plex to pi andpi group to plex everything stopped working

 $ sudo systemctl status plexmediaserver
● plexmediaserver.service
   Loaded: error (Reason: Bad message)
   Active: inactive (dead)

also getting

sudo systemctl start plexmediaserver -l
Failed to start plexmediaserver.service: Unit plexmediaserver.service is not loaded properly: Bad message.
See system logs and 'systemctl status plexmediaserver.service' for details.

service file permission

 $ ls -la  /lib/systemd/system/plexmediaserver.service
-rw-r--r-- 1 root root 1068 Sep  7 21:57 /lib/systemd/system/plexmediaserver.service

service file content unchanged

[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$
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

file content is unchanged,

please help fix

  • anything useful in system logs? – Jaromanda X Sep 7 '19 at 22:49
  • 1
    so, the second line being just network-online.target isn't wrong? I would expect Description= and After= on separate lines - but, if you say that's OK, then whatever – Jaromanda X Sep 8 '19 at 6:50
  • 1
    the Description= was also supposed to go in next line ... so, where I said I would expect Description= and After= on separate lines you didn't follow my advice? – Jaromanda X Sep 8 '19 at 7:18
  • 1
    does the service require network to be up before running? just use After=network.target ... does the service need the network to be online, then don't remove it – Jaromanda X Sep 8 '19 at 7:20
  • 1
    well, you'll need to debug some more then - check all the system logs for anything output by plex that would indicate a problem ... etc – Jaromanda X Sep 8 '19 at 7:22
1

The first lines of the Unit file are wrong. They are looking:

[Unit] Description=Plex Media Server After=network.target
network-online.target

This is out of specification. They have to look like:

[Unit]
Description=Plex Media Server
After=network.target network-online.target
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.