[PLEX Pass Customer] QNAP Upgrade Installation Fails

Server Version#: 4.5.3.1652
Player Version#: 1.23.0.4459
When trying to install most recent two upgrades of PLEX Media Server, QNAP App Center fails with the error:
Unable to install the package. For details, see “System Event Log”
-PlexMediaServer-1.23.0.4459-20536d6fc-x86_64.qpkg

The System Event Log shows only a message saying “[App Center] Failed to install PlexMediaServer-1.23.0.4459-20536d6fc-x86_64.qpkg. Try again later.” and no other details. Plex logs show nothing relevant. SHA1 hash of downloaded file matches that shown on download site.

I’ve seen times when the QNAP will not stop all the Plex processes cleanly.

When QTS tries to install, it can’t because the files are still in use.

The solution here:

  1. Stop Plex in App Center (disables it)
  2. Restart QTS
  3. Now install the package
  4. Start Plex
1 Like

Thanks ChuckPa. After stopping Plex (it’s disabled) and restarting my QNAP, it still gives me the same errors on install, both to the screen and the System Log. When I enable Plex, it works fine, just still running the old version.
Other ideas?

May I see the exact errors please?

As an optional way to install, you can do the following:

  1. Upload the file to the Public share
  2. SSH into the QNAP
  3. cd /share/Public
  4. chmod +x filename.qpkg
  5. ./filename.qpkg (execute it as if a program)

This is how QPKGs actually install.

Show me what it printed in that SSH console.

Which version of firmware are you using? Their latest one broke Nvidia GPUs.

OK. Those steps worked. Unsure why it didn’t if that’s how QNAP does it.
Firmware version is currently 4.5.3.1652. Model is TS-451+ (Intel chipset. No NVIDIA) Same problem was happening on previous version (Which is why I upgraded. I don’t usually since Plex is my priority, until it’s proven stable in the forums.)

SSH Console is below. Though if it worked, I’m not sure it’s valuable…

Thanks for your help. Let me know if there’s anything else I can do to help for the future

SSH StdOut:

[/share/Public] # chmod +x PlexMediaServer-1.23.0.4459-20536d6fc-x86_64.qpkg
[/share/Public] # ./PlexMediaServer-1.23.0.4459-20536d6fc-x86_64.qpkg
Install QNAP package on TS-NAS…
./
./qpkg.cfg
./qinstall.sh
./package_routines
./built_info
4455+1 records in
4455+1 records out
110565988 bytes (105.4MB) copied, 1.394243 seconds, 75.6MB/s
107973+0 records in
107973+0 records out
110564352 bytes (105.4MB) copied, 1.395295 seconds, 75.6MB/s
PlexMediaServer 1.22.3 is already installed. Setup will now perform package upgrading.
Firmware check is fine.
Stopping Plex Media Server…
Link service start/stop script: plex.sh
Set QPKG information in /etc/config/qpkg.conf
^[[DStarting Plex Media Server…
[/share/Public] #

That is perfectly normal Shell install output except for the ^[[D.

Did you hit a cursor / fcn key in there?

To start PMS here:

/share/*/.qpkg/Plex*/plex.sh start

To see what’s running (after a few seconds)

ps -ef | grep -i plex

Considering I was ignored the last two times I posted and I actually paid for this service, I thought it might be worth the subtle “hint”. Seeing as how it actually got a response for once, it looks like it’s a Keeper…

Hey ChuckPa. I did indeed hit left arrow when I was swapping back to the session. It’s running and upgraded now. Unclear why it failed with their App Store interface. If there’s any logging from QNAP I can get to you, just let me know from where.

Thanks again.

We’re all good

I’m spending the afternoon, and probably most of tonight, unscrewing changes made by QNAP with their Nvidia drivers.

Seems I need to be smart enough to second-guess QNAP until the dust settles in whatever they’re doing

Same problem for PlexMediaServer-1.23.1.4528-c0513eb4c-x86_64 installation. Manual installation per above instructions works. I realize that my console login is the root and my GUI login is an Admin User.
I’m unblocked for now. If there’s additional steps to make this problem go away in the future, please let me know.

@OttScott

I need more information please?

Which QTS version are you using ?

As for installation,

We’ve had multiple users install current packaging, on both QTS, and now QuTS without incident. The issue is unfortunately isolated to you.

If App Center is still failing for you after upgrading to current firmware (4.5.3.1670) , please contact QNAP. They will need to help fix it for you. Whomever you speak with cannot say “It’s a Plex problem”.

It is the newest Firmware (.1670) and I understand your position. Other packages have installed correctly so I’m honestly quite confused with this. Issue appears isolated to Plex from my perspective. :wink:

I can try to reach out to QNAP, but they’ve not been very helpful in the past. Thanks for providing a methodology to succeed. At least I’m unblocked.

I can understand that, from your perspective, it’s Plex.

We have seen that you can install by using the command line which confirms the QPKG is valid.

I will reach out to QNAP and see if they have any advice for me which I can pass on to you about how to remedy

OK. Managed to get SSH setup for my QNAP User account. Below is the install log for the most recent upgrade. Looks like a bunch of permission issues. Not sure why it would have been changed., but is there a repair I can do for the Plex permission structure?

plex_install.log (273.3 KB)

Are you logged in as user admin ?

This only works as admin.

Install QNAP package on TS-NAS...
./
./qpkg.cfg
./built_info
./qinstall.sh
./package_routines
4390+1 records in
4390+1 records out
108967442 bytes (103.9MB) copied, 1.333717 seconds, 77.9MB/s
106412+0 records in
106412+0 records out
108965888 bytes (103.9MB) copied, 1.334401 seconds, 77.9MB/s
qinstall.sh: line 161: /tmp/update_process: Permission denied
qinstall.sh: line 1261: /share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/.oldlist: Permission denied
rm: remove '/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/.list'? rm: can't remove '/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/.list': Permission denied
PlexMediaServer 1.23.1 is already installed. Setup will now perform package upgrading.
Firmware check is fine.
Stopping Plex Media Server...
/etc/init.d/plex.sh: line 203: kill: (13308) - Operation not permitted
rm: remove '/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/Plex Media Server/plexmediaserver.pid'? rm: can't remove '/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/Plex Media Server/plexmediaserver.pid': Permission denied
rm: can't remove '/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Resources/Plug-ins-c0513eb4c/LocalMedia.bundle/README.md': Permission denied
rm: can't remove '/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Resources/Plug-ins-c0513eb4c/LocalMedia.bundle/Contents/DefaultPrefs.json': Permission denied
rm: can't remove '/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Resources/Plug-ins-c0513eb4c/LocalMedia.bundle/Contents/Code/helpers.py': Permission denied
rm: can't remove '/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Resources/Plug-ins-c0513eb4c/LocalMedia.bundle/Contents/Code/localmedia.py': Permission denied
rm: can't remove '/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Resources/Plug-ins-c0513eb4c/LocalMedia.bundle/Contents/Code/videohelpers.py': Permission denied
rm: can't remove '/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Resources/Plug-ins-c0513eb4c/LocalMedia.bundle/Contents/Code/subtitlehelpers.py': Permission denied

you must have root (admin) permissions to install a package. Normal “user” signin accounts do not have the privileges

My account is not Root, but is an Admin. As I said, I can install and update other packages.

Looking closer, ls -l shows that the files are indeed marked as owned by ‘admin’/‘administrators’. My User account (Scott) is shown as a member of ‘administrators’.

—partial output below—
-rw-r–r-- 1 admin administrators 5 2021-05-18 20:25 plexmediaserver.pid

[/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Resources] # more /etc/group
administrators:x:0:admin,Scott

Scott,

It doesn’t matter if your User account is marked as admin when you are at the command line.

At the command line, you are “scott”, member of administrators

QPKG command line install does not behave the same as “Manual Install” in the GUI.

Please look here.

[/share/CACHEDEV2_DATA/.qpkg/PlexMediaServer] # cd ..
[/share/CACHEDEV2_DATA/.qpkg] # ls -la
total 12
drwxrwxrwx  3 admin administrators 4096 2021-05-18 19:39 ./
drwxrwxrwx 85 admin administrators 4096 2021-05-30 22:40 ../
drwxr-xr-x  6 admin administrators 4096 2021-05-18 19:39 PlexMediaServer/
[/share/CACHEDEV2_DATA/.qpkg] # 

Only user admin, not members of the administrators group, has write permission to the Plex qpkg directory.

These are the permissions QTS / QPKG assign.

We have to do it the way QNAP wants it done

Going back to what you wrote: Even as a member of the administrators group, you only have READ permission. You do not have WRITE or DELETE.

OK. So like I said, I’m not sure how it got into this state. I used to be able to update Plex from the GUI as Scott. Should I chmod -R on all the files to allow me to update? Or is there a safer/better way to do this?

Can you log in as admin, not scott, and use Manual Install?

If you can’t then you must get QNAP , on a teamviewer session, to help you fix whatever is wrong with your QTS installation.

If you were able to perform the Manual Install successfully, it is probably worth asking QNAP to help you find out why you can’t as a user in the administrators group.

We do everything as the admin user to avoid this type of situation and is part of the QNAP documentation so I don’t really know how it should work.