1.8.3 upgrade borked my plex installation on synology (pointing to wrong Plug-ins folder)

So all was working well as of v1.8.2 on Synology (x64). When I upgraded to 1.8.3 plex won’t run. I also upgraded to v1.9.0 today. Same problem (as expected). I checked the logs on 1.8.3 and 1.9.0 - the log says mainling the following:

Sep 17, 2017 15:50:23.192 [0x7fef3c205700] WARN - Warning: ex: boost::filesystem::last_write_time: No such file or directory: "/volume1/@appstore/Plex Media Server/Resources/Plug-ins-b1d4aa012", couldn't check file: /volume1/@app store/Plex Media Server/Resources/Plug-ins-b1d4aa012 Sep 17, 2017 15:50:23.379 [0x7fef329a1700] WARN - Warning: ex: boost::filesystem::last_write_time: No such file or directory: "/volume1/@appstore/Plex Media Server/Resources/Plug-ins-b1d4aa012/PlexMovie.bundle/Contents/Code", cou ldn't check file: /volume1/@appstore/Plex Media Server/Resources/Plug-ins-b1d4aa012/PlexMovie.bundle/Contents/Code

So I investigated a little and the problem seems to link to “Plug-ins-b1d4aa012”. The “b1d4aa012” part is the build-source part of v1.8.2, while 1.8.3 and 1.9.0 have other ID:

PlexMediaServer-1.8.2.4209-b1d4aa012-x86_64.spk
PlexMediaServer-1.8.3.4235-2d20185b0-x86_64.spk
PlexMediaServer-1.9.0.4252-d07c1f408-x86_64.spk

So the upgrade to 1.8.3 did fail somehow and did not change a config file or database to point to the new /volume1/@appstore/Plex Media Server/Resources/Plug-ins-2d20185b0 folder (and then again for 1.9.0 folder).

So how do I fix this? I think Plex would start up if I change the /volume1/@appstore/Plex Media Server/Resources/Plug-ins-d07c1f408/ (this exists in 1.9.0 with all “missing” files) to /volume1/@appstore/Plex Media Server/Resources/Plug-ins-b1d4aa012/ but that is a dirty hack I don’t like. Is there a config file I can edit or a SQL statement I can run?

Uninstall PMS. It will remove all the code. You may double check by examining /var/packages/Plex Media Server/target . When uninstalled, it better be completely gone. If, for some bizarre reason it isn’t, delete it.

Next reinstall the package.

Your Library (the share and its contents) will be there waiting for you.

I’ve seen this a few times with Synology but never found a reason for it and it’s inconsistent. Until I do find the root cause, I can’t address it in the installer.

What happens to the database of what episodes and movies I’ve seen, my users I share my media with, my plugins (trakt.tv for instance) etc?

You want me to post some logs or something to investigate?

Unless you delete the Plex share, absoutely nothing happens to them.
I deliberately leave the share intact.

When PMS installs, it goes out and looks for the Plex share and uses it wherever it finds it. (Yes, this means you can move the Plex share as you deem appropriate. The only requirement is you uninstall and reinstall the binaries to activate the installer script to make the linkages.)

Ok. I don’t know what I would do if I lost the plex tracking of what I’ve watched and not.
But I can’t say I’ve ever created a Plex share… Unless you mean there my media files resides… but I do have /volume1/Plex so if thats the one you mean, it’s there.

Here goes… uninstalling plex 1.9.0 through synolog package manager…

To give you further reassurance … you can always make a ZIP backup of the Library directory in the Plex share.

Right click on Library and Compress to Library.zip. It will take a while but you’ll have an image backup when complete.

Obviously, you’ll want to stop PMS to do this. Backing up the database while open and active isn’t the safest thing to do

I actually have made a weekly backup of that folder for a while, so that confirmed I’ve been backing up the correct files :slight_smile:
Hmm… plex was shut down and I uninstalled the package. But some part of plex still runs I see when running ps ax:

~# ps axu | grep -i plex

/volume1/@appstore/Plex Media Server/Plex Relay /var/packages/Plex Media Server/target/Plex Media Server Plex Plug-in [com.plexapp.system] /volume1/@appstore/Plex Media Server/Resources/Plug-ins-b1d4aa012/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.8.2.4209-b1d4aa012 /volume1/@appstore/Plex Media Server/Plex Tuner Service

And a few more lines as well (I’ve shorted the lines). I see service-version points to 1.8.2…

How do I best kill this, as it blocks my installation of 1.9.0 from scratch saying the port(s) are in use…
'kill -9 '?

It should NOT be running. Package Manager is misbehaving. reboot DSM.

When it comes back. Verify there is no Plex Media Server in the @appstore (the executables)… If so, nuke the Plex Media Server directory.

Install PMS (manual install).

If you still have problems, DSM is toasted and will require a reset / reinstall of the OS. You shares won’t get erased when done correctly (don’t miscount the beeps during reset). I will help you with this should you need it.

There were no “Plex Media Server” in @appstore after I uninstalled. So something strange is/was up, hung processes clinging to the port(s) or something… I ended up running ‘kill -9’ on all of the processes and then I could reinstall.

Seems to be fine-ish. The OnDeck is slow/showing empty space except music, unless I change the size (slider). I guess a reboot/scheduled tasks tonight might make it better… I will see how it is tomorrow. At least I can watch tv/movies through Plex now :slight_smile:

Ok… if it’s slow, Stop scanning / whatever it’s doing and Optimize Database.

The OnDeck/Dashboard (“homepage”) is still “blank”: (missing “should be” at the end of the first sentance..)

If I scroll down I see ‘Recently added music’ all at the bottom.
If I change the poster size with the slider in the top right, and then scroll, the OnDeck etc shows..

Bug in 1.9.0? I’m using Chrome latest through https://app.plex.tv/desktop#

No, not a bug in 1.9.0. Something is sideways with your system

Open the Plex share, navigate down through Library until you see the Logs directory. When you see Logs right click it and Compress to Logs.zip.

Attach that file here and I will see what’s happening.

Here are the logs.

PS - would be good if .xz files where accepted (pms-logs.tar.xz), better compressions for text files.

Optimize that database. That’s step one first and foremost. PMS is failing to talk to itself because it’s so jammed up

Sep 17, 2017 23:24:14.935 [0x7fab3137d700] WARN - Waited one whole second for a busy database.
Sep 17, 2017 23:24:18.821 [0x7fab3137d700] ERROR - Failed to begin transaction (../Statistics/StatisticsManager.h:191) (tries=1): Cannot begin transaction. database is locked
Sep 17, 2017 23:30:27.022 [0x7fab237ff700] WARN - SLOW QUERY: It took 330.000000 ms to retrieve 50 items.
Sep 18, 2017 00:00:37.342 [0x7fab31959700] WARN - SLOW QUERY: It took 350.000000 ms to retrieve 50 items.
Sep 18, 2017 00:05:22.446 [0x7fab1f78b700] INFO - It's been 27067872 seconds, so we're starting scheduled library update for section 2 (JofFlix Movies)
Sep 18, 2017 00:05:22.447 [0x7fab1f78b700] INFO - It's been 44339326 seconds, so we're starting scheduled library update for section 3 (JofFlix Music)
Sep 18, 2017 00:05:22.447 [0x7fab1f78b700] INFO - It's been 27064917 seconds, so we're starting scheduled library update for section 1 (JofFlix TV)
Sep 18, 2017 00:05:22.447 [0x7fab1f78b700] INFO - It's been 44339022 seconds, so we're starting scheduled library update for section 7 (Photos)
Sep 18, 2017 00:15:51.533 [0x7fab2fd11700] WARN - SLOW QUERY: It took 240.000000 ms to retrieve 0 items.
Sep 18, 2017 00:31:26.651 [0x7fab3166b700] WARN - SLOW QUERY: It took 300.000000 ms to retrieve 50 items.
Sep 18, 2017 00:45:19.087 [0x7fab214d7700] WARN - Held transaction for too long (../Library/MetadataItem.cpp:6665): 0.120000 seconds
Sep 18, 2017 01:00:29.218 [0x7fab22959700] WARN - SLOW QUERY: It took 300.000000 ms to retrieve 50 items.
Sep 18, 2017 01:00:33.582 [0x7fab22959700] WARN - SLOW QUERY: It took 440.000000 ms to retrieve 0 items.
Sep 18, 2017 01:05:22.448 [0x7fab3137d700] INFO - It's been 27071472 seconds, so we're starting scheduled library update for section 2 (JofFlix Movies)
Sep 18, 2017 01:05:22.448 [0x7fab3137d700] INFO - It's been 44342926 seconds, so we're starting scheduled library update for section 3 (JofFlix Music)
Sep 18, 2017 01:05:22.449 [0x7fab3137d700] INFO - It's been 27068517 seconds, so we're starting scheduled library update for section 1 (JofFlix TV)
Sep 18, 2017 01:05:22.449 [0x7fab3137d700] INFO - It's been 44342622 seconds, so we're starting scheduled library update for section 7 (Photos)
Sep 18, 2017 01:11:51.926 [0x7fab3137d700] ERROR - Error building date/episode map: bad lexical cast: source type value could not be interpreted as target
Sep 18, 2017 01:11:56.035 [0x7fab3137d700] WARN - Unable to load episode file [/volume1/Plex/Library/Application Support/Plex Media Server/Metadata/TV Shows/9/32113cf053a7798064bb056e7da459f92dde5d5.bundle/Contents/_combined/seasons/3/episodes/1900-01-01.xml]
.
.
Sep 18, 2017 01:15:55.539 [0x7fab36be1700] WARN - SLOW QUERY: It took 270.000000 ms to retrieve 0 items.
Sep 18, 2017 01:23:55.894 [0x7fab2208f700] WARN - Held transaction for too long (../Library/MetadataRelation.cpp:118): 0.140000 seconds
Sep 18, 2017 01:23:55.894 [0x7fab2208f700] WARN - Held transaction for too long (../Library/MetadataItem.cpp:6484): 0.140000 seconds
Sep 18, 2017 01:23:58.720 [0x7fab2208f700] WARN - Held transaction for too long (../Library/MetadataItem.cpp:5093): 0.140000 seconds
Sep 18, 2017 01:32:06.350 [0x7fab30bff700] WARN - Held transaction for too long (../Library/MetadataItem.cpp:6665): 0.120000 seconds
Sep 18, 2017 01:33:21.767 [0x7fab211e9700] WARN - Held transaction for too long (../Library/MetadataItem.cpp:6665): 0.170000 seconds
Sep 18, 2017 01:34:52.010 [0x7fab237ff700] WARN - Held transaction for too long (../Library/MetadataRelation.cpp:118): 0.170000 seconds
Sep 18, 2017 01:34:52.010 [0x7fab237ff700] WARN - Held transaction for too long (../Library/MetadataItem.cpp:6484): 0.170000 seconds
Sep 18, 2017 01:35:58.381 [0x7fab2fd11700] WARN - Held transaction for too long (../Library/MetadataItem.cpp:6665): 0.200000 seconds
Sep 18, 2017 01:36:26.311 [0x7fab2fa23700] WARN - Held transaction for too long (../Library/MetadataRelation.cpp:118): 0.220000 seconds
Sep 18, 2017 01:36:26.311 [0x7fab2fa23700] WARN - Held transaction for too long (../Library/MetadataItem.cpp:6484): 0.220000 seconds
Sep 18, 2017 01:37:35.950 [0x7fab327ff700] WARN - Waited one whole second for a busy database.
Sep 18, 2017 01:37:44.333 [0x7fab2fd11700] WARN - Waited one whole second for a busy database.

I did that as you said earlier. But I can do that again. And I emptied trash and cleaned bundles.
The media library are about 25TB. Not much added or removed lately.

I will be away on a longer vacation from tomorrow, so I won’t be able to follow up on this until the start of October. Thanks so far. Will post here again then.

I have the tiny Atom C2538 CPU and it doesn’t have any problems with 20 TB of media. That said. I do add it in chunks.

e.g.

  1. Add /volume1/movies first and then optimize
  2. Add /volume1/movies2 next and optimize again
  3. Add /volume1/tv … optimize
  4. etc