Unable to update my Plex Media Server beyond version 1.21.0.3711

Server Version#:1.21.0.3711
Player Version#: latest version

I have been unable to update my server beyond version 1.21.0.3711 since December last year because, when I do, my devices starts having issues; like unable to search content, home screen goes blank, recommended content disappears, cannot create playlist and more. When I roll the server back to the version mentioned above, everything is fine again. I was happy to leave my media server on the version above, however, devices with the latest Plex app version (v7.24.1 on iPhone, 8.24.1.28493 on FireStick etc) can no longer access content; the Plex Media Server appears offline on the devices. Devices that have not been updated yet (i.e. version 7.23 on iPhone, Samsung Plex App etc) are perfectly fine.

I thought that it could very likely be a database issue; perhaps my database over time has become too old for the newer versions of Plex. So, I tried a database repair, but I was unable to repair the database. When I try to repair the database, everything goes okay except at the end where I get a 0kb size com.plexapp.plugins.library.db file.

I tried to update the server to the latest version (1.24.5.5173) in case Plex has fixed the issues I mentioned above. When I did, the server failed to start (see small extract of log below)… However, when I revert back to version 1.21.0.3711 all is normal again except for the issue with devices that have the latest version of the Plex app as mentioned above.

Hope all of the above makes sense and someone can help.

FYI - I have been using the Plex Media server since 2014. It was on a MacPro 2010 MacOS 10.13.6 until yesterday because the hardware can’t take anything above MacOS 10.13. The media server is now on a MacPro Late 2013 MacOS 10.14.6 with the intension of upgrading to Big Sur or Monterey once I have a working media server.

LOG EXTRACT
Oct 27, 2021 20:29:17.541 [0x700009a83000] INFO - Plex Media Server v1.24.5.5173-8dcc73a59 - Apple Mac x86_64 - build: darwin-x86_64 macos - GMT 01:00
Oct 27, 2021 20:29:17.542 [0x700009a83000] INFO - MacOSX version: 10.14.6, language: en-GB
Oct 27, 2021 20:29:17.542 [0x700009a83000] INFO - Processor Intel(R) Xeon(R) CPU E5-1650 v2 @ 3.50GHz
Oct 27, 2021 20:29:17.542 [0x700009a83000] INFO - Compiler is - Clang 11.0.1 (https://plex.tv e0c29d5827bc4eaaa2ceb882cbeed224b0960173)
Oct 27, 2021 20:29:17.542 [0x700009a83000] INFO - /Applications/Plex Media Server.app/Contents/MacOS/Plex Media Server
Oct 27, 2021 20:29:17.695 [0x700009c8f000] DEBUG - BPQ: [Idle] → [Starting]
Oct 27, 2021 20:29:17.698 [0x700009c8f000] DEBUG - FeatureManager: Using cached data for features list
Oct 27, 2021 20:29:17.707 [0x700009c8f000] DEBUG - Opening 20 database sessions to library (com.plexapp.plugins.library), SQLite 3.35.5, threadsafe=1
Oct 27, 2021 20:29:17.763 [0x700009c8f000] DEBUG - Running migrations. (EPG 0)
Oct 27, 2021 20:29:17.764 [0x700009c8f000] DEBUG - Running forward migration 20200110143300.
Oct 27, 2021 20:29:17.764 [0x700009c8f000] DEBUG - Captured session 0.
Oct 27, 2021 20:29:17.764 [0x700009c8f000] DEBUG - Captured session 1.
Truncated - same as above 2 - 18
Oct 27, 2021 20:29:17.764 [0x700009c8f000] DEBUG - Captured session 19.
Oct 27, 2021 20:29:17.789 [0x700009c8f000] ERROR - SQLITE3:(nil), 11, database corruption at line 66843 of [1b256d97b5]
Oct 27, 2021 20:29:17.789 [0x700009c8f000] ERROR - SQLITE3:(nil), 11, database corruption at line 66993 of [1b256d97b5]
Oct 27, 2021 20:29:17.789 [0x700009c8f000] ERROR - SQLITE3:(nil), 11, statement aborts at 19: [CREATE INDEX ‘index_statistics_bandwidth_on_at’ ON ‘statistics_bandwidth’ (‘at’)] database disk image is malformed
Oct 27, 2021 20:29:17.790 [0x700009c8f000] ERROR - Exception inside transaction (inside=1) (/data/jenkins/server/1792676801/Library/DatabaseMigrations.cpp:237): sqlite3_statement_backend::loadOne: database disk image is malformed
Oct 27, 2021 20:29:17.793 [0x700009c8f000] ERROR - Exception thrown during migrations, aborting: sqlite3_statement_backend::loadOne: database disk image is malformed
Oct 27, 2021 20:29:18.834 [0x700009c8f000] DEBUG - ChangestampAllocator: initialized to 58868430
Oct 27, 2021 20:29:18.834 [0x700009c8f000] ERROR - SQLITE3:(nil), 1, no such table: activities in “update activities set finished_at=started_at where finished_at is null”
Oct 27, 2021 20:29:18.835 [0x700009c8f000] ERROR - Database corruption: sqlite3_statement_backend::prepare: no such table: activities for SQL: update activities set finished_at=started_at where finished_at is null
Oct 27, 2021 20:29:18.835 [0x700009c8f000] ERROR - Error: Unable to set up server: sqlite3_statement_backend::prepare: no such table: activities for SQL: update activities set finished_at=started_at where finished_at is null (N4soci10soci_errorE)

Regards

I have the exact same issue on Fedora29. I am stuck at version 1.23.2.4656, any attempts to update beyond this point result in service start failure. I debugged the service in a shell session and got the exact same final error.

Nov 26, 2021 17:08:44.238 [0x7fb05db1fb38] INFO - Plex Media Server v1.24.5.5173-8dcc73a59 - Fedora PC x86_64 - build: linux-x86_64 redhat - GMT -05:00
Nov 26, 2021 17:08:44.238 [0x7fb05db1fb38] INFO - Linux version: 29 (Server Edition), language: en-US
Nov 26, 2021 17:08:44.238 [0x7fb05db1fb38] INFO - Processor Intel(R) Core™ i7-7700 CPU @ 3.60GHz
Nov 26, 2021 17:08:44.238 [0x7fb05db1fb38] INFO - Compiler is - Clang 11.0.1 (https://plex.tv e0c29d5827bc4eaaa2ceb882cbeed224b0960173)
Nov 26, 2021 17:08:44.238 [0x7fb05db1fb38] INFO - /usr/lib/plexmediaserver/Plex Media Server
Nov 26, 2021 17:08:44.267 [0x7fb06115c6e8] ERROR - SQLITE3:0x80000001, 11, database corruption at line 81887 of [1b256d97b5]
Nov 26, 2021 17:08:44.267 [0x7fb06115c6e8] ERROR - SQLITE3:0x80000001, 11, statement aborts at 11: [SELECT media_item_id, media_streams.extra_data FROM media_streams join media_items on media_items.id=media_streams.media_item_id where media_streams.extra_data like ‘%colorTrc%’ and me
Nov 26, 2021 17:08:44.267 [0x7fb06115c6e8] ERROR - Exception inside transaction (inside=1) (…/Library/DatabaseMigrations.cpp:237): sqlite3_statement_backend::loadRS: database disk image is malformed
Nov 26, 2021 17:08:44.268 [0x7fb06115c6e8] ERROR - Exception thrown during migrations, aborting: sqlite3_statement_backend::loadRS: database disk image is malformed
Nov 26, 2021 17:08:44.291 [0x7fb06115c6e8] ERROR - SQLITE3:0x80000001, 1, no such table: activities in “update activities set finished_at=started_at where finished_at is null”
Nov 26, 2021 17:08:44.291 [0x7fb06115c6e8] ERROR - Database corruption: sqlite3_statement_backend::prepare: no such table: activities for SQL: update activities set finished_at=started_at where finished_at is null

Dear plex engineers. What needs to be done for me to update plexmediaserver??? Do I need to update my OS to newer version? According to the docs, it supports Fedora27+ so I should be good. And I’m not going to take down my system for a day or more to update the OS if it won’t fix the issue. Is it an issue with

Obviously something has changed since I can simply downgrade back to 1.23.2.4656 and it starts without any issues, every single time.

I’d guess as there is database corruption errors in your logs that is why the upgrade is failing. It’s most likely the plex server is trying to apply database changes and then failing.

I’d suggest you try the repair procedure Repair a Corrupted Database | Plex Support and then once the errors are resolved then try the upgrade.

Also, while reverting to the previous version may appear to work it may not for long considering the corruption in your db.

On the OS question… F29 is ancient and would not be supported by fedora anymore so your open to security holes etc due to not getting patches.

@anon5074910
Hey, thank you for the help! I’ve faced a similar issue in an Ubuntu 18.04 container. I’ve seemed to gotten the database repaired by changing the last line of the dump.sql file from

ROLLBACK; -- due to errors

to

COMMIT;

then running

"/usr/lib/plexmediaserver/Plex SQLite" com.plexapp.plugins.library.db ".read dump.sql"

Depending on the user you’re running as, you may need to correct file ownership.

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