Plexpass docker container fails to start with lzma error compressed data is corrupt

I’m using the docker container provided by the image plexinc/pms-docker:plexpass

Every week or so when booting up the container dies trying to download the plexmediaserver package. This then puts the container into an infinite failure loop instead of just exiting exceptionally.

I’m happy to make a pull request if the shells scripts and setup for this docker image are in a repo somewhere, but the docker image should exit exceptionally if dpkg fails.

(Reading database ... 7274 files and directories currently installed.)
Preparing to unpack /tmp/plexmediaserver.deb ...
PlexMediaServer install: Pre-installation Validation.
PlexMediaServer install: Custom environment detected.  Skipping preinstallation validation.
Unpacking plexmediaserver (1.41.6.9685-d301f511a) ...
dpkg-deb (subprocess): decompressing archive member: lzma error: compressed data is corrupt
dpkg-deb: error: <decompress> subprocess returned error exit status 2
dpkg: error processing archive /tmp/plexmediaserver.deb (--install):
 cannot copy extracted data for './usr/lib/plexmediaserver/Resources/Music.tflite' to '/usr/lib/plexmediaserver/Resources/Music.tflite.dpkg-new': unexpected end of file or stream
Errors were encountered while processing:
 /tmp/plexmediaserver.deb

This is the loop it gets into after the dpkg command fails.

dpkg: error processing archive /tmp/plexmediaserver.deb (--install):
 cannot copy extracted data for './usr/lib/plexmediaserver/Resources/Music.tflite' to '/usr/lib/plexmediaserver/Resources/Music.tflite.dpkg-new': unexpected end of file or stream
Errors were encountered while processing:
 /tmp/plexmediaserver.deb
[cont-init.d] 50-plex-update: exited 0.
[cont-init.d] done.
[services.d] starting services
Starting Plex Media Server.
[services.d] done.
s6-applyuidgid: fatal: unable to exec /usr/lib/plexmediaserver/Plex Media Server: No such file or directory
Stopping Plex Media Server.
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
Starting Plex Media Server.
s6-applyuidgid: fatal: unable to exec /usr/lib/plexmediaserver/Plex Media Server: No such file or directory
Stopping Plex Media Server.
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
Starting Plex Media Server.
s6-applyuidgid: fatal: unable to exec /usr/lib/plexmediaserver/Plex Media Server: No such file or directory
Stopping Plex Media Server.
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
Starting Plex Media Server.
s6-applyuidgid: fatal: unable to exec /usr/lib/plexmediaserver/Plex Media Server: No such file or directory
Stopping Plex Media Server.
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
Starting Plex Media Server.
s6-applyuidgid: fatal: unable to exec /usr/lib/plexmediaserver/Plex Media Server: No such file or directory
Stopping Plex Media Server.
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]

That’s a bad download or unzip (libbz) has a problem.

As a test, you can download the DEB file from PMS,

Put it where /config maps (so you can see it)
Jump into the container and use dpkg to install that.

I understand the cause of the error message is a bad file or a bad libbz installation. But this issue resolves itself after I restart the container. Since the only thing being downloaded to the container is the zip itself that implies the libbz installation is fine and the downloaded zip is the problem.

Since I’m not seeing massive amounts of file corruption all over my system I’m assuming this is an issue with the server that plex is hosting the dpkg package on cutting the filestream prematurely and not my NVME SDD corrupting stuff.

I can mount the directory it downloads into so that I can save the binary and upload it here if that’d be helpful, but this issue is contained entirely within the docker container running plex-pms. Are you wanting me to try to unzip it or dpkg install it so that you can get the error messages? It seems pretty clear that it’s failing at the unzip step.

I’m happy to make a pull request if the shells scripts and setup for this docker image are in a repo somewhere, but the docker image should exit exceptionally if dpkg fails.

I should have said “if ~any~ step in the setup fails”

I wrote this shell script to be used in a cron job to restart the docker container if it’s busted. The echo is to clear the logs (why doesn’t docker offer a native API for this) so that the shell script doesn’t fire in a loop forever since restarting the container does not clear the logs.

#!/bin/bash
if docker ps | grep -q 'error processing archive /tmp/plexmediaserver.deb'; then
        sudo bash -c 'echo "" > $(docker inspect --format='{{.LogPath}}' pms-docker)'
        docker restart pms-docker
fi

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