Hi,
I have a problem with PMS on my Synology DS213J. The app does not start, keeps saying “Failed to run packege service”. The DMS and PMS are update.
It worked perfectly for years, but after a week on holiday it stopped.
I tried to reinstall the package, delete user and shared folder, restart the DSM, and also reset the Synology DSM to fabric default, but nothing worked.
I have read many guides, so I’ve checked permissions, Plex user’s owning of folder, and so on, but nothing I could figure out worked. Please, help!
Many thanks in advance, Davide
PS. Sorry for my english! 
1 Like
Database corrupt (damaged)
Jul 02, 2021 15:05:01.801 [0x435aed48] INFO - Plex Media Server v1.23.3.4707-ebb5fe9f3 - Synology DS213j armv7l - build: linux-armv7hf synology - GMT 02:00
Jul 02, 2021 15:05:01.802 [0x435aed48] INFO - Linux version: DSM 6.2.4.25556-0, language: en-US
Jul 02, 2021 15:05:01.802 [0x435aed48] INFO - Processor Arm
Jul 02, 2021 15:05:01.802 [0x435aed48] INFO - Compiler is - Clang 11.0.1 (https://plex.tv e0c29d5827bc4eaaa2ceb882cbeed224b0960173)
Jul 02, 2021 15:05:01.802 [0x435aed48] INFO - /var/packages/Plex Media Server/target/Plex Media Server
Jul 02, 2021 15:05:01.799 [0x400b7e30] DEBUG - BPQ: [Idle] -> [Starting]
Jul 02, 2021 15:05:01.805 [0x400b7e30] DEBUG - Opening 20 database sessions to library (com.plexapp.plugins.library), SQLite 3.35.5, threadsafe=1
Jul 02, 2021 15:05:01.806 [0x400b7e30] DEBUG - Installing Library Database from ["/volume2/@appstore/Plex Media Server/Resources/com.plexapp.plugins.library.db"] to ["/volume2/Plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db"]
Jul 02, 2021 15:05:01.806 [0x400b7e30] ERROR - Couldn't copy file "/volume2/@appstore/Plex Media Server/Resources/com.plexapp.plugins.library.db" to "/volume2/Plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db": Invalid argument
Jul 02, 2021 15:05:01.901 [0x400b7e30] DEBUG - Running migrations. (EPG 0)
Jul 02, 2021 15:05:01.901 [0x400b7e30] ERROR - SQLITE3:(nil), 1, no such table: schema_migrations in "select version from schema_migrations order by version"
Jul 02, 2021 15:05:01.902 [0x400b7e30] ERROR - Database corruption: sqlite3_statement_backend::prepare: no such table: schema_migrations for SQL: select version from schema_migrations order by version
Jul 02, 2021 15:05:01.903 [0x400b7e30] ERROR - Error: Unable to set up server: sqlite3_statement_backend::prepare: no such table: schema_migrations for SQL: select version from schema_migrations order by version (N4soci10soci_errorE)
If you have a backup copy of the database (Plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases)
Rename the files and use the backup.
Delete the WAL and SHM files when you do this.
Sorry but I do not have a backup of database.
Is the problem I have discussed in FAQ #17 in Synology FAQ? Can I follow those steps if I don’t have a backup?
I’ve tried to delete all files in /databases (in this post is written that this should create brand new database files), but that did not work.
David,
If you open , Plex / Library / Application Support / Plex Media Server / Plug-in Support / Databases
and do not see other files named
com.plexapp.plugins.library.db-xx-xx-xxx (these are backups)
then you must delete and start fresh.
Hi ChuckPa,
that’s what I’ve done. I’ve deleted all files in that folder and nothing changed: I keep getting same error (failed to run packege service).
I add LOG files after done that.
Logs (2).zip (4.0 KB)
I don’t need to restore backup or something, that’s not a problem; I just want the server to run again.
Maybe can I erase all about Plex from my NAS and starting fresh?
I already tried to delete app from GUI, delete shared folder and user, reboot etc. but did not work. Am I missing something?
Thanks for your help
Thanks for the reply, but I have done this procedure many times without success, except point #6.
I’ve tried now a couple of times after checking the checksum but nothing change.
I cannot even start Plex, when I try to launch it, DSM gives me “failed to run packege service” messange, and app doesn’t start.
Sorry, but I’m already sure.
Ok, if you think so, have a nice day too.
Next time, just say "I can’t or I DO NOT WANT to help you. 
Please, explain me why shouldn’t I have followed literally, and as best as I can, your instruction?
- Unistall
- Delete User
- Delete the folder
- Reboot
- Check the downloaded file
- Reinstall
That’s EXACTLY what I’ve done.
If you can’t help me, no prob.
Just don’t call me a liar!
@davidequadrio90_gmail.com
If I may be of help ?
- You deleted the Plex shared folder and the Plex user ?
- If this is the case,
- Please uninstall the Plex package
- Restart DSM so we start in a known-clean state
- Now install the DSM 6 package
a. It will recreate the Plex shared folder
b. It will recreate the Plex user
c. It will configure DSM
- After installation is complete, give it a minute or two (first-run setup)
- Open http://ip.addr.of.syno:32400/web
- It will walk you through first-run setup of a new server
1 Like
Hi ChuckPA,
I have followed your instruction (I tried this thing about 20 times at now, I think) and did not work.
After deleting the old things (folder, user, unistalled packages) and reboot the NAS, the installation goes well. But the app doesn’t launch. When I try to run it, after 30 seconds, it tells me the same old message “failed to run package service”.
So, I cannot enter the web app to manage the server, the server isn’r running at all. Even in processes list of NAS I do not see anything about Plex.
Despite what trumphy81 believes, I have followed the instructions, and tried many times.
Here’s the logs of the last try.
Logs (4).zip (986 Bytes)
Thanks for your help
Hi trumphy,
no problem, I appreciate your apologize.
Thanks for continuing to help me!
Before restoring DSM a couple of days ago, to try to solve the problem, I had SMART test extended scheduled once a month, and fast test once a week. Never had problem.
I am running a SMART test extended on drive 2 right now, it will take a while cause is a 4 TB HDD.
I’ll let you know when it’s finished.
Thanks again!
SMART test has gone well, “Healthy” status.
Now?
Thanks!
Ok, I tried using PuTTY, which I used in the past. Is it ok?
Unfortunately, it did not work; still getting the same error.
Please tell me if is better to use another system to connect via SSH.
Here’s the Logs and the image of Putty. After taking the Putty screen, I have used the same command to delete Plex Media Server folder in /volume1/@appstore/ too because I tried to install the package in both volumes in last days

Logs.zip (987 Bytes)
Ok, finally seems to work! 
I’ve been able to launch the app, setting up libraries and play a movie from a client device. That’s awesome, thank you very much!!!
I add the Logs file, maybe can be useful to you.
What I have to do now? The server web app says that there is an update, but I didn’t do anything yet. Waiting for instruction!
Again, thanks a lot!
Logs.zip (361.6 KB)