Unable to connect to server opening from Synology NAS

I had a hard drive die which upset Windows 10 so I did a fresh install (of Windows). The drive wasn’t on the server it was a secondary storage drive on my media PC that I use for running the Plex app. The dead hard drive also had some content that was linked to a Plex library which caused it to get stuck refreshing metadata (the update icon was constantly cycling). The stuck metadata refresh happened prior to the drive finally dying. After the fresh Windows install and seeing that the Plex update issue was still occurring I did some googling and saw other people with the same problem just uninstalled Plex Media Server, keeping the metadata and files etc, and reinstalled it to fix the issue. I tried the same thing and now when I attempt to run Plex from Synology, it will start running but when I open it, I get a ‘problem loading page’ in my browser (address: http://[server-ip]:32400/web).

I tried combinations of logging out of Plex web apps and player, uninstalling and reinstalling Plex Media Server, reclaiming the server etc without success. In the end I uninstalled Plex completely, including all metadata and files, as I had a recent backup. I installed Plex via the Synology Package Centre. Plex ran just fine, I was able to open it in my browser and clicked the ‘finish setup’ button, so I copied over the backed up files (overwrite) and now I’m getting the same ‘problem loading page’ issue.

Not sure if it’s relevant but I just updated my version of Kaspersky to Premium from Internet Security. I thought it might be a firewall issue but disabling the firewall didn’t make a difference.

I’m not using a docker or anything like that, just a straight install of the package.

Any suggestions on what I can try? I feel like I’m missing something obvious…
I’d rather not have to rescan my libraries as I’ve just rebuilt them from scratch a couple of months ago.

Server Version#: 1.29.2.6364-7000
Player Version#: 1.92.1.140-8e1f68f5
Synology model: DS3622xs+
DSM: DSM 7.2.1-69057 Update 4

You had Plex Media Server on the Synology scanning media files stored on the PC?

What version of Plex Media Server was installed when you made the backup?

How did you make the backup? Hyper Backup, just copy files to another location, etc.?

Did you stop Plex Media Server before making the backup?


Depending on how you performed the backup/restore, permissions may be incorrect for the PlexMediaServer shared folder.
  1. Stop Plex Media Server
  2. Perform FAQ 32: Repairing the PlexMediaServer shared folder
  3. Start Plex Media Server

Hi FordGuy, thanks for the quick reply.

-yes, I remote mounted a folder on my PC using Synology’s CIFS Shared Folder option. This folder was on the hard drive that failed. It was one of three folders containing TV shows linked to one library.

-I believe the version of Plex Media Server installed when I made the backup was one, maybe two, versions earlier than the current latest release. It was whatever the current version was on 8th March 2024.

-I didn’t use anything to make the Backup (though maybe I should have…). I just copied the entire ‘Plex Media Server’ folder (the one directly under ‘AppData’) to another location. To restore it I just copied and pasted the entire ‘Plex Media Server’ folder back into the ‘AppData’ folder, overwriting existing files.

-I can’t remember whether I stopped PMS running when I took the backup, which means that I most likely didn’t.

-I ran the ‘FAQ 32’ script as advised. It didn’t send me an email. I actually ran it twice because I wondered if I’d gotten something wrong but I double-checked everything (including my Spam/Junk email folders). Looking at the results of the task in ‘Task Scheduler’, both executions have the Standard Output/Error listed as ‘no data’.
When I restarted PMS and opened it, it initially opened a page in my browser that showed:
<Response code="503" title="Maintenance" status="Plex Media Server is currently running startup maintenance tasks."/>
Every subsequent attempt opens the ‘Unable to connect’ browser page that I was getting initially.

Greatly appreciate your help with this. If I’ve made a bunch of rookie mistakes, please let me know if there’s anything I can do to avoid repeating them.

You are currently running 1.29.2.

You were most likely running a 1.40.x release, since that was the public version at that time.

1.40 introduced many database updates. Therefore, it is not possible to fall back to a version prior to 1.31.2.

You can also monitor progress via Synology Resource Monitor.

Expand DSM Desktop and watch the bash process. You’ll also see listings for chown and find as the script advances. When the script finishes, bash / chown / find will no longer appear under DSM Desktop.

That is Plex Media Server performing database maintenance. It can take minutes to hours, depending on the size of the database. The message does not auto-update. Refresh the window every few minutes to see if it has updated.


Next Steps

  • Uninstall PMS 1.29.2. It is incompatible with your backup.
  • Dump the current database (unsure if using 1.29.2 damaged it).
  • Restore database from backup.
  • Fix PlexMediaServer permissions.
  • Update to current PMS.

  1. Stop Plex Media Server.

  2. Uninstall Plex Media Server using Synology Package Center.
    When prompted, choose the Uninstall Only option.

  3. Delete the current database files.
    With File Station, go to /PlexMediaServer/AppData/Plex Media Server/Plug-in Support/Databases.
    Delete everything in the Databases folder.

  4. Restore from backup database
    From your backup, copy over the contents of the Databases directory.

  5. Repair PlexMediaServer Folder
    Run the repair script again to fix file ownership & permissions.
    Make sure it is configured to run as root.
    Use Resource Monitor to know when it has finished (mentioned above).
    Expect that it will take several minutes to run, as it touches every folder & file in the PlexMediaServer directory.

  6. Download the current version of Plex Media Server from plex.tv.
    You want the DSM 7, Intel 64-bit version.

  7. Manually install PMS via Package Center.
    When prompted, choose the normal installation, not the Plex Claim Token installation.

  8. Run PMS and see what happens.

Try accessing PMS using the IP address of the NAS. For example, if the IP address is 10.1.2.3, use http://10.1.2.3:32400/web. Do not use the Open button in Package Center, Synology Quick Connect, a domain name, etc.

You will most likely see the “503 maintenance” message, since Plex will have to perform database migration steps during startup. If this happens, do not stop PMS. Let things proceed. Check back every 15 minutes or so. You will have to manually refresh the web page. It will not auto update.

Once the db maintenance finishes, see if you can login, reach server settings, etc.

If anything goes bad, write back with a description of what happened. If possible, include a set of server log files. If you cannot reach Settings → Troubleshooting, then manually pull the logs: (1) Stop PMS; (2) in File Station, go to /PlexMediaServer/AppData/Plex Media Server; (3) Right click on the Logs directory and choose “Compress to Logs.zip”; (4) Upload the zip file to the thread.

Thanks again for all this. Plex Ninja for a reason!

That managed to get me up and running again, though a few things went slightly awry:

  1. When I ran the permissions repair script, it didn’t actually run though there was some output this time:
/bin/bash: line 1: cd: /var/packages/PlexMediaServer/shares/PlexMediaServer: No such file or directory
find: `AppData': No such file or directory
chown: cannot access 'AppData': No such file or directory
find: `AppData': No such file or directory

I’m pretty clear on setting the permissions so I double checked both my content folders had read/write access granted for system internal user ‘PlexMediaServer’, which they did.

  1. After manually installing the latest version of Plex Media Server downloaded directly from plex.tv. I was immediately able to open Plex in my browser (navigated directly using ‘http://[server-IP]:32400/web’), it didn’t require any startup maintenance. I can now access all my server settings again.
    My Music library, which is the one I’m most concerned about as it has a lot of manual work put into it, loaded just fine minus anything added after the backup was taken. A simple scan brought it up to date.
    However my TV Shows and Movies libraries are still not connecting and showing as ‘not found’ when I select them. I don’t have an options available for them other than ‘unpin’ and ‘reorder’.
    Also, in Plex Media Server under ‘Pinned’ in the left side bar menu, my server is listed there as it should be, but there is a second copy of it there, same name etc, with an ‘!’ on the icon that says it’s currently unavailable.

It’s not impossible that I took that backup after getting my Music library in order but before I sorted out the TV Shows and Movies. When I look at the backup files, under the ‘metadata’ folder there are only ‘Artists’ and ‘Albums’ folders (I’m assuming there would be video related folders if those libraries were included?).
I have all my ‘watched’ data for my video content synced with Plex so I’m hoping it’s possible to get it back. Though not the end of the world if not. If I delete the ‘not found’ TV Show and Movies libraries and recreate them (not sure how to do this without the options available), will that lose all my ‘watched’ data synced with my Plex account?

I’ve attached the logs here:
Plex Media Server Logs_2024-05-14_12-47-44.zip (561.1 KB)

I’m a million times better off than I was, many thanks. Look forward to any further advice you might have.

Good to see you are up and running and can access the server.

Thanks for attaching the log files. They look good. Plex migrated the database when you updated to 1.40.2.8395.

Make sure to run it as root. Otherwise it will not have the correct permissions and cannot access the directories/files. Plex Media Server must be stopped when running the task. It took about 10 minutes to complete on my DS918+.
task

Be sure the check the box to “Apply to this folder, sub-folder, & files.”

Go to Settings → Manage → Libraries.

Are the TV Shows & Movies libraries listed?

If so, edit them and make sure the correct folders are added.

If they are not listed, then you will need to re-create them.

If you have Sync Watch State & Ratings enabled, then the info should be retained.

Plex Media Server will sync with plex.tv at startup and then every 30 minutes.

You can view the activity in the Plex Media Server.log file. Search for ViewStateSync.
May 13, 2024 15:15:44.859 [0x7093b4116b38] DEBUG - [ViewStateSync] Starting

Look in Authorized Devices.

Are two servers listed?

If so, delete the redundant listing. Check the displayed PMS version and/or time last seen to determine which one to delete.

If you delete the wrong one nothing horrible happens. It unclaims your server and you’ll have to re-claim it.

Thanks again and apologies for the slow reply. The TV Show and Movie libraries needed to be recreated and rescanning all the metadata took some time. I’ve now got everything back the way it was and working reliably with the exception of the ‘watched status’ syncing. Everything is showing as unwatched. Is there anything I can do to prompt my Plex account to restore it from it’s own records or has it now been overwritten by the current state of the new libraries (library names are identical)?

Also, wondering what you would recommend for backing up? Is there an advantage to using Hyper Backup over just copying the relevant folders to a separate location?

Finally, I’m still not able to get the permissions script to run properly. It is definitely set to run as ‘root’. It runs, as seen by the presence of ‘bash’ and ‘find’ in the task monitor, but it takes less than 2 mins to execute and gives ‘no data’ as an output. Not sure if it’s necessary if everything is working. I also noticed that the DSM version I am using doesn’t give the tickbox option for applying this to the folder, sub-folders and files, so I guess it applies them to everything without specifying (or doesn’t give the option when it’s already applied?).

Really appreciate you taking the time. I’ve learnt a lot (particularly about what not to do) and plan to setup automated backups to avoid this happening again to the same extent. You saved me a ton of time, cheers.

I’m afraid the watched status is gone. It is stored in the database files, but the backup did not have movie or TV show libraries, so the info was not there.

Be sure to enable “Sync Watch State…” mentioned in an earlier post. It stores watch state at plex.tv. Hopefully you do not have to go through this again, but should it happen, the server will download watch state from plex.tv.

For backup, use Hyper Backup. It keeps ownership and permissions correct. Restoring is easy. You pick the folders and/or files to restore and it copies them to the desired location with ownership and permission already set.

You can exclude the Cache folder from the backup. That will save some space and the backup will also run a bit faster. You might have a tmp folder in /PlexMediaServer/AppData. If so, you can exclude it as well. Nothing there needs to be backed up.

Yeah, don’t worry about the permissions script. Everything seems to be working OK.

Sound like you’re back in working order. Write back with any questions or if something is not working correctly. - Cheers.

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