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

Ciasto piekarz
  • 365
  • 2
  • 11
  • 27

1 Answers1

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
Ingo
  • 42,097
  • 20
  • 85
  • 197