Plex no longer seeing library on Synology NAS after PMS update on Raspberry Pi 3

Server Version#: Raspbian GNU/Linux 10 (buster)
Player Version#: 1.41.4.9463-630c9f557

I have a Raspberry Pi 3 and Synology NAS mounted library. It’s been working great thanks to some troubleshooting from Chuck many years ago. My ISP changed last week, so I needed to updated the NAS IP address in my cmdline.txt file, and updated the mount info to /etc/fstab . Everything was working great.

Then I pressed my luck and decided to update to the latest PMS on my Pi. After successful install and quick reboot of the Pi, I lost my library connection. I tried updating the Raspberry Pi OS to see if it was a comparability issue. Nothing changed.

I can manually mount the NAS via terminal and see all my folders, but am unable to see or add my since deleted library when I visit Plex on the web or anywhere else.

Any ideas? My LInux experience is limited to what went into this setup and nothing else, so I am mostly at the “follow these directions” understanding of Linux troubleshooting. Any help is appreciated!

Here is some info Chuck asked for in the link above in case it is helpful:

cat /etc/fstab

proc /proc proc defaults 0 0
PARTUUID=0727ce82-01 /boot vfat defaults 0 2
PARTUUID=0727ce82-02 / ext4 defaults,noatime 0 1

a swapfile is not a swap partition, no line here

use dphys-swapfile swap[on|off] for that

192.168.1.171:/volume1/video /home/plex nfs defaults,rw,nofail,noauto,x-systemd.automount,x-systemd.requires=network-online.target 0 0

df

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 30664984 12434336 16919344 43% /
devtmpfs 439400 0 439400 0% /dev
tmpfs 472680 4 472676 1% /dev/shm
tmpfs 472680 6412 466268 2% /run
tmpfs 5120 4 5116 1% /run/lock
tmpfs 472680 0 472680 0% /sys/fs/cgroup
/dev/mmcblk0p1 44220 25461 18759 58% /boot
tmpfs 94536 4 94532 1% /run/user/1000
192.168.1.171:/volume1/video 7747774976 1079168512 6668504064 14% /home/plex

@ChuckPa - you were able to help me out previously. Any chance I could get benefit from your expertise again?

I’m sorry, I didn’t see this until just now.

Knowing you upgraded the OS immediate makes the mount point and override suspect.

Do the following:

  1. Stop Plex
  2. Unmount all the network shares from the syno
  3. For each mount point, ls -la /path/to/mount-point
  4. Confirm the permissions are 755
  5. Next, we’ll look to see if you lost your override.conf (as part of the ugprade)
    – Check for /etc/systemd/system/plexmediaserver.service.d/override.conf
    – Recreate it if lost (root partition got reformatted ??)
  6. Confirm override.conf is still configured to properly point to /home/plex
  7. Now confirm /home/plex is the correct ownership & permissions
    – If /home is a separate partition, login as root (set passwd first) and unmount /home – check the mount point permissions — should be 755 then mount it and check again.

Let me know how you make out

Thanks, Chuck. This has quickly gotten over my head with my limited Linux experience. I’ll do my best to follow your steps this weekend and get back to you with what I find. Thanks for the help.

@savenelroy

I made an error reading your post.

Let’s back up and come through this again.

Do you have the default plex installation in /var/lib/plexmediaserver ?

If you do, then -

cd "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server"

Now look at Preferences.xml

 cat Preferences.xml

Look for your username and email

  1. PlexOnlineUsername="your_plex_username"
  2. PlexOnlineMail="email_used_for_plex"
  3. You have PlexOnlineToken="something-here"

Is this the right way to determine if I have the default installation? Below is what it returns

pi@raspberrypi:~ $ ls /var/lib/plexmediaserver
Library

I’m able to see the preferences.xml file, and my username, email and online token within it.

Hey @ChuckPa. Just wanted to see if there were any additional thoughts on this. Thank you!

I just looked at your Plex.tv account.

The server got deleted.
Did you delete it?

Easy solution here is to reclaim it from the command line

Here’s the script I wrote. (See the README for doc & examples)

Run it as root from the command line on the Pi
(you’ll need the browser for the Plex Claim Token)

I deleted it in hopes of reconnecting it and solving my problem. Haven’t seen it since. Guess that was the wrong thing to do!

I was able to download the shell scrip with this command:

wget UserCredentialReset/UserCredentialReset.sh at main · ChuckPa/UserCredentialReset · GitHub

From there, do I download a zip or a tar file, and with what commands? My Linux experience is very limited and mostly at a level of “Copy and paste these commands”. I think I should be able to follow your README instructions once I have the tar or zip file downloaded.

If you have the .sh (confirm you got the sh and not a HTML doc )

  1. chmod +x UserCredentialReset.sh
  2. Make certain PMS is stopped
  3. sudo ./UserCredentialReset.sh
  4. In browser, open https://plex.tv/claim
  5. COPY the token it gives
  6. Return to shell window
  7. PASTE token into shell window (where script is waiting for it)
  8. hit ‘enter’.
  9. It will verify credentials and print your info after it updates Preferences.xml

Thanks, Chuck. Getting stuck on the 3rd step with a syntax error. Here’s what I entered after confirming UserCredentialReset.sh was downloaded.

  1. sudo chmod +x UserCredentialReset.sh
  2. sudo systemctl stop plexmediaserver
  3. sudo ./UserCredentialReset.sh

./UserCredentialReset.sh: 8: ./UserCredentialReset.sh: Syntax error: newline unexpected

@savenelroy

Syntax error , line 8 ? I think you got the HTML content.

I created this manually for you.

UserCredentialReset.tar.gz (4.1 KB)

Extract
chmod if needed
run as root.

Sorry, Chuck…I’m hitting a wall here.

I plugged my Pi into a monitor and navigated to usr/lib/plexmediaserver and can see the UserCredentialReset.sh file sitting in there. If I right click and choose Execute or Execute in Terminal, nothing happens.

If I jump back to my mac and ssh into the pi, and change directory to usr/lib/plexmediaserver , then try to execute with sudo chmod +x UserCredentialReset.sh, I get the same error:

./UserCredentialReset.sh: 8: ./UserCredentialReset.sh: Syntax error: newline unexpected

Not sure if this has anything to do with it…but I downloaded your file (UserCredentialReset.tar.gz) while on the pi and tried extracting it to the directory above. I get an error that I don’t have the right permissions. If I try to change permissions on the plexmediaserver folder (change content from only owner to Anyone), I get another error: Operation not permitted.

Linux is not Point-and-click here

  1. Open a terminal window
  2. Do all remaining work in that terminal window
  3. cd /usr/lib/plexmediaserver
  4. sudo bash
  5. systemctl stop plexmediaserver
  6. pwd – ( confirms you’re still in /usr/lib/plexmediaserver )
  7. ./UserCredentialReset.sh
  8. script starts
  9. script asks you for the claim token (you get from https://plex.tv/claim)

Here is how it looks (including when you make mistakes :wink: )

[chuck@lizum ~.2007]$ git/chuck/UserCredentialReset/UserCredentialReset.sh 
ERROR:  This tool can only be run as the root/admin (or sudo root/admin) user
[chuck@lizum ~.2008]$ sudo !!
sudo git/chuck/UserCredentialReset/UserCredentialReset.sh 
 
          Plex Media Server user credential reset and reclaim tool (Ubuntu 22.04.5 LTS)
 
This utility will reset the server's credentials.
It will next reclaim the server for you using a Plex Claim token you provide from https://plex.tv/claim
 
ERROR:  PMS is running.  Please stop PMS and try again
[chuck@lizum ~.2009]$ sudo systemctl stop plexmediaserver
[chuck@lizum ~.2010]$ sudo git/chuck/UserCredentialReset/UserCredentialReset.sh 
 
          Plex Media Server user credential reset and reclaim tool (Ubuntu 22.04.5 LTS)
 
This utility will reset the server's credentials.
It will next reclaim the server for you using a Plex Claim token you provide from https://plex.tv/claim
 
Please enter Plex Claim Token copied from http://plex.tv/claim : 

Thank you for the step-by-step. Still getting hung up ./UserCredentialReset.sh. Below are my commands and the error, so the script doesn’t seem to start.

pi@raspberrypi:~ $ cd /usr/lib/plexmediaserver
pi@raspberrypi:/usr/lib/plexmediaserver $ sudo bash
root@raspberrypi:/usr/lib/plexmediaserver# systemctl stop plexmediaserver
root@raspberrypi:/usr/lib/plexmediaserver# pwd
/usr/lib/plexmediaserver
root@raspberrypi:/usr/lib/plexmediaserver# ./UserCredentialReset.sh
./UserCredentialReset.sh: line 7: syntax error near unexpected token `newline'
./UserCredentialReset.sh: line 7: `<!DOCTYPE html>'
root@raspberrypi:/usr/lib/plexmediaserver# 

@savenelroy

  1. You just confirmed you had gotten the HTML doc from github
./UserCredentialReset.sh: line 7: syntax error near unexpected token `newline'
./UserCredentialReset.sh: line 7: `<!DOCTYPE html>'
  1. Why aren’t you using what I gave you ?

Sorry, when I saw the .sh file on my Pi I thought I had what I needed. How do I get your UserCredentialReset.tar.gz file over to where it needs to be on my Pi? I copied the url and tried the following, but get an error: Thank you so much for your patience here…

pi@raspberrypi:/usr/lib/plexmediaserver $ sudo wget https://forums.plex.tv/uploads/short-url/pZucBKMufoi8eOysU2W0LqPVC0L.gz
--2025-03-09 21:30:52--  https://forums.plex.tv/uploads/short-url/pZucBKMufoi8eOysU2W0LqPVC0L.gz
Resolving forums.plex.tv (forums.plex.tv)... 2602:fd3f:3:ff01::2b, 184.105.99.43
Connecting to forums.plex.tv (forums.plex.tv)|2602:fd3f:3:ff01::2b|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2025-03-09 21:30:53 ERROR 404: Not Found.

from Linux → Linux, use scp

scp UserCredentialReset.tar.gz username@ip_address:/tmp/UserCredentialReset.tar.gz

When successful, the file will be in /tmp on that machine

Wish I was able to make better progress here, but am not having any luck. I tried updating the command you provided with my username and IP, but see the following:

UserCredentialReset.tar.gz: No such file or directory

Not sure if this is the right thing to do, but tried this next:

pi@raspberrypi:~ $ sudo wget "https://forums.plex.tv/uploads/short-url/pZucBKMufoi8eOysU2W0LqPVC0L.gz"
--2025-03-12 21:08:06--  https://forums.plex.tv/uploads/short-url/pZucBKMufoi8eOysU2W0LqPVC0L.gz
Resolving forums.plex.tv (forums.plex.tv)... 2602:fd3f:3:ff01::2b, 184.105.99.43
Connecting to forums.plex.tv (forums.plex.tv)|2602:fd3f:3:ff01::2b|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2025-03-12 21:08:06 ERROR 404: Not Found.

If it’s time for me to fire up my Netflix account, just give the word :weary_face: