Closed jrelax closed 6 months ago
Nothing I can do about that.
Another user had the same problem and submitted an enhancement request to TrueNAS to allow turning healthcheck on/off temporarily .
If there's a solution, it will be there.
Sorry
Who is plex-snorlax
? did someone clone my script?
Who is
plex-snorlax
? did someone clone my script?
lol no. that's the name of my plex container on TrueNAS. Heavyscript is another script that helps you manage the containers and in this case I used it to get a shell on the plex-snorlax container
ok.. LOL
I've seen heavyscript in use. There is yet another person who I helped.
That dialog is likely in the Plex forums.
He also uses HeavyScript.
I do remember that to get a proper resolution here, TrueNAS needs to, and agreed to, provide a method of turning off HealthCheck because of how they actually check to see if PMS is running.
The Plex-supported method is whether the container is running (independent of PMS itself) because the container is set to exit when PMS does.
This whole thing is a mess. I'm trying to now write hard C/C++ code for this but a change in Plex SQLite will KILL it if invoked too soon after PMS is stopped (either a bug or they don't like me HAHAHAHAHA)
if you had an offline DB repair option where the user takes all responsibility that plex is not running that would work.
I have thought about that. Implementing automatic "Stand Alone" (outside the container) is difficult.
My only problem is ensuring the runtime library environment is sane.
If I implement -p
(programs) option and -d
(databases) option
DBRepair.sh -p /usr/lib/plexmediaserver -d "/some/crazydir/Plex Media Server/Plug-in Support/Databases"
I can do this but the only risk (unknown) is rpath.
I did speak to someone on the Engineering team. My current bug (being killed) sounds like a PMS bug and I'll take that up with the engineer in charge.
I agree it is not ideal but maybe a docker image with the sane runtime env plus some flags like —force —database “db” pops up a warning. You continue and it skips all checks for pms running
That's a lot of responsibility. I'm NOT a docker person.
I will look at it but healthchecks will still be problematic because, AFAICT, there's no "process" to ping other than a shell script (which doesn't respond to a socket).
See here.. It's a PITA.
https://docs.docker.com/build/building/base-images/
You can be certain, whatever I do, the databases will be held sacred at all cost.
If you include a requirements.txt I am sure we can figure it out. If it had that option. I would stop the container. Copy the DB then run the repair against it. That way theres no chance plex is running
I just had a wild hair idea hit me.
Your words about fully manual mode knocked a couple cobwebs loose. I'm about 1/2 way through codifying manual config
example: (using Linux native installation paths)
DBRepair.sh --sqlite /usr/lib/plexmediaserver --databases "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Databases"
I will still support the -i
, -f
, and -p
options.
I will use --
for options which take arguments.
Thoughts ??
Thoughts? ( a little cleanup needed)
root@lizum:/home/chuck/git/chuck/PlexDBRepair# ./DBRepair.sh --sqlite /usr/lib/plexmediaserver --databases "/usb/plex/Plug-in Support/Databases" -p
==== Setting DBDIR = "/usb/plex/Plug-in Support/Databases"
Plex Media Server Database Repair Utility ()
Version v1.06.00
PlexSQLite = '/usr/lib/plexmediaserver/Plex SQLite'
Databases = '/usb/plex/Plug-in Support/Databases'
Select
1 - 'stop' - (Not available. Stop manually.)
2 - 'automatic' - Check, Repair/Optimize, and Reindex Database in one step.
3 - 'check' - Perform integrity check of database.
4 - 'vacuum' - Remove empty space from database without optimizing.
5 - 'repair' - Repair/Optimize databases.
6 - 'reindex' - Rebuild database database indexes.
7 - 'start' - (Not available. Start manually)
8 - 'import' - Import watch history from another database independent of Plex. (risky).
9 - 'replace' - Replace current databases with newest usable backup copy (interactive).
10 - 'show' - Show logfile.
11 - 'status' - Report status of PMS (run-state and databases).
12 - 'undo' - Undo last successful command.
21 - 'prune' - Prune (remove) old image files (jpeg,jpg,png) from PhotoTranscoder cache.
42 - 'ignore' - Ignore duplicate/constraint errors.
88 - 'update' - Check for updates.
99 - 'quit' - Quit immediately. Keep all temporary files.
'exit' - Exit with cleanup options.
Enter command # -or- command name (4 char min) :
Yes that is exactly what we could use in cases where we run plex on a platform your script doesn’t recognize or doesn’t support for whatever reason!
Come on over to the DBRepair Development thread on the Plex Forum
:sunglasses:
Hello just like This user, I can't use the tool because the TrueNAS plex chart health-check restarts the container. I tried to defeat it by modifying healthcheck.sh inside the container but that is not what it's using. It is using a kubernetes check
describing the pod shows the command it using to check