michealespinola / syno.plexupdate

A script to automagically update Plex Media Server on Synology NAS
GNU General Public License v3.0
273 stars 23 forks source link

error 289 when trying to update #2

Closed mojojojotroi closed 3 years ago

mojojojotroi commented 3 years ago

Hi Micheal,

According to your preference, I post my issue here, I'm not familiar with GitHub so I hope to be in the right section :) Below is the log of the very first run, and then the second run which is slightly different (but both exited with code 1): SYNO.PLEX UPDATER SCRIPT v2.9.9.2

       Script: Plex-update.sh v2.9.9.2
   Script Dir: /volume1/Softwares/Drivers/NAS/Synology/Commun
  Running Ver: 2.9.9.2
   Online Ver: 2.3.3
     Released: 2020-09-06 15:34:14+02:00 (62+ days old)
             * No new version found.

     Synology: DS3018xs-j (x86_64), DSM 6.2.2-24922 Update 4
     Plex Dir: /volume1/Plex/Library/Application Support/Plex Media Server
   Plex Token: *****HIDDEN*****
  Running Ver: 1.20.3.3483-211702a9f
   Online Ver: 1.20.4.3517-ab5e1197c (Public Channel)
     Released: 2020-10-28 23:35:06+01:00 (9+ days old)
             * Newer version found!

  New Package: PlexMediaServer-1.20.4.3517-ab5e1197c-x86_64.spk
  Package Age: 9+ days old (7+ required for install)

INSTALLING NEW PACKAGE:
----------------------------------------
2020-11-07 14:41:49 URL:https://downloads.plex.tv/plex-media-server-new/1.20.4.3517-ab5e1197c/synology/PlexMediaServer-1.20.4.3517-ab5e1197c-x86_64.spk [110940160/110940160] -> "/volume1/Softwares/Drivers/NAS/Synology/Commun/Archive/Packages/PlexMediaServer-1.20.4.3517-ab5e1197c-x86_64.spk" [1] package Plex Media Server stop successfully Failed to install package /volume1/Softwares/Drivers/NAS/Synology/Commun/Archive/Packages/PlexMediaServer-1.20.4.3517-ab5e1197c-x86_64.spk, error = [289] package Plex Media Server start successfully
----------------------------------------

  Update from: 1.20.3.3483-211702a9f
           to: 1.20.4.3517-ab5e1197c failed!

**And the second run:** 
SYNO.PLEX UPDATER SCRIPT v2.9.9.2

       Script: Plex-update.sh v2.9.9.2
   Script Dir: /volume1/Softwares/Drivers/NAS/Synology/Commun
  Running Ver: 2.9.9.2
   Online Ver: 2.3.3
     Released: 2020-09-06 15:34:14+02:00 (62+ days old)
             * No new version found.

     Synology: DS3018xs-j (x86_64), DSM 6.2.2-24922 Update 4
     Plex Dir: /volume1/Plex/Library/Application Support/Plex Media Server
   Plex Token: *****HIDDEN*****
  Running Ver: 1.20.3.3483-211702a9f
   Online Ver: 1.20.4.3517-ab5e1197c (Public Channel)
     Released: 2020-10-28 23:35:06+01:00 (9+ days old)
             * Newer version found!

  New Package: PlexMediaServer-1.20.4.3517-ab5e1197c-x86_64.spk
  Package Age: 9+ days old (7+ required for install)

INSTALLING NEW PACKAGE:
----------------------------------------
package Plex Media Server stop successfully Failed to install package /volume1/Softwares/Drivers/NAS/Synology/Commun/Archive/Packages/PlexMediaServer-1.20.4.3517-ab5e1197c-x86_64.spk, error = [289] package Plex Media Server start successfully
----------------------------------------

  Update from: 1.20.3.3483-211702a9f
           to: 1.20.4.3517-ab5e1197c failed!

In fact, the first time I didn't see the downloaded SPK file because it was stored in a new folder Package under Archive. As you can see, I did't store the script in a folder under /home of the admin. So I tried /volume1/homes/admin/scripts with no better success. I'll try version 2.3.3 except if you want some other tests.

michealespinola commented 3 years ago

It looks like you may have missed an installation/setup step. I believe that "error = [289]" is indicative of a package installation failure because of the 'trusted application publishers' restriction of DSM. Please review installation Step 2 and make certain that you have installed the Plex public key certificate and that you have configured DSM to allow it:

https://github.com/michealespinola/syno.plexupdate#2-add-the-plex-public-key-certificate-in-the-dsm

mojojojotroi commented 3 years ago

Congrats, it was this reason ! Hum kinda weird, I already added the signing key, so I didn't checked that point, but it disappeared on my both Syno... Do you think translating error 289 into a more human language is possible ?

michealespinola commented 3 years ago

The error is coming from the Synology tool for installing packages (called synopkg), so I don't have any control of it or its output.

michealespinola commented 3 years ago

Glad to hear that it was a simple and easily resolvable issue!

michealespinola commented 3 years ago

I will add a note about this error to the Step 2 documentation.

mojojojotroi commented 3 years ago

Hi Micheal, Strange behavior, the certificate is gone again. I'm gonna open a case to Synology's heldpesk because I don't understand why...

michealespinola commented 3 years ago

I would definitely contact Synology support about it. I've never experienced what you are describing, nor have I heard of it happening to anyone to the best of my recollection.

Is your 'Trust Level' still set to "Synology Inc. and trusted publishers"? I personally have 3 3rd party certificates installed, and I've never had to reinstall any of them.

michealespinola commented 3 years ago

@mojojojotroi, just so you know you weren't losing your mind - this has now happened to me! My Plex certificate disappeared from my Synology, but all my other added certs are there). I only noticed because my update script also failed with error 289.

Re-adding the cert was the easy resolution, but I am still unaware of what is causing the Plex cert to disappear.

mojojojotroi commented 3 years ago

Hi @michealespinola,

Sorry to haven't answered you 2 weeks ago, lot's of things kept me busy, then your message was lost in the flow. The 'Trust Level' is set to "Synology Inc. and trusted publishers". Sad to hear this also affects your NAS :/ On my side, what I can report:

I noticed the Communities packages repositories cert key never gone, even for dead repos. So pure hypothesis, I suspect the Plex cert key disappearing is due to a recent cleanup feature, orphaned cert key (without an associated repo linked by Source column) is removed sooner or later after a certain grace period. I noticed Plex cert key is the only one 4096-bit lenght and doesn't have an URL in Source column like the Synology's one (but this one is particular and I won't try to delete it to check if it's protected or not).

What is your setup ? Are your three 3rd party certificates coming from Communities packages repositories or are like the Plex one ? Did you updated recently your DSM ?

michealespinola commented 3 years ago

All of my other certificates are connected to package repositories, so that seems to be the stand-out difference (Plex is the only User-source certificate I have installed). I know that I have rebooted my NAS once since the last Plex update, but that is the only condition/change that I am aware of. The reboot was simply a performance check and not for any type of environment or setup change.

I have not added, updated or removed any other apps - or anything that I can think of that would have affected the DSM Package Center or anything else. From my perspective, the disappearance of the certificate makes zero sense.

michealespinola commented 3 years ago

As an additional follow-up, I've lost the Plex certificate again as well as other certificates that corresponded to package sources. I am thoroughly disturbed at this point.

yepecece commented 3 years ago

Hi, I have the same problem. Plex certificate disappear after some time.

michealespinola commented 3 years ago

This seems like something we all should be opening a support ticket for. I've never had this issue before, and now I've lost certificates for repositories I use.

mojojojotroi commented 3 years ago

Will it be difficult to add the Plex cert key at the begining of the script ? I know it's not the main goal of the script and looks like a workaround, but in that way it could be an one-in-all ready2run script.

michealespinola commented 3 years ago

I've looked into it, but could not figure it out. If anyone knows how to do it or can point me to an example, I will gladly automate it.

michealespinola commented 3 years ago

So, after just having replied to this thread; I decided to take a look at the status of my certificates. All of my package source certificates that had gone missing have since reappeared.

edit: cleaned-up frustrated rambling grammar

mojojojotroi commented 3 years ago

Hi @michealespinola & @yepecece !

Did Synology support team answered you about this problem ? Maybe you did not open a incident case on your side ? If we are several to mention this, maybe they will pay attention to it !

michealespinola commented 3 years ago

I can affirm that it's still an issue, as I experienced the disappearance of my certificate for Plex within the past two weeks. However, I have not opened any type of incident with Synology.

mojojojotroi commented 3 years ago

Synology didn't answered to me about this :/

michealespinola commented 3 years ago

I figured as much. I have been holding off on trying to address it with them pending the release of DSM7. I figure that they aren't likely to use resources to fix something they are on the verge of phasing out. If it's still a problem with DSM7, then I will complain - but, I'm not going to have any more clout with them than anyone else.