kelinger / OmniStream

Deployment and management tools for an entire streaming platform that can reside on a server (local, remote, hosted, VPS) with media files stored on cloud services like Google Drive or Dropbox.
MIT License
30 stars 8 forks source link

Plex container stopping (s6 errors) #76

Closed christeasdale closed 8 months ago

christeasdale commented 8 months ago

I am getting some version of these S6 error before Plex server is asked to close. Seems to happen randomly every few days.

FIRST:

[s6-finish] waiting for services.

Stopping Plex Media Server.

kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]

s6-svwait: fatal: timed out

[s6-finish] sending all processes the TERM signal.

[s6-finish] sending all processes the KILL signal and exiting.

SECOND:

[s6-finish] waiting for services.

s6-svwait: fatal: timed out

[s6-finish] sending all processes the TERM signal.

[s6-finish] sending all processes the KILL signal and exiting.

Seems maybe related to random restarts of OmniMount.

Anyone else? Thoughts

thanks

kelinger commented 8 months ago

This is a Plex error in their stop algorithm, not OmniStream. OmniMount will restart if the mounts fail and this could be for a number of reasons. The problem is that, when it restarts, any container mapped to it's shares ends up remapped to the empty directory on the host where the mounts are overlaid. I specifically wrote this process for Plex since it seems to like to remove entries from your library when shares disappear (and yes, this is even sometimes when you have Plex configured to NOT delete missing videos).

Since the failure can be tracked via Docker's healthchecks, this serves to raise a flag that OmniMount is restarting and any container dependent on it's mounts will subsequently restart once OmniMount is back up and the shares are verified.

Plex's kill switch triggers their own scripts and, at least one of them has had incorrect parameters for years. It doesn't cause any damage since all the "real" data is written outside of Plex's container.