Is there a way to have a script to check if Plex is running?

  • Basically, I want something to run

    Code
    service plexmediaserver status

    and if it returns a value of plexmediaserver is not running, I want it to run

    Code
    service plexmediaserver start

    .


    Ideally I would like this to run ever 10 minutes or so.


    I can set up a scheduled job under the WebGUI, but it only runs hourly and it will only run

    Code
    service plexmediaserver start

    .

    • Offizieller Beitrag

    Why? The script would be easy to write but if plex is crashing, something like this is only avoiding the problem.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I've tried, but for the life of me I can't figure out why. I've recently rebuilt plex inside a docker container and so far that seems more stable than the plugin.


    Don't know if you have the plugin still installed and running, but if it's the case and Plex crashes check the crash log directory located at:

    Code
    /media/"uuid-of-disk-where-plex-is-installed"/plexmediaserver/Library/Application Support/Plex Media Server/Crash Reports


    If you have trouble finding the directory you could also use:

    Code
    locate Crash\ Reports


    Be advised that you should not restart Plex before getting the logs because those are typically removed when Plex is started.

  • Looks like the issue is database corruption. At least, my database keeps getting corrupted, even now that I've built it inside Docker and store the database in a different location than through the WebGUI.


    I can't figure out what the issue is except for maybe that I'm using a union filesystem (mergerfs) and that's cause an issue.

    • Offizieller Beitrag

    Did you update libfuse to 2.9.3? The packages are in the omv-extras backports repo (enabled after installing backports kernel).

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    I put the updated libraries in the omv-extras repo. So, if you installed all of the updates, you got them.


    But since you have 2.9.3, that eliminates my theory.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I think it had to do with disk space, for whatever reason. When I rebuilt plex inside a docker, I changed the minimum free space value on my mergerfs "drive" to 100GB instead of 50GB, which I think is fixing the database corruption error. At least, it's run without a hitch all weekend, and the plus side is that I've gotten much better at working with Docker and now have Deluge, Mylar, ComicStreamer, and HTPCManager all running with docker containers.

  • Database corrupted again last night.


    I rebuilt it, and when it was doing the initial update, it corrupted again... while scanning my music folder.


    Apparently the Music folder is what is causing all the grief (something with the database growing too large?). So I removed the music library, and by some strange chance, the database came back up as if nothing were wrong.


    At this point, I've not transitioned to Subsonic to serve the music and Plex will be movies/TV only.

    • Offizieller Beitrag

    My samba "database" never has problems :)

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!