homebridge / docker-homebridge

Homebridge Docker. HomeKit support for the impatient using Docker on x86_64, Raspberry Pi (armhf) and ARM64. Includes ffmpeg + libfdk-aac.
https://hub.docker.com/r/homebridge/homebridge/
GNU General Public License v3.0
2.57k stars 241 forks source link

Container won't start - getting stuck on boot installing homebridge via dpkg #456

Closed SteppingHat closed 2 years ago

SteppingHat commented 2 years ago

Describe The Bug

Upon pulling an updated version of the container, the container now gets stuck installing homebridge with dpkg.

Installing Homebridge...
Selecting previously unselected package homebridge.
(Reading database ... 35951 files and directories currently installed.)
Preparing to unpack /homebridge_1.0.24.deb ...
Running pre-install steps...
Unpacking may take several minutes on low powered devices.
Unpacking homebridge (1.0.24) ...

This will stay like this for over an hour (server is running a Ryzen 9, so I don't think we're a "low powered device" like a RPI)

I've tried going into the container and manually installing the package with dpkg but I've also gotten no luck as it too gets stuck (after killing the stuck process)

# ps -aux | grep "dpkg -i"
root          74  1.7  0.1  23472 21280 ?        D    17:09   0:07 dpkg -i /homebridge_1.0.24.deb
# kill 74
# dpkg -i /homebridge_1.0.24.deb
(Reading database ... 35951 files and directories currently installed.)
Preparing to unpack /homebridge_1.0.24.deb ...
Running pre-upgrade steps...
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
Unpacking may take several minutes on low powered devices.
Unpacking homebridge (1.0.24) over (1.0.24) ...

I've blasted away any mounted directories and started with a fresh container, but I still get the same issue, which leads me to believe that this may be an upstream problem.

Docker Config

version: '3'
services:
        cgate-server:
                image: steppinghat/cgate-server:2.11
                container_name: cgate-server
                restart: unless-stopped
                ports:
                        - 1234:8080
                        - 20023:20023
                        - 20024:20024
                        - 20025:20025
                        - 20026:20026
                        - 20123:20123
                volumes:
                        - /mnt/docker/cgate-server/config:/config
                        - /mnt/docker/cgate-server/tag:/tag
                        - /mnt/docker/cgate-server/logs:/logs
                environment:
                        - TZ=Australia/Sydney
                        - PGID=999
                        - PUID=0
        homebridge:
                image: oznu/homebridge
                container_name: homebridge
                network_mode: host
                restart: unless-stopped
                depends_on:
                        -  cgate-server
                volumes:
                        - /mnt/docker/homebridge/config:/homebridge
                environment:
                        - TZ=Australia/Sydney
                        - PGID=999
                        - PUID=0

Logs

$ docker logs -f homebridge
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service tzupdate: starting
s6-rc: info: service setup: starting

    Thank you for using the oznu/homebridge docker image!

  If you find this project useful please STAR it on GitHub:

         https://github.com/oznu/docker-homebridge

                Or donate to the project:

            https://github.com/sponsors/oznu
                  https://paypal.me/oznu

s6-rc: info: service credits: starting
s6-rc: info: service credits successfully started
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service tzupdate successfully started
s6-rc: info: service legacy-cont-init successfully started
dpkg-query: no packages found matching homebridge
Installing Homebridge...
Selecting previously unselected package homebridge.
(Reading database ... 35951 files and directories currently installed.)
Preparing to unpack /homebridge_1.0.24.deb ...
Running pre-install steps...
Unpacking may take several minutes on low powered devices.
Unpacking homebridge (1.0.24) ...
^C

$ docker stop homebridge && docker rm homebridge
homebridge

$ docker-compose up -d
cgate-server is up-to-date
Creating homebridge ... done

$ docker logs -f homebridge
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service tzupdate: starting
s6-rc: info: service setup: starting
s6-rc: info: service credits: starting

    Thank you for using the oznu/homebridge docker image!

  If you find this project useful please STAR it on GitHub:

         https://github.com/oznu/docker-homebridge

                Or donate to the project:

            https://github.com/sponsors/oznu
                  https://paypal.me/oznu

s6-rc: info: service credits successfully started
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service tzupdate successfully started
dpkg-query: no packages found matching homebridge
Installing Homebridge...
Selecting previously unselected package homebridge.
(Reading database ... 35951 files and directories currently installed.)
Preparing to unpack /homebridge_1.0.24.deb ...
Running pre-install steps...
Unpacking may take several minutes on low powered devices.
Unpacking homebridge (1.0.24) ...

Host Operating System

Ubuntu / Debian (or a variant)

Host Architecture

x86_64 / amd64

oznu commented 2 years ago

Please try latest / 2022-06-24- this release fixes a number of issues, it also removes the step you're getting stuck on.