I have to manually run systemctl daemon-reload everytime my rPi reboots

server-raspberry-pi

#1

So I recently updated and changed my override.conf file to match the old one. Made systemD aware of the changes and restarted Plex. Everything is working fine and I went to reboot and it said Plex Media Server failed to start. I check the status of the server and it said that the server is running but there is a warning at the bottom. I followed the warnings recommendations for the command (systemctl daemon-reload, and then systemctl start plexmediaserver) and it worked fine after that. Only problem is now I have to do that everytime I restart the raspberry pi. This is fine except when Im not home and the power goes out or something. rPi reboots and my wife cant get PMS to work until I get home.
Here's a copy of the plexmediaserver status with the warning message:

sudo service plexmediaserver status
● plexmediaserver.service - Plex Media Server for Linux
   Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: ena
  Drop-In: /etc/systemd/system/plexmediaserver.service.d
           └─override.conf
   Active: active (running) since Wed 2018-03-21 16:01:30 JST; 6min ago
  Process: 577 ExecStartPre=/bin/sh -c /usr/bin/test -d "${PLEX_MEDIA_SERVER_APPLICATION_SU
 Main PID: 593 (sh)
   CGroup: /system.slice/plexmediaserver.service
           ├─593 /bin/sh -c LD_LIBRARY_PATH=/usr/lib/plexmediaserver "/usr/lib/plexmediaser
           ├─595 /usr/lib/plexmediaserver/Plex Media Server
           ├─725 Plex Plug-in [com.plexapp.system] /usr/lib/plexmediaserver/Resources/Plug-
           ├─912 /usr/lib/plexmediaserver/Plex DLNA Server
           ├─915 /usr/lib/plexmediaserver/Plex Tuner Service /usr/lib/plexmediaserver/Resou
           └─979 Plex Plug-in [com.plexapp.agents.imdb] /usr/lib/plexmediaserver/Resources/

Mar 21 16:01:29 RasPlex systemd[1]: Stopped Plex Media Server for Linux.
Mar 21 16:01:29 RasPlex systemd[1]: Starting Plex Media Server for Linux...
Mar 21 16:01:30 RasPlex systemd[1]: Started Plex Media Server for Linux.
Warning: plexmediaserver.service changed on disk. Run 'systemctl daemon-reload' to reload u
lines 1-19/19 (END)


#2

@“mwilhelm1224@gmail.com” said:
So I recently updated and changed my override.conf file to match the old one. Made systemD aware of the changes and restarted Plex. Everything is working fine and I went to reboot and it said Plex Media Server failed to start. I check the status of the server and it said that the server is running but there is a warning at the bottom. I followed the warnings recommendations for the command (systemctl daemon-reload, and then systemctl start plexmediaserver) and it worked fine after that.

Warning: plexmediaserver.service changed on disk. Run ‘systemctl daemon-reload’ to reload u
lines 1-19/19 (END)

Summary: the warning plexmediaserver.service changed on disk reappears after a reboot? Plex does not edit this file, so some other process is doing this or your SD card is defect and your edits are not really written back to the card.

Did you use “the infamous PDF” the first time you set your server up or some other internet tutorial? So, did you install some kind of process monitoring tool or reboot cronjob or something similar?


#3

@uglymagoo said:

@“mwilhelm1224@gmail.com” said:
So I recently updated and changed my override.conf file to match the old one. Made systemD aware of the changes and restarted Plex. Everything is working fine and I went to reboot and it said Plex Media Server failed to start. I check the status of the server and it said that the server is running but there is a warning at the bottom. I followed the warnings recommendations for the command (systemctl daemon-reload, and then systemctl start plexmediaserver) and it worked fine after that.

Warning: plexmediaserver.service changed on disk. Run ‘systemctl daemon-reload’ to reload u
lines 1-19/19 (END)

Summary: the warning plexmediaserver.service changed on disk reappears after a reboot? Plex does not edit this file, so some other process is doing this or your SD card is defect and your edits are not really written back to the card.

Did you use “the infamous PDF” the first time you set your server up or some other internet tutorial? So, did you install some kind of process monitoring tool or reboot cronjob or something similar?

So I never used an infamous PDF or anyone guide, i basically just googled and read through linux forums and set everything up piece by piece. The ONLY extra thing other than I can think of that I’ve done thats outside the scope of installing/using Samba, Transmission, and PMS is I did create a symbolic link to copy my PMS data that would get saved onto my SD card to my hard drive, because at the time no matter what I did my Metadata wouldnt update and all my movies/tv shows didnt have any info. So I tried changing the file path for saving metadata (…/Plex\ Media\ Server/… Folder) and that didnt work at all, it would just continue saving it to my SD card so I copied and pasted the entire folder onto my hard drive, created a symlink in the directory, and then deleted the contents. And now it works fine with my PMS data being saved on my HDD and SD card not filling up. Besides that I just winged it and anytime I’d hit a problem I’d search PMS forums/linux forums etc.

Also this error only occurs when I created the override.conf file. Maybe changing settings via that file + the symlink did it?


#4

@“mwilhelm1224@gmail.com” said:
I did create a symbolic link to copy my PMS data that would get saved onto my SD card to my hard drive, because at the time no matter what I did my Metadata wouldnt update and all my movies/tv shows didnt have any info. S

Hm, that most like causes all of your problems :smile: Just moving /var/lib/plexmediaserver to external storage should not result in a failed Plex startup. And even the systemctl warning cannot cause Plex failing to start. However, did you by accident symlink / mount much more (e.g. /lib or /var) to external storage? The thing is, systemd starts with a service file for Plex, that changes afterwards. This can be caused by a later mount of external storage. So something is really strange about your setup :smile: Please post your /etc/fstab and discuss all your symlinks in more details, so we can help you fix this.

Btw: the simple and correct way to specify another directory for Plex meta data is discussed in this tutorial:


#5

@uglymagoo said:

@“mwilhelm1224@gmail.com” said:
I did create a symbolic link to copy my PMS data that would get saved onto my SD card to my hard drive, because at the time no matter what I did my Metadata wouldnt update and all my movies/tv shows didnt have any info. S

Hm, that most like causes all of your problems :smile: Just moving /var/lib/plexmediaserver to external storage should not result in a failed Plex startup. And even the systemctl warning cannot cause Plex failing to start. However, did you by accident symlink / mount much more (e.g. /lib or /var) to external storage? The thing is, systemd starts with a service file for Plex, that changes afterwards. This can be caused by a later mount of external storage. So something is really strange about your setup :smile: Please post your /etc/fstab and discuss all your symlinks in more details, so we can help you fix this.

Btw: the simple and correct way to specify another directory for Plex meta data is discussed in this tutorial:

https://forums.plex.tv/discussion/286395/customizing-your-plex-configuration

So I just posted a longer reply but somehow it got removed once I tried to edit it. (So it may reappear later after it gets “approved”) Anyways, I think the symlink is the problem as well because thats the only different thing I’ve done it seems. All’s I wanted to do was move my “/var/lib/plexmediaserver/Library/Application Support/Plex Media Server” folder to being saved on my ext hdd as it was filling up my SD card and I could no longer get TV Show info/movie posters/etc to download. So I attempted the guide that you linked, or something similiar to it by ChuckPA on the PMS forums. I created a override.conf file. changed the directory to the new one that i wanted. Here’s what I changed it too:

#
# Customize Plex's config
[Service]
Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/mnt/storage/storage/Plex-Data"
#
#  These values are only needed if you wish to change user & group
User=media
Group=media
#
# This is needed to change the default umask
UMask=0002    # this must be 4 digits of octal

This didnt seem to work, nothing was being saved in my new directory on my mounted drive, and my “…/Application Support/Plex Media Server” folder was still filling up even if I deleted things from it. So I kept searching until I found a guide for PMS on rPi setup. It used a symlink to perform this task instead of just changing it in the override.conf. Thought whats the worst that could happen. So created a symlink in the “…/Application Support/Plex Media Server” directory and linked it to the “/mnt/storage/storage/Plex-Data” worked like a charm. Deleted the files from the App Data/PMS folder. And there we go, no new folders were being created in the App Data/PMS folder, and it had created new folders (cache, codecs, crash report, etc) all identical folders to what it was saving on the SD card was now being saved on my ext HDD. The fact that it created the exact same folders as were originally in my App Data/PMS folder leads me to believe that I didnt over symlink anything. Because I feel like I would have to gotten more directories. Either way I dont remember the exact process I used to create the symlink, I cant find the guide that I had used, so maybe I did mess something up. I tried searching my entire sd card/mounted drive for a symlink using commands I found my googling how to find a symlink, no luck unfortunately. So Im not sure how to identify what exactly I symlinked.

As for the fstab here you go:

proc            /proc           proc    defaults          0       0
/dev/mmcblk0p6  /boot           vfat    defaults          0       2
/dev/mmcblk0p7  /               ext4    defaults,noatime  0       1
/dev/sda1       /mnt/storage    ntfs-3g rw,default,nofail       0       0
# a swapfile is not a swap partition, no line here
#   use  dphys-swapfile swap[on|off]  for that

Any and all help is appreciated. Thanks!

EDIT: The code text isnt working, the pasted code from putty isnt spacing itself out like its shown in the text editor box. And I keep getting my comments removed by trying to edit them :confused: this is awful lol


#6

I’m very sorry, but your problem is still a mystery to me. First, the override.conf should have worked (after systemctl daemon-reload and restart of PMS). Then, your description of the symlink is perfectly OK and cannot cause your problem. There is still something else interfering.

At the moment, I see two options: (1) start from scratch with a clean Raspbian image. All your Plex meta data is on the external drive so you won’t have to reconfigure anything in Plex. Just use the same mount point for your external hdd and set the override.conf correctly (2) let me take a look at your server (we can discuss this via PM).