TV Show type libraries are empty and adding one crashes the server

Server Version#: 1.20.4.3517
Plex Web Version#: 4.43.4

I have a newly installed Plex on Rasberry PI 4. It seems to be working fine, but I am having problems with adding TV Show type media libraries. There are a few peculiarities about this installation:

  1. All the data is on a network attached storage (NAS), a Buffalo Terastation
  2. The Plex Library where all the metadata and config resides is on the NAS as well, using the symlink recourse to map it over due to the SD card not supporting the huge library I have

So, I installed RASPLEX using the tutorial and it seems to be all fine and dandy BUT whenever I add a library, the server stops working. I just added a new library of type TV SHOW and mapped to the NAS folder, that appears in the web interface correctly.

Once I do that and it starts scanning, the server crashes. A status check shows this:
pi@plex:~ $ sudo service plexmediaserver status
â—Ź plexmediaserver.service - Plex Media Server
Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor
Drop-In: /etc/systemd/system/plexmediaserver.service.d
└─override.conf
Active: active (running) since Wed 2020-11-11 09:58:56 GMT; 1h 39min ago
Main PID: 2848 (Plex Media Serv)
Tasks: 45 (limit: 4915)
CGroup: /system.slice/plexmediaserver.service
├─2848 /usr/lib/plexmediaserver/Plex Media Server
├─2870 Plex Plug-in [com.plexapp.system] /usr/lib/plexmediaserver/Res
├─2927 /usr/lib/plexmediaserver/Plex Tuner Service /usr/lib/plexmedia
└─3440 /usr/lib/plexmediaserver/Plex Relay -p 443 -N -R 0:127.0.0.1:3

Nov 11 09:58:56 plex systemd[1]: Starting Plex Media Server…
Nov 11 09:58:56 plex systemd[1]: Started Plex Media Server.
Nov 11 10:28:24 plex systemd[1]: plexmediaserver.service: Current command vanish

I restart the service and the library is empty. The library of type MOVIE added correctly and scanned all 422 movites. I tried to add this as Other Videos but it also did not work.

I am not sure what logs to attach here, so please let me know where I can find the cause of these errors.

I am not sure if this makes any difference, but my account is the lifetime Plex Member account.

Any help is greatly appreciated.

Is nobbody else facing issues with the TV Show scanner? Just me? I guess since there was no reply here, I will try to remove and install a fresh copy of Plex.

RasPlex is not maintained since 2017. Do not use it! What do you want to accomplish? Convert your Raspberry Pi OS setup into a Plex media player?

When using any RPi as media player, please always install LibreELEC and setup the Plex Kodi plugin.

Everything you need to know about using a RPi as Plex server is summarized here: READ ME FIRST: About Server ARMv7 and ARMv8 Ubuntu / Debian

Btw: whenever you utilize any VPN service on your RPi, not matching meta data is mostly because of that.

Thank you drmagoo for your reply.

I have used Plex on my Raspberry PI before. I got a new RPi 4 and I decided to install a new server on it and I am having a very hard time. In short, I want to use the RPi as a server. It is ARMv7.

I will look for the new procedure to install, but all I did was add the repository. Here are the repositories I have
it:1 http://archive.raspberrypi.org/debian buster InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:3 https://downloads.plex.tv/repo/deb public InRelease

Then I did an apt-get install plexmediaserver and then configured using the web interface. I thought that was the latest way to do it. I will go through the link you sent and try to find instructions on installing Plex Media Server on RPi.

This description of the initial installation is correct :+1:

However, your first post shows, that there is a systemd drop-in in place: /etc/systemd/system/plexmediaserver.service.d/override.conf What is in there and why do you need it?

Please make sure to set the exec mount option for this network share on your Pi. Plex needs it and crashes without it. See for example: Plex Conversion failed. The transcoder exited due to an error

If your server is still crashing, please also attach server logs.

https://support.plex.tv/articles/200250417-plex-media-server-log-files/

I reinstalled Plex from that Installation link you sent, downloading the file and running the dpkg

sudo dpkg -i plexmediaserver_1.21.0.3608-f7262c352_armhf.deb

The override is to make Plex run as root instead of plex user. It was something I tried thinking it would help the scan issue.
This is the content
[Service]
User=root
Group=root
UMask=0002

I tried to delete it but then the service would not start. I changed the user and group back to plex/plex and started again the service and it started. I created a library and scanned the files but the library is still empty.

This time around, I left everythign as it is, I didn’t change anything in the settings and it still does not scan the files. Note that the media files are on a mounted NAS drive at /mnt/nas/TVShows, for example. The reason I tried putting the root user was to see if it was not read/write access but I also created the plex and pi users on the NAS and it does not seem to be an access issue.

Lastly, I had previously (when it worked) changed the settings to store the Plex metadata to a share on the NAS due to the size of the library. I didn’t do that this time and it still does not index.

[Service]
Environment=“PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/var/lib/plexmediaserver/Library/Application Support”

I had changed that to

[Service]
Environment=“PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/mnt/nas/plexmediaserver/Library/Application Support”

but it is back to default.

I cleaned the bundles and optimized the database and created the library again, but still no joy.

I have attached the logs from the “Download Logs” button in the Troubleshooting section.
I noticed this in the scanner log

Nov 21, 2020 11:19:31.508 [0xb4e44010] ERROR - SQLITE3:0x111d, 4106, os_unix.c:36721: (5) close**(/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db) - Input/output error**

Could that explain why it is not working? Why would it not be able to write to that folder?(File removed)

Thanks for the help!

(1) Never, ever, run the Plex server as root (or any other software). There are really not that many reasons to stray from the default Plex Linux user plex .

(2) Your override.conf is missing the PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR settings. Without it, Plex writes into $HOME/Library/Application Support and that is /root/Library/Application Support with your override.conf . Always explicitly set PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR when changing the default Plex server settings. Otherwise, you might falsely believe /var/lib/plexmediaserver is still used when it is not. Make sure the user you have set up has read and write permissions in PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR.

(3) Do you use samba (cifs) or nfs to mount your media?

(4) Something is wrong with your network configuration. Your logs are full of “Notified of network changed”. Please take a look at the following thread where another RPi user had a similar problem: Network Change Notices

(5) PMS cannot access your meta database: " close(/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db) - Input/output error". Either because of Linux permissions or because of network / mount issues.

I would start with the default Plex setup, everything in vanilla state, and only your media on your NAS. Then experiment with moving your Plex meta data to your NAS.

1 Like

Thank you for that reply. I took your advice and started over. I installed a new SD card with the Raspberry flavor of Ubuntu and installed Plex out of the box configuration. It is all working great and it is indexing the media mapped on the nas.

  1. Got it. I have left it alone using the plex user.
  2. I have not put in a new override, but I assume that when I do want to experiment with moving the metadata to the NAS, this is where I will put the configuration as you mentioned, with that explicitly set PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR in it.
  3. I use CIFS
  4. I will take a look at that, I had not noticed or really paid attention to that error. Thank you.
  5. I suspect it was either the override user or something that messed up. I was not able to delete certain folders even as root user, so I also suspect something was corrupt. I swapped out the SD card just in case, since I didn’t like a few of the errors and I saw some other people mention similar problems that were fixed swapping out the SD card.

I will wait for it to scan all the media files. I put in a 32GB SD card, so that might be enough. If not, I’ll delete one or two libraries. The collection is extensive. Once it is all set up and running, I will experiment with moving the metadata through the override file as you suggested.

Thank you for all your help and I’ll post an update once I have it all working.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.