Plex Media Server won't start after reboot

Server Version#: 1.19.5.3112
Player Version#:

History
My Plex server has been running for a few years now. I am running on Ubuntu 16.04. About a week ago I ran updates, which included the latest general release of Plex Media Server. My normal cleanup after running updates is to edit the plexmediaserver.service file to map the PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR to a new location, since using a override.conf didn’t seem to use my adjusted location. I noticed a warning at the top of plexmediaserver.service to not edit the file directly, and to instead use override.conf. I hadn’t noticed this before, so I thought I would try override.conf again. I looked at the file and it still had my customizations, so I left it as is and rebooted the server. Everything came up fine and I just assumed something had been fixed during a previous update and that is why override.conf was now working.

Tuesday night I noticed when playing from the Plex server the playback would stop for some reason. It was late so I didn’t look into it. Last night I noticed the same thing, so I figured I would reboot the server. I did notice there were a few security updates for Ubuntu so I ran updates again and rebooted. Since that time Plex Media Server will no longer start.

One additional item I found while troubleshooting this last night, a drive had dropped from my array. I reseated the drive and it rebuilt overnight. The array is now optimal again. I will watch the array and if it fails/drops again I will go ahead and replace the drive with a spare I have on hand. The media and /Library/Application Support are both located on this array, while everything else is on the primary boot drive.

Troubleshooting
I read a lot last night, but I didn’t try a lot other than rebuilding the array and going back to edit the plexmediaserver.service file since I thought maybe the override.conf didn’t work after reboot, but the server still won’t start. All of the file owner, group, and permissions look right to me, but I can certainly provide those as necessary. I am guessing it is something I am overlooking, so I am turning to the forum for help. Below are details of the errors I am seeing.

Output of systemctl status plexmediaserver

username@servername:~$ systemctl status plexmediaserver
● plexmediaserver.service - Plex Media Server
   Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/plexmediaserver.service.d
           └─override.conf
   Active: failed (Result: start-limit-hit) since Thu 2020-08-20 06:48:30 CDT; 19s ago
  Process: 5658 ExecStart=/bin/sh -c  export PLEX_MEDIA_SERVER_INFO_VENDOR="$(grep ^NAME= /etc/os-release | awk -F= "{print \$2}" | tr -d \" )";  export PLEX_MEDIA_SERVER_INFO_DEVICE="PC";  export PLEX_MEDIA_SERVER_INFO_MODEL="$(uname -m)";  export PLEX_MEDIA_SERVER_INFO_PLATFORM_VERSION="$(grep ^VERSION= /etc/os-release | awk -F= "{print \$2}" | tr -d \" )";  export LD_LIBRARY_PATH=/usr/lib/plexmediaserver/lib;  exec "/usr/
  Process: 5654 ExecStartPre=/bin/sh -c /usr/bin/test -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" || /bin/mkdir -p "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" (code=exited, status=0/SUCCESS)
 Main PID: 5658 (code=exited, status=255)

Aug 20 06:48:25 plexus systemd[1]: plexmediaserver.service: Unit entered failed state.
Aug 20 06:48:25 plexus systemd[1]: plexmediaserver.service: Failed with result 'exit-code'.
Aug 20 06:48:30 plexus systemd[1]: plexmediaserver.service: Service hold-off time over, scheduling restart.
Aug 20 06:48:30 plexus systemd[1]: Stopped Plex Media Server.
Aug 20 06:48:30 plexus systemd[1]: plexmediaserver.service: Start request repeated too quickly.
Aug 20 06:48:30 plexus systemd[1]: Failed to start Plex Media Server.
Aug 20 06:48:30 plexus systemd[1]: plexmediaserver.service: Unit entered failed state.
Aug 20 06:48:30 plexus systemd[1]: plexmediaserver.service: Failed with result 'start-limit-hit'.

For some reason I can’t seem to get all of the log to show for Process: 5658.

Output of journalctl -xe | grep -i plex

username@servername:~$ journalctl -xe | grep -i plex
Aug 20 06:48:14 servername systemd[1]: Stopped Plex Media Server.
-- Subject: Unit plexmediaserver.service has finished shutting down
-- Unit plexmediaserver.service has finished shutting down.
Aug 20 06:48:14 servername systemd[1]: Starting Plex Media Server...
-- Subject: Unit plexmediaserver.service has begun start-up
-- Unit plexmediaserver.service has begun starting up.
Aug 20 06:48:14 servername systemd[1]: Started Plex Media Server.
-- Subject: Unit plexmediaserver.service has finished start-up
-- Unit plexmediaserver.service has finished starting up.
Aug 20 06:48:14 servername sudo[5598]: pam_unix(sudo:session): session closed for user root
Aug 20 06:48:14 servername systemd[1]: plexmediaserver.service: Main process exited, code=exited, status=255/n/a
Aug 20 06:48:14 servername systemd[1]: plexmediaserver.service: Unit entered failed state.
Aug 20 06:48:14 servername systemd[1]: plexmediaserver.service: Failed with result 'exit-code'.
Aug 20 06:48:19 servername systemd[1]: plexmediaserver.service: Service hold-off time over, scheduling restart.
Aug 20 06:48:19 servername systemd[1]: Stopped Plex Media Server.
-- Subject: Unit plexmediaserver.service has finished shutting down
-- Unit plexmediaserver.service has finished shutting down.
Aug 20 06:48:19 servername systemd[1]: Starting Plex Media Server...
-- Subject: Unit plexmediaserver.service has begun start-up
-- Unit plexmediaserver.service has begun starting up.
Aug 20 06:48:19 servername systemd[1]: Started Plex Media Server.
-- Subject: Unit plexmediaserver.service has finished start-up
-- Unit plexmediaserver.service has finished starting up.
Aug 20 06:48:19 servername systemd[1]: plexmediaserver.service: Main process exited, code=exited, status=255/n/a
Aug 20 06:48:19 servername systemd[1]: plexmediaserver.service: Unit entered failed state.
Aug 20 06:48:19 servername systemd[1]: plexmediaserver.service: Failed with result 'exit-code'.
Aug 20 06:48:24 servername systemd[1]: plexmediaserver.service: Service hold-off time over, scheduling restart.
Aug 20 06:48:24 servername systemd[1]: Stopped Plex Media Server.
-- Subject: Unit plexmediaserver.service has finished shutting down
-- Unit plexmediaserver.service has finished shutting down.
Aug 20 06:48:24 servername systemd[1]: Starting Plex Media Server...
-- Subject: Unit plexmediaserver.service has begun start-up
-- Unit plexmediaserver.service has begun starting up.
Aug 20 06:48:24 servername systemd[1]: Started Plex Media Server.
-- Subject: Unit plexmediaserver.service has finished start-up
-- Unit plexmediaserver.service has finished starting up.
Aug 20 06:48:25 servername systemd[1]: plexmediaserver.service: Main process exited, code=exited, status=255/n/a
Aug 20 06:48:25 servername systemd[1]: plexmediaserver.service: Unit entered failed state.
Aug 20 06:48:25 servername systemd[1]: plexmediaserver.service: Failed with result 'exit-code'.
Aug 20 06:48:30 servername systemd[1]: plexmediaserver.service: Service hold-off time over, scheduling restart.
Aug 20 06:48:30 servername systemd[1]: Stopped Plex Media Server.
-- Subject: Unit plexmediaserver.service has finished shutting down
-- Unit plexmediaserver.service has finished shutting down.
Aug 20 06:48:30 servername systemd[1]: plexmediaserver.service: Start request repeated too quickly.
Aug 20 06:48:30 servername systemd[1]: Failed to start Plex Media Server.
-- Subject: Unit plexmediaserver.service has failed
-- Unit plexmediaserver.service has failed.
Aug 20 06:48:30 servername systemd[1]: plexmediaserver.service: Unit entered failed state.
Aug 20 06:48:30 servername systemd[1]: plexmediaserver.service: Failed with result 'start-limit-hit'.

File details just inside the array.

username@servername:~$ ls -l /canister/
total 4
drwxr-xr-x  5 nobody nogroup   62 Jan  3  2019 loading_zone
drwxrwsr-x  5 root   plex      70 Jan  3  2019 media
drwxr-xr-x  3 plex   plex      21 Jan 10  2018 plexmediaserver
drwxr-xr-x 10 plexpy nogroup 4096 Aug 11 23:11 plexpy

please make a tar.gz of the Logs directory and attach it.

Thanks @ChuckPa. I have attached the logs as requested.

Taking a quick look myself, I see database or disk is full, or database corruption. If that is referring to the same location as /Library/Application Support, I have 8.8TB free.

plexlogs.tar.gz (2.4 MB)

Where is PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR pointing to?
This is where PMS is looking.

${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db

May I see your config override file?

Does that space have enough room or is this the 8TB free space?

If you copied this while PMS was running then the corruption is easily explained.

The repair procedure is simple and involves:

  1. Delete the WAL and SHM files for the database
  2. Copy the most recent backup to be the current (renaming in the process)
  3. Verify owned by the runtime (plex:plex) user.

Absolutely, below is the override.conf file. When I updated a week ago, I ended up not changing the original file, but I may have opened it in vi, noticed the warning, and then closed it. Typically after an upgrade the PMS service was still down, but since this update came through apt-get maybe it had automatically restarted the service. I typically perform a reboot after running updates. Part of my troubleshooting last night was to edit the original file, to see if the override.conf wasn’t working, so I may need to change that back to the normal path. Yes, where this is pointed is where the 8TB of free space is.

username@servername:/$ cat /etc/systemd/system/plexmediaserver.service.d/override.conf
#
# Customize Plex's config
#
# Identify this as a service override
[Service]
#
#  Move the data directory
Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/canister/plexmediaserver/Library/Application Support"
#
# This is needed to change the default umask
UMask=0002    # this must be octal

Looks like I do have a few recent backups, which is good news.

username@servername:/$ ls -l /canister/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/
total 2398448
-rw-r--r-- 1 plex plex     69632 Feb 14  2018 com.plexapp.dlna.db
-rw-r--r-- 1 plex plex     32768 Feb 14  2018 com.plexapp.dlna.db-shm
-rw-r--r-- 1 plex plex    292552 Feb 14  2018 com.plexapp.dlna.db-wal
-rw-r--r-- 1 plex plex 310674432 Aug 19 20:20 com.plexapp.plugins.library.blobs.db
-rw-r--r-- 1 plex plex 308517888 Aug  9 02:01 com.plexapp.plugins.library.blobs.db-2020-08-09
-rw-r--r-- 1 plex plex 308517888 Aug 12 02:02 com.plexapp.plugins.library.blobs.db-2020-08-12
-rw-r--r-- 1 plex plex 308517888 Aug 15 02:02 com.plexapp.plugins.library.blobs.db-2020-08-15
-rw-r--r-- 1 plex plex 310674432 Aug 18 02:04 com.plexapp.plugins.library.blobs.db-2020-08-18
-rw-r--r-- 1 plex plex 182313984 Aug 19 20:20 com.plexapp.plugins.library.db
-rw-r--r-- 1 plex plex 181357568 Aug  9 02:01 com.plexapp.plugins.library.db-2020-08-09
-rw-r--r-- 1 plex plex 181522432 Aug 12 02:02 com.plexapp.plugins.library.db-2020-08-12
-rw-r--r-- 1 plex plex 181138432 Aug 15 02:02 com.plexapp.plugins.library.db-2020-08-15
-rw-r--r-- 1 plex plex 182313984 Aug 18 02:03 com.plexapp.plugins.library.db-2020-08-18
-rw-r--r-- 1 plex plex     32768 Aug 20 06:48 com.plexapp.plugins.library.db-shm
-rw-r--r-- 1 plex plex         0 Aug 19 20:22 com.plexapp.plugins.library.db-wal

@ChuckPa My override.conf is in the previous update. I did the database restore following the steps you provided. I am seeing a different database corruption error now, so I suspect I should try the backup from the 15th instead. Is that what you would advise and do you see any issues with my override.conf file?

username@servername:~$ cat /canister/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Logs/Plex\ Media\ Server.log
Aug 20, 2020 11:11:39.426 [0x7efe2d58c700] INFO - Plex Media Server v1.19.5.3112-b23ab3896 - Ubuntu PC x86_64 - build: linux-x86_64 debian - GMT -05:00
Aug 20, 2020 11:11:39.426 [0x7efe2d58c700] INFO - Linux version: 16.04.7 LTS (Xenial Xerus), language: en-US
Aug 20, 2020 11:11:39.426 [0x7efe2d58c700] INFO - Processor       Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
Aug 20, 2020 11:11:39.426 [0x7efe2d58c700] INFO - /usr/lib/plexmediaserver/Plex Media Server
Aug 20, 2020 11:11:39.427 [0x7efe36f92740] DEBUG - BPQ: [Idle] -> [Starting]
Aug 20, 2020 11:11:39.427 [0x7efe36f92740] DEBUG - FeatureManager: Using cached data for features list
Aug 20, 2020 11:11:39.429 [0x7efe36f92740] DEBUG - Opening 20 database sessions to library (com.plexapp.plugins.library), SQLite 3.26.0, threadsafe=1
Aug 20, 2020 11:11:39.432 [0x7efe36f92740] ERROR - SQLITE3:(nil), 11, database corruption at line 64757 of [bf8c1b2b7a]
Aug 20, 2020 11:11:39.432 [0x7efe36f92740] ERROR - SQLITE3:(nil), 11, database corruption at line 64798 of [bf8c1b2b7a]
Aug 20, 2020 11:11:39.432 [0x7efe36f92740] ERROR - SQLITE3:(nil), 11, statement aborts at 8: [] database disk image is malformed
Aug 20, 2020 11:11:39.432 [0x7efe36f92740] ERROR - SQLITE3:(nil), 11, database disk image is malformed in "PRAGMA cache_size=2000"
Aug 20, 2020 11:11:39.433 [0x7efe36f92740] ERROR - Database corruption: sqlite3_statement_backend::prepare: database disk image is malformed for SQL: PRAGMA cache_size=2000
username@servername:~$ ls -l /canister/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/
total 2398440
-rw-r--r-- 1 plex plex     69632 Feb 14  2018 com.plexapp.dlna.db
-rw-r--r-- 1 plex plex     32768 Feb 14  2018 com.plexapp.dlna.db-shm
-rw-r--r-- 1 plex plex    292552 Feb 14  2018 com.plexapp.dlna.db-wal
-rw-r--r-- 1 plex plex 310674432 Aug 19 20:20 com.plexapp.plugins.library.blobs.db
-rw-r--r-- 1 plex plex 308517888 Aug  9 02:01 com.plexapp.plugins.library.blobs.db-2020-08-09
-rw-r--r-- 1 plex plex 308517888 Aug 12 02:02 com.plexapp.plugins.library.blobs.db-2020-08-12
-rw-r--r-- 1 plex plex 308517888 Aug 15 02:02 com.plexapp.plugins.library.blobs.db-2020-08-15
-rw-r--r-- 1 plex plex 310674432 Aug 18 02:04 com.plexapp.plugins.library.blobs.db-2020-08-18
-rw-r--r-- 1 plex plex 182313984 Aug 20 11:09 com.plexapp.plugins.library.db
-rw-r--r-- 1 plex plex 181357568 Aug  9 02:01 com.plexapp.plugins.library.db-2020-08-09
-rw-r--r-- 1 plex plex 181522432 Aug 12 02:02 com.plexapp.plugins.library.db-2020-08-12
-rw-r--r-- 1 plex plex 181138432 Aug 15 02:02 com.plexapp.plugins.library.db-2020-08-15
-rw-r--r-- 1 plex plex 182313984 Aug 18 02:03 com.plexapp.plugins.library.db-2020-08-18
-rw-r--r-- 1 plex plex     32768 Aug 20 11:11 com.plexapp.plugins.library.db-shm
-rw-r--r-- 1 plex plex         0 Aug 20 11:11 com.plexapp.plugins.library.db-wal

Yes, Please continue backward in time, purging the DB’s wal & shm (if they still exist after normal shutdown) as you roll to older databases.

WAL & SHM cannot exist between instances because they are cache & transaction files. If they exist out of sync with the main DB, it will also appear to be corrupt.

@ChuckPa

I stepped back through each of the databases, purging the wal & shm files each time and rebooting. Below are the logs after each restore. While these all look the same, they are different from the restore from 8/18. Do these logs tell us anything different? What are my options at this point? If I just need to let the database recreate from scratch, is that simply deleting these same 3 files and rebooting and it will handle the rest, or is there something else I need to do?

I just thought of something. Should have I been deleting any of the blobs files too? Such as com.plexapp.plugins.library.blobs.db

Logs after restoring database from 8/15

username@servername:~$ cat /canister/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Logs/Plex\ Media\ Server.log
Aug 20, 2020 16:04:04.949 [0x7fd8a9cd4700] INFO - Plex Media Server v1.19.5.3112-b23ab3896 - Ubuntu PC x86_64 - build: linux-x86_64 debian - GMT -05:00
Aug 20, 2020 16:04:04.949 [0x7fd8a9cd4700] INFO - Linux version: 16.04.7 LTS (Xenial Xerus), language: en-US
Aug 20, 2020 16:04:04.949 [0x7fd8a9cd4700] INFO - Processor       Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
Aug 20, 2020 16:04:04.949 [0x7fd8a9cd4700] INFO - /usr/lib/plexmediaserver/Plex Media Server
Aug 20, 2020 16:04:04.950 [0x7fd8b36da740] DEBUG - BPQ: [Idle] -> [Starting]
Aug 20, 2020 16:04:04.950 [0x7fd8b36da740] DEBUG - FeatureManager: Using cached data for features list
Aug 20, 2020 16:04:04.951 [0x7fd8b36da740] DEBUG - Opening 20 database sessions to library (com.plexapp.plugins.library), SQLite 3.26.0, threadsafe=1
Aug 20, 2020 16:04:04.984 [0x7fd8b36da740] DEBUG - Running migrations. (EPG 0)
Aug 20, 2020 16:04:04.988 [0x7fd8b36da740] ERROR - SQLITE3:(nil), 11, database corruption at line 64757 of [bf8c1b2b7a]
Aug 20, 2020 16:04:04.988 [0x7fd8b36da740] ERROR - SQLITE3:(nil), 11, database corruption at line 64798 of [bf8c1b2b7a]
Aug 20, 2020 16:04:04.988 [0x7fd8b36da740] ERROR - SQLITE3:(nil), 11, statement aborts at 10: [select max(max(metadata_items.changed_at),max(metadata_items.resources_changed_at)) from metadata_items] database disk image is malformed
Aug 20, 2020 16:04:04.988 [0x7fd8b36da740] ERROR - Database corruption: sqlite3_statement_backend::loadOne: database disk image is malformed
Aug 20, 2020 16:04:04.988 [0x7fd8b36da740] ERROR - Error: Unable to set up server: sqlite3_statement_backend::loadOne: database disk image is malformed (N4soci10soci_errorE)

Logs after restoring database from 8/12

username@servername:~$ cat /canister/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Logs/Plex\ Media\ Server.log
Aug 20, 2020 16:25:37.524 [0x7f860dd77700] INFO - Plex Media Server v1.19.5.3112-b23ab3896 - Ubuntu PC x86_64 - build: linux-x86_64 debian - GMT -05:00
Aug 20, 2020 16:25:37.525 [0x7f860dd77700] INFO - Linux version: 16.04.7 LTS (Xenial Xerus), language: en-US
Aug 20, 2020 16:25:37.525 [0x7f860dd77700] INFO - Processor       Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
Aug 20, 2020 16:25:37.525 [0x7f860dd77700] INFO - /usr/lib/plexmediaserver/Plex Media Server
Aug 20, 2020 16:25:37.525 [0x7f861777d740] DEBUG - BPQ: [Idle] -> [Starting]
Aug 20, 2020 16:25:37.525 [0x7f861777d740] DEBUG - FeatureManager: Using cached data for features list
Aug 20, 2020 16:25:37.526 [0x7f861777d740] DEBUG - Opening 20 database sessions to library (com.plexapp.plugins.library), SQLite 3.26.0, threadsafe=1
Aug 20, 2020 16:25:37.559 [0x7f861777d740] DEBUG - Running migrations. (EPG 0)
Aug 20, 2020 16:25:37.564 [0x7f861777d740] ERROR - SQLITE3:(nil), 11, database corruption at line 64757 of [bf8c1b2b7a]
Aug 20, 2020 16:25:37.564 [0x7f861777d740] ERROR - SQLITE3:(nil), 11, database corruption at line 64798 of [bf8c1b2b7a]
Aug 20, 2020 16:25:37.564 [0x7f861777d740] ERROR - SQLITE3:(nil), 11, statement aborts at 10: [select max(max(metadata_items.changed_at),max(metadata_items.resources_changed_at)) from metadata_items] database disk image is malformed
Aug 20, 2020 16:25:37.565 [0x7f861777d740] ERROR - Database corruption: sqlite3_statement_backend::loadOne: database disk image is malformed
Aug 20, 2020 16:25:37.565 [0x7f861777d740] ERROR - Error: Unable to set up server: sqlite3_statement_backend::loadOne: database disk image is malformed (N4soci10soci_errorE)

Logs after restoring database from 8/9

username@servername:~$ cat /canister/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Logs/Plex\ Media\ Server.log
Aug 20, 2020 16:35:25.182 [0x7f98831e5700] INFO - Plex Media Server v1.19.5.3112-b23ab3896 - Ubuntu PC x86_64 - build: linux-x86_64 debian - GMT -05:00
Aug 20, 2020 16:35:25.182 [0x7f98831e5700] INFO - Linux version: 16.04.7 LTS (Xenial Xerus), language: en-US
Aug 20, 2020 16:35:25.182 [0x7f98831e5700] INFO - Processor       Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
Aug 20, 2020 16:35:25.182 [0x7f98831e5700] INFO - /usr/lib/plexmediaserver/Plex Media Server
Aug 20, 2020 16:35:25.183 [0x7f988cbeb740] DEBUG - BPQ: [Idle] -> [Starting]
Aug 20, 2020 16:35:25.183 [0x7f988cbeb740] DEBUG - FeatureManager: Using cached data for features list
Aug 20, 2020 16:35:25.184 [0x7f988cbeb740] DEBUG - Opening 20 database sessions to library (com.plexapp.plugins.library), SQLite 3.26.0, threadsafe=1
Aug 20, 2020 16:35:25.184 [0x7f988cbeb740] INFO - SQLITE3:(nil), 283, recovered 2 frames from WAL file /canister/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db-wal
Aug 20, 2020 16:35:25.217 [0x7f988cbeb740] DEBUG - Running migrations. (EPG 0)
Aug 20, 2020 16:35:25.224 [0x7f988cbeb740] ERROR - SQLITE3:(nil), 11, database corruption at line 64757 of [bf8c1b2b7a]
Aug 20, 2020 16:35:25.224 [0x7f988cbeb740] ERROR - SQLITE3:(nil), 11, database corruption at line 64798 of [bf8c1b2b7a]
Aug 20, 2020 16:35:25.224 [0x7f988cbeb740] ERROR - SQLITE3:(nil), 11, statement aborts at 10: [select max(max(metadata_items.changed_at),max(metadata_items.resources_changed_at)) from metadata_items] database disk image is malformed
Aug 20, 2020 16:35:25.224 [0x7f988cbeb740] ERROR - Database corruption: sqlite3_statement_backend::loadOne: database disk image is malformed
Aug 20, 2020 16:35:25.224 [0x7f988cbeb740] ERROR - Error: Unable to set up server: sqlite3_statement_backend::loadOne: database disk image is malformed (N4soci10soci_errorE)

In all three cases, they are reporting the metadata_items table is damaged.

It seems like it got in there, and was backed up several times, before PMS was upgraded and it needed to run a migration (schema update) which is forced-read of the entire DB.

unless you have other backups to try, i don’t think you have any choice but to purge the DB and start over .

If it had completed migrations, we might be able to do more.

Aug 20, 2020 16:25:37.559 [0x7f861777d740] DEBUG - Running migrations. (EPG 0)
Aug 20, 2020 16:25:37.564 [0x7f861777d740] ERROR - SQLITE3:(nil), 11, database corruption at line 64757 of [bf8c1b2b7a]
Aug 20, 2020 16:25:37.564 [0x7f861777d740] ERROR - SQLITE3:(nil), 11, database corruption at line 64798 of [bf8c1b2b7a]
Aug 20, 2020 16:25:37.564 [0x7f861777d740] ERROR - SQLITE3:(nil), 11, statement aborts at 10: [select max(max(metadata_items.changed_at),max(metadata_items.resources_changed_at)) from metadata_items] database disk image is malformed
Aug 20, 2020 16:25:37.565 [0x7f861777d740] ERROR - Database corruption: sqlite3_statement_backend::loadOne: database disk image is malformed

@ChuckPa

Understood. Those are all of the backups I am aware of, so I think I need to start it over. I just deleted the database file, and related wal & shm files, and rebooted. The server did come up and allowed me to connect. As expected, all of my settings are in place but there are no libraries. I am going to start slowly and let is scan/rebuild from each library before adding another.

I do see it looks to be utilizing the override.conf file properly now, so that is a good thing. Did that file look ok, or did you have any suggestions for it? My main concern was whether the UMask line was correct.

Thank you very much for your assistance. Even though it wasn’t able to be recovered I appreciate you helping me through it and guiding me to look in the right places.

Everything else looks good. It’s unfortunate that you are forced to start over.
If you have a big movie library, you’ll at least enjoy the faster scan & match time with 1.20.1. (I match at about 100 / minute on my slow DSL line)

Sounds good. I am not on the beta build, so I don’t have 1.20.1 yet, but that sounds great and I look forward to it. My movie library is just a few away from 2500, and it took just over 7 hours to complete the scan last night. I just started the TV library scan this morning, so we will see how long that takes. I do see in the logs and database wasn’t or couldn’t be backed up. I will look into that further and if necessary I may start a new thread.

Thanks again for everything.

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