Cannot connect after upgrading to 1.18

Server Version#:1,18.0.1944
Player Version#: Plex Web 4.10.1, Plex for Android (Mobile & TV) 7.22.1.12828, Plex for Windows 1.2.0.875
Running on QNAP TVS-951X QTS 4.3.6.1070

I had been running PMS 1.17 fine for some time now. Upgraded to 1.18.0.1913 when prompted to. Since then, have had issues connecting to Plex.

Before reading any posts, I attempted to downgrade to the last version I had running – 1.17.0.1841. That worked for a short time – was able to connect once or twice. When I was last able to connect, I saw that it was indexing my music (seemed to be stuck), and saw that it was either “Optimizing Database” or “Backing up Database.” Next time I refreshed Plex web app, I was unable to reconnect. Now all I see is “There was an error retrieving content.”

Today, I upgraded to 1.18.0.1944 hoping that would resolve the issues – it didn’t. I’m still receiving the same issue. Without knowing any better, I tried to uninstall PMS (it did not seem to completely remove), restart the server, and reinstall. None of this has worked.

I don’t think I enabled debugging previously, but now I’m unable to connect to enable that setting.

Any help would be greatly appreciated. Thank you!

Hey Wo!

Yeah I think we can get you up and running again.

If you’d like to completely uninstall PMS, which would make it like PMS was never on the QNAP, you could do that but still leave your videos behind.

On the other hand, if you want to leave the 1.18.0.1944 there and start debugging it in order to save your metadata and because it’s interesting to solve, we can do that too by enabling debugging in a text file if needed.

I will get a :coffee:

Hi Nibbles,

Thanks for your reply!

My preference would be to attempt to debug first as I’d hate to lose months of fine-tuning everything.

With that said, I have attempted to locate the hidden server settings. I have found the preferences.xml file, but if you’re referring to enabling debugging (syslog?) , I was unable to locate the configuration file in the 5 listed locations.

While doing some digging around, I was able to locate a log directory. Attached are the 3 logs that I was able to locate. Hopefully it contains the information that is needed. I did not restart the server/Plex before copying these files.Plex Media Server.1.log (47.1 KB) Plex Media Server.2.log (384.2 KB) Plex Media Server.log (384.8 KB)

Thanks for the logs. I’ll have a look.

The advanced server settings - you would edit the Preferences.xml file to add in or adjust the variables described in the Available Preferences

logDebug would need to be set to a 1
LogVerbose should be set to a 0

But your logs are already in debug mode. So no worries.
They are very clean of errors so far.

A bit rusty with linux and editing files via command line – its been about 20 yrs since I last had to do this stuff, but its slowly coming back to me. Thanks for pointing that out! I’ve gone ahead and added those variables in – they were not present before.

Ok so from your logs, the versions you have are

Oct 11, 2019 21:39:43.551 [0x7fa30c2c8700] INFO - Plex Media Server v1.17.0.1841-d42cfa161 - QNAP TVS-951X x86_64 - build: linux-x86_64 qnap - GMT -07:00
Oct 11, 2019 21:39:43.551 [0x7fa30c2c8700] INFO - Linux version: QTS 4.3.6.1070, language: en-US

Your QNAP network interface card is identified well, no IPv6 confusion.

Oct 11, 2019 21:39:48.126 [0x7fa315d12740] DEBUG - Detected primary interface: 192.168.1.3
Oct 11, 2019 21:39:48.126 [0x7fa315d12740] DEBUG - Network interfaces:
Oct 11, 2019 21:39:48.126 [0x7fa315d12740] DEBUG -  * 1 lo (127.0.0.1) (loopback: 1)
Oct 11, 2019 21:39:48.126 [0x7fa315d12740] DEBUG -  * 3 eth0 (192.168.1.3) (loopback: 0)

So now please describe your internal LAN including the hardware and layout, number of subnets, how IP addresses for the computers involved are assigned, etc. Tell us if you have any VPN anywhere.

Given that the QNAP is at 192.168.1.3 hop onto your Windows machine and:

  • open a Windows terminal and copy the output of ipconfig /all
  • also on the terminal, SSH into the QNAP as admin, and restart PMS:
ssh admin@192.168.1.3
<enter your password when prompted>
cd /share/CACHEDEV1_DATA/.qpkg/PlexMediaServer
./plex.sh restart

Give PMS 6-10min to initialize.
Still on Windows using a supported browser, please test things out:

  • open plex.tv and sign out, then sign back in.
  • open the Plex Bundled App https://192.168.1.3:32400/web
  • sign in to your server or screenshot the problems you have
  • back in the Windows terminal that has SSH open to QNAP, stop it and get the logs:
./plex.sh stop
cd "/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/Plex Media Server/Logs"
ll | sort -k 6,8

The last command sorts by date, and the last few items will be the ones changed since the PMS restart you did. We’d like to get Plex Media Server.log and com.plexapp.system.log zipped and attached along with screenshots.

Thanks!

Thank you for the detailed instructions. Heres the information you requested:

My internal LAN consists of a Smart TV, several smart devices, (2) PCs, NVR. All devices are assigned IPs via DHCP with exception of my NAS and NVR that has static IPs. To my knowledge, all devices should be on the same subnet. The only device that connects to a VPN would be my Windows PC. Other devices that connect to the Plex server (Smart TV, Android phones) do not use VPN, and still have trouble connecting.

I used putty instead of Windows terminal. After running the commands you indicated to restart plex, while waiting for it to reload, I did receive the following error:

[/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer] # ./plex.sh restart
Stopping Plex Media Server...
Starting Plex Media Server...
[/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer] # Exception AttributeError: "'ZipArchive' object has no attribute '_zip'" in <bound method ZipArchive.__del__ of <Framework.components.data.ZipArchive object at 0x7f29b9dfbe90>> ignored

Attached are the files you requested. Please let me know if I’ve missed anything. PLEX.zip (248.2 KB)

You did well, thank you. That error you saw corresponds to an error opening a zip file that occurred in the logs during an auto update procedure:

in com.plexapp.system.log
2019-10-12 22:07:51,234 (7f29ba88f700) :  DEBUG (runtime:1156) - Starting timed thread named 'auto_update_thread'
2019-10-12 22:07:51,234 (7f29ba88f700) :  INFO (storeservice:356) - Starting automatic update check
2019-10-12 22:07:51,236 (7f29ba88f700) :  DEBUG (runtime:1117) - Created a thread named 'remove_unavailable_agents'
2019-10-12 22:07:51,250 (7f29ba88f700) :  DEBUG (networking:166) - Requesting 'https://plugins.plex.tv/apps/all.json?frameworkVersion=2.6.3&machineIdentifier=2aff3d16ccc22e4ad0ae8c4a5fb6bb883b5d6e73&os=Linux&osVersion=QTS%204.3.6.1070&cpu=i386&serverVersion=1.17.0.1841-d42cfa161&systemRevision=d42cfa1'
2019-10-12 22:07:51,310 (7f29ba88f700) :  INFO (storeservice:469) - No beta plugins.
2019-10-12 22:07:51,322 (7f29ba88f700) :  INFO (storeservice:521) - Required plug-in 'Services' [com.plexapp.system.services] isn't installed.
2019-10-12 22:07:51,322 (7f29ba88f700) :  INFO (storeservice:359) - Starting automatic update installation
2019-10-12 22:07:51,322 (7f29ba88f700) :  INFO (installservice:276) - Performing an installation of com.plexapp.system.services
2019-10-12 22:07:51,323 (7f29ba88f700) :  INFO (installservice:96) - Setting up staging area for com.plexapp.system.services at /share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/Plex Media Server/Plug-in Support/Data/com.plexapp.system/DataItems/Stage/com.plexapp.system.services
2019-10-12 22:07:51,323 (7f29ba88f700) :  DEBUG (networking:166) - Requesting 'https://bundle-archive.plex.tv/plexinc-plugins/Services.bundle/archive/62fcf1f.zip'
2019-10-12 22:07:51,386 (7f29ba88f700) :  ERROR (networking:219) - Error opening URL 'https://bundle-archive.plex.tv/plexinc-plugins/Services.bundle/archive/62fcf1f.zip'
2019-10-12 22:07:51,387 (7f29ba88f700) :  INFO (installservice:232) - Unable to download archive for com.plexapp.system.services
2019-10-12 22:07:51,387 (7f29ba88f700) :  INFO (installservice:103) - Unstaging files for com.plexapp.system.services (removing /share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/Plex Media Server/Plug-in Support/Data/com.plexapp.system/DataItems/Stage/com.plexapp.system.services)
2019-10-12 22:07:51,392 (7f29ba88f700) :  DEBUG (runtime:1150) - Scheduled a timed thread named 'auto_update_thread'

The services bundle is important, but whether it did a fallback to a previous bundle I don’t know. It could be an indication of more network issues. I’m not certain yet what I’m seeing.

Looking at Plex Media Server.log to see if your NAS contacts plex.tv at all, I found log entries about your server being Unclaimed.

Oct 12, 2019 22:06:53.138 [0x7efdb4bd5700] DEBUG - MyPlex: Sending unclaimed device connections
Oct 12, 2019 22:06:53.138 [0x7efdb4bd5700] DEBUG - HTTP requesting POST https://plex.tv/devices/2aff3d16ccc22e4ad0ae8c4a5fb6bb883b5d6e73/unclaimed?Connection[][uri]=http://192.168.1.3:32400
...
Oct 12, 2019 22:06:53.768 [0x7efdb4bd5700] DEBUG - HTTP 200 response from POST https://plex.tv/devices/2aff3d16ccc22e4ad0ae8c4a5fb6bb883b5d6e73/unclaimed?Connection[][uri]=http://192.168.1.3:32400

Let’s add up the likely evidence:

  • you have a reasonably happy server waiting for you to claim it due to reinstalls
  • you have two VPNs on the Windows PC that’s in charge of admin
  • attempts to admin the QNAP QTS via PC browser https work fine
  • attempts to admin the QNAP PMS via PC browser https fail with ERR_CONNECTION_CLOSED

Could you try to connect with http://192.168.1.3:32400/web which is non-secured please?

I’d like to read what @ChuckPa thinks.

Attempted to access via the unsecured link. ERR_CONNECTION_REFUSED

Okay stop the server again with ./plex.sh stop and use your good editor that doesn’t add Windows CR/LF weirdness to set securedConnections to 1 which is the default and means they are “Preferred” in your Preferences.xml

Then get into the correct directory to ./plex.sh start

You can read about that in the advanced settings I linked.

If it still doesn’t work, you might want to stop and wait for Chuck to reply.

I would be suggesting that you uninstall the VPNs from Windows and try again.

Regardless, screenshot all the QTS Network & Virtual Storage pages that show how your QNAP is set up for networking. It’s like 5 screenshots as you work your way down the left hand column of choices. You can redact your external IP ofc.

I think I may have missed a step the last time you asked me to login via 192.168.1.3:32400/web – I may have forgot to start the plex server again.

This time, after I modified the Preferences.xml as instructed, and started it up, I was able to access Plex via that same link. It indicated “Great, we found a server” and wanted to bring me through the server setup process. The next step was to setup libraries. Before I get too far ahead of myself – I understand my library is still in tact… but does this mean my old metadata is gone, and that I’m starting over? Is there any way to recover?

I’ll await further instructions from you and/or Chuck before I screw myself over again. :slight_smile: I’ll call it a night for now - thank you for your time, patience, and detailed responses in helping me work through this. Its greatly appreciated!

yes best sleep on that :smiley: We’ll have at it in the morning.

Just wanted to check back to see if anyone had thoughts on what I should do at this juncture. Is there any way to retain the metadata? If I was to continue re-claiming the server, would my metadata still be there, or be wiped? Thank you in advance!

Ok that’s good news you got to a positive response from the server. I was hoping for Chuck to stop bye, but I heard he’s busy this week. So your questions:

  1. Your “library” usually refers to your media files.
  2. Plex server data including your metadata is located elsewhere.
  3. When you leave PMS running and do a Manual Install of PMS using AppCenter, the install process preserves your metadata and Preferences.xml and all customizations.
  4. Does claiming your server delete your metadata? No.
  5. Is there any way to retain your metadata? Yes it’s good to make a backup, but it’s retained every time you leave PMS running and use AppCenter to up/down-grade it.

Let’s make a backup of your metadata, then you can finish claiming it, just in case :slight_smile:

  1. Cancel out of claiming the server for now
  2. Stop PMS
  3. Zip up the data to the admin’s home directory:
[/root] # cd /share/CACHEDEV1_DATA/.qpkg/PlexMediaServer
[/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer] # ./plex.sh stop
Stopping Plex Media Server...
[/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer] #
[/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer] # zip -r /share/homes/admin/pms.backup.zip "Library/Plex Media Server"

That can take a while, but you’ll see filenames go bye the whole time.
It made a 6GB zip file when I ran it. When it’s done, you can

[/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer] # ./plex.sh start

and go back to the web and claim it :slight_smile:
Let us know how it goes.

I zipped up that folder as instructed (got a huge zip file now), and started the server again.

Looks like when I “claimed” the server the other day, and stopped when prompted to add libraries, it did indeed claim it. When logging in locally, it brought me straight into the Plex interface. However, it did not show any libraries, and just has the circle in the middle of the screen like its searching. Also, it appears that my last action previously was downgrade to 1.17 as thats what the current version is.

Is there any way to point Plex back to the old metadata? Should I upgrade to the latest?

Thank you!

That would be a step forward if it’s claimed and you can log in.
Can you connect with this now? https://192.168.1.3:32400/web
After that, go into Settings - Troubleshooting - Download Logs and zip up what it gives you. It will be good to see what it’s looking like.

As far as restoring your metadata, I don’t understand why your libraries weren’t listed. I would have expected the server to be in decent shape just unclaimed. If your server was working normally, these methods of restoring your metadata would apply.

  1. https://support.plex.tv/articles/202485658-restore-a-database-backed-up-via-scheduled-tasks/
  2. https://support.plex.tv/articles/201370363-move-an-install-to-another-system/

Maybe just doing #1 will get back your libraries.
Upload some logs, and let us know what backups you found.

Yes, I was able to connect via http and https, though the https version prompted me to login even while I was already logged in via http. Here are the logs.

Before coming here for help, I did attempt to uninstall once (I mistakenly tried following instructions from a thread in the synology section). The uninstall didn’t seem to be completely successful, but maybe that did it? I read somewhere that qnap and synology works differently…

I’ll try to follow the first link you provided to restore the database, and will report back.

I found the databases directory that the link was referring to. However, I was unable to locate any dated backups like was indicated.

[/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/Plex Media Server/Plug-in Support/Databases] # ls -l
total 1056
-rw-r--r-- 1 admin administrators  69632 2019-10-13 01:28 com.plexapp.dlna.db
-rw-r--r-- 1 admin administrators  32768 2019-10-13 01:28 com.plexapp.dlna.db-shm
-rw-r--r-- 1 admin administrators 292552 2019-10-13 01:28 com.plexapp.dlna.db-wal
-rw-r--r-- 1 admin administrators 333824 2019-10-12 22:06 com.plexapp.plugins.library.blobs.db
-rw-r--r-- 1 admin administrators 345088 2019-10-15 23:51 com.plexapp.plugins.library.db

So does that mean I don’t have a backup of the library database?

Keep using the https connection. Being signed in is very important.

You have the correct location. I use the same location.
I see these backups on my system.

-rw-r--r-- 1 admin administrators 43928576 2019-10-15 23:33 com.plexapp.plugins.library.db
-rw-r--r-- 1 admin administrators 44111872 2019-10-05 03:01 com.plexapp.plugins.library.db-2019-10-05
-rw-r--r-- 1 admin administrators 44324864 2019-10-08 03:01 com.plexapp.plugins.library.db-2019-10-08
-rw-r--r-- 1 admin administrators 43827200 2019-10-11 03:04 com.plexapp.plugins.library.db-2019-10-11

You mentioned you tried to uninstall PMS in your previous post. That could have removed them.

So congratulations you’ve given birth to a new server? :hatched_chick:
Trumpets.

Ah crud. So basically SOL… And that massive backup zip file is essentially useless then?

And here is the log files – forgot to upload at first.Plex Media Server Logs_2019-10-15_23-41-13.zip (312.7 KB)