Plex Media Scanner crash and errors after migrating from Docker to Ubuntu

Server Version#: Version 1.41.0.8992
Player Version#: N/A

Error Info

I’ve just migrated from Docker (in Ubuntu) to Ubuntu. I am trying to re-generate thumbnails (changed from 1s to 10s so deleted all thumbnails to shrink size) using command-line, I get the following error when running the Plex Media Scanner from the command line:

Sep 19, 2024 14:33:56.004 [139787408169728] INFO - Plex Media Scanner v1.41.0.8992-8463ad060 - unknown PC unknown - build: linux-x86_64 - GMT -04:00
Sep 19, 2024 14:33:56.004 [139787408169728] INFO - Linux version: 5.15.0-122-generic (#132~20.04.1-Ubuntu SMP Fri Aug 30 15:50:07 UTC 2024), language: en-US
Sep 19, 2024 14:33:56.004 [139787408169728] INFO - Processor: 2-core Intel(R) Celeron(R) CPU G3930T @ 2.70GHz
Sep 19, 2024 14:33:56.004 [139787408169728] INFO - ./Plex Media Scanner -l
Sep 19, 2024 14:33:55.994 [139787408649984] DEBUG - Opening 20 database sessions to library (com.plexapp.plugins.library), SQLite 3.39.4, threadsafe=1
Sep 19, 2024 14:33:56.265 [139787408649984] ERROR - SQLITE3:0x80000001, 1, no such column: library_sections.content_changed_at in "select library_sections.id as 'library_sections_id', library_sections.library_id as 'library_sections_library_id', library_sections.name as 'library_sections_name', library_sections.name_sort as 'library_sections_name_sort', library_sections.section_type as 'library_sections_section_type', library_sections.language as 'library_sections_language', library_sections.agent as 'library_sections_agent', library_sections.scanner as 'library_sections_scanner', library_sections.user_thumb_url as 'library_sections_user_thumb_url', library_sections.user_art_url as 'library_sections_user_art_url', library_sections.user_theme_music_url as 'library_sections_user_theme_music_url', library_sections.created_at as 'libr

Steps to reproduce:

export LD_LIBRARY_PATH=/usr/lib/plexmediaserver
"/usr/lib/plexmediaserver/Plex Media Scanner" --list

When entering the last command I get ****** PLEX MEDIA SCANNER CRASHED, CRASH REPORT WRITTEN: /path/to/report (crash report shown above).

Steps taken:

Thinking it was an issue with the DB, I ran all the PRAGMA_CHECK command whcih outputted “ok”. But I still ran all the other commands to try and fix any invisible errors. Didn’t change anything. Still getting the same error.

Tried searching the forums/google but everything just points to doing the db fixes but those didn’t do anything for me. Everything on Plex plays fine. Really there are no visual issues but this is the only error.

Let me know if I can provide any more info.

Also not exclusive to the command line (hence the title change).

When scanning my TV Shows library from the web GUI I see a whole lot of this from the logs:

Sep 19, 2024 16:42:16.019 [139797690981176] WARN - [Req#182cb] QueryParser: Invalid field 'pinnedContentDirectoryID' found, ignoring.
Sep 19, 2024 16:42:20.751 [139797776825144] WARN - [Req#182d1] QueryParser: Invalid field 'contentDirectoryID' found, ignoring.
Sep 19, 2024 16:42:20.751 [139797776825144] WARN - [Req#182d1] QueryParser: Invalid field 'pinnedContentDirectoryID' found, ignoring.
Sep 19, 2024 16:42:21.091 [139797690981176] WARN - [Req#1836c] QueryParser: Invalid field 'contentDirectoryID' found, ignoring.
Sep 19, 2024 16:42:21.091 [139797690981176] WARN - [Req#1836c] QueryParser: Invalid field 'pinnedContentDirectoryID' found, ignoring.
Sep 19, 2024 16:42:26.787 [139797788015416] WARN - [Req#1842d] QueryParser: Invalid field 'contentDirectoryID' found, ignoring.
Sep 19, 2024 16:42:26.787 [139797788015416] WARN - [Req#1842d] QueryParser: Invalid field 'pinnedContentDirectoryID' found, ignoring.
Sep 19, 2024 16:42:26.871 [139797698497336] WARN - [Req#1842f] QueryParser: Invalid field 'contentDirectoryID' found, ignoring.
Sep 19, 2024 16:42:26.871 [139797698497336] WARN - [Req#1842f] QueryParser: Invalid field 'pinnedContentDirectoryID' found, ignoring.

So it’s having a hard time scanning my Library in general.

@dezerving

  1. On desktop Linux, the default AppSupportDir must also be supplied

export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=“/var/lib/plexmediaserver/Library/Application Support”

  1. It is advisable to sudo to root then su to plex and run the command there.

  2. Ignore the “QueryParser” errors. This is ongoing Engineering work.

  3. In general, the console is not where you really should look for problems. The “Plex Media Server.log” (DEBUG logging) is where the real/detailed info is

Lastly, most importantly, the database schema error is of concern.
I can’t tell if the Forward Migrations were able to complete creation of the column successfully.
(This is why snippets aren’t usually helpful)