Issues after moving HDDs from old QNAP to a new QNAP

Server Version#: 1.21.1
Player Version#: 2.2.0 (for LG TV)

Hello!
I searched and searched for 2 days in the forum and I couldn’t find anything similar or anyone facing the same problem.
I had a QNAP TS-453Be that I upgraded to an TS-453D because I found a very good offer. According to QNAP it should be transparent and moving the HDDs should be enough. The reality was not that simple. I needed QNAP support to access my NAS and fix many things. Even when playing from my TVs is working fine, the issues I am facing with PLEX right now are:

  • Download subtitles is not working anymore (I am using Sub-Zero plugin)
  • From my PC every time I access the system is asking for my PIN
  • After watching a movie the movie is not marked as played (also I cannot manually mark a movie as played)
  • New content is not detected when “scanning library”

If you need any additional information to help me don’t hesitate to let me know. I will be glad to provide more details.
Thanks in advance!

@TIPER2K

I’m sorry I didn’t see this until now.

The PIN is because the server is part of a Plex Home.
If you didn’t create it, did you accidentally join someone else’s ?
The other possibility is the server admin account and the PC account are not the same.

Manually marking a movie as played implied database issues.
This is where your logs will be very helpful.

To maximize the info in a single log file grab, would you please.

  1. Restart Plex
  2. Let it sit 2 minutes to stabilize
  3. try to manually mark the movie as played (the error will show in the logs)
  4. Download the Logs ZIP file and attach it here.
1 Like

Dear ChuckPa,
Here you have the infor you requested.
Thanks in advance for you help.

Plex Media Server Logs_2021-01-27_19-35-20.zip (5.4 MB)

And here you can see a screen recording of the actions …
Maybe helps to clarify what I’m trying to describe.
I also noticed that If I try to “DOWNLOAD DATABASE” inside ‘Manage/Troubleshooting’ the file generated is EMPTY
Thanks and kind regards,

Screen recording.zip (3.8 MB)

@TIPER2K

Thank you for the logs. I found it immediately (unfortunately).

We can recover but it will take some command line work.
Are you comfortable with that?

What I found is, because of the QNAP issues, your PMS database was corrupted.

Jan 27, 2021 19:31:45.518 [0x7f5857f19780] DEBUG - Captured session 18.
Jan 27, 2021 19:31:45.518 [0x7f5857f19780] DEBUG - Captured session 19.
Jan 27, 2021 19:31:45.519 [0x7f5857f19780] ERROR - SQLITE3:(nil), 11, database corruption at line 79051 of [bf8c1b2b7a]
Jan 27, 2021 19:31:45.519 [0x7f5857f19780] ERROR - SQLITE3:(nil), 11, statement aborts at 11: [SELECT idx, start_block, leaves_end_block, end_block, root FROM 'main'.'fts4_metadata_titles_segdir' WHERE level = ? ORDER BY idx ASC] database disk image is malformed
Jan 27, 2021 19:31:45.519 [0x7f5857f19780] ERROR - SQLITE3:(nil), 11, statement aborts at 171: [UPDATE metadata_items set rating_count=? where library_section_id=? and metadata_type=? and rating_count is null] database disk image is malformed
Jan 27, 2021 19:31:45.520 [0x7f5857f19780] ERROR - Exception inside transaction (inside=1) (../Library/DatabaseMigrations.cpp:209): sqlite3_statement_backend::loadOne: database disk image is malformed
Jan 27, 2021 19:31:45.522 [0x7f5857f19780] ERROR - Exception thrown during migrations, aborting: sqlite3_statement_backend::loadOne: database disk image is malformed
Jan 27, 2021 19:31:45.577 [0x7f5857f19780] DEBUG - ChangestampAllocator: initialized to 621268

We can swap the damaged one out and put a backup in its place (usually the best way to do this).

How would you like to proceed.

1 Like

I think I can find my way through command line work. Is there any lternative?
In any case. From where you want me to exectute the commands? Telnet/SSH, Virtual Machine running linux, or any other option?

If there is a way to send you a private message I can send you an invitation to share my screen (zoom, Teams, Skype, etc).
THANKS!

This is very simple on QNAP.

  1. Stop Plex
  2. SSH into it.
  3. cd /share/*/.qpkg/Ple*/Li*/Ple*/Plug*/Databases
  4. ls -la

Look at what you have. It should be similar to mine:

[/share/CACHEDEV3_DATA/.qpkg/PlexMediaServer/Library/Plex Media Server/Plug-in Support/Databases] # ls -la
total 2532612
drwxr-xr-x 2 admin administrators      4096 2021-01-27 14:09 ./
drwxr-xr-x 7 admin administrators      4096 2020-06-29 20:34 ../
-rw-r--r-- 1 admin administrators   9064448 2021-01-24 21:39 com.plexapp.plugins.library.blobs.db
-rw-r--r-- 1 admin administrators   9064448 2021-01-23 21:00 com.plexapp.plugins.library.blobs.db-2021-01-23
-rw-r--r-- 1 admin administrators   9064448 2021-01-26 23:10 com.plexapp.plugins.library.blobs.db-2021-01-26
-rw-r--r-- 1 admin administrators   9064448 2021-01-27 01:20 com.plexapp.plugins.library.blobs.db-2021-01-27
-rw-r--r-- 1 admin administrators     32768 2021-01-27 14:09 com.plexapp.plugins.library.blobs.db-shm
-rw-r--r-- 1 admin administrators         0 2021-01-27 14:09 com.plexapp.plugins.library.blobs.db-wal
-rw-r--r-- 1 admin administrators 668126208 2021-01-27 14:25 com.plexapp.plugins.library.db
-rw-r--r-- 1 admin administrators 444743680 2021-01-23 21:00 com.plexapp.plugins.library.db-2021-01-23
-rw-r--r-- 1 admin administrators 456187904 2021-01-26 23:10 com.plexapp.plugins.library.db-2021-01-26
-rw-r--r-- 1 admin administrators 459194368 2021-01-27 01:20 com.plexapp.plugins.library.db-2021-01-27
-rw-r--r-- 1 admin administrators     32768 2021-01-27 14:25 com.plexapp.plugins.library.db-shm
-rw-r--r-- 1 admin administrators 528784152 2021-01-27 14:25 com.plexapp.plugins.library.db-wal
[/share/CACHEDEV3_DATA/.qpkg/PlexMediaServer/Library/Plex Media Server/Plug-in Support/Databases] #plex-media-server
  1. remove com.plexapp.plugins.library.db-shm if it exists (it should not)
  2. remove com.plexapp.plugins.library.db-wal if it exists (it also should not)
  3. Move the defective one out of the way for now.

mv com.plexapp.plugins.library.db broken.db

  1. copy your most recent backup into position (using mine as an example)

cp com.plexapp.plugins.library.db-2021-01-27 com.plexapp.plugins.library.db

Make sense?

The full support page is here.
https://support.plex.tv/articles/201100678-repair-a-corrupt-database/

1 Like

Curious fact:
There is an App, that I had already installed, to make that directory visible from inside File Station (the File Manager in QNAP) making this process easier.
You can check it in https://github.com/ukdtom/PMSLibShare/releases

With that was quite easy to restore the old DataBase!!
It seems to be working now!
THANKS A MILLION!

PS: It keeps asking to select the user and input the PIN everytime but I can live with that!

Dane22’s PMSLibShare (or my PlexData share) are both 100% valid and 500x easier methods :slight_smile:

In your account settings (Settings - Account (upper left corner),
you must be in a PlexHome .

Check in there and remove it if you don’t want it.

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