Homegear Update failed (docker)

Hallo,
ich habe heute meine Homegear-Installation aktualisiert. Bis dahin funktionierte noch alles ohne Probleme. Nachdem das DockerImage aktualisiert wurde, funktioniert leider Homegear nicht mehr.
Beim Start des Container werden zig Fehler angezeigt. Ein Downgrade auf die vorherige DockerImage-Version ist nicht möglich, da alle Container-Versionen auf DockerHub aktualisiert wurden.
Nach einiger Zeit ist dann auch das /var/lib/homegear Verzeichnis gelöscht… :frowning: (zum Glück gibt es Backups!)

Hat jemand einen Rat was ich tun kann?

Hier meine Docker-Compose-File:
homegear:
container_name: homegear
image: homegear/homegear:latest
restart: unless-stopped
cpu_percent: 25
mem_limit: 512M
privileged: false
ports:
- 2001:2001/tcp
- 2002:2002/tcp
- 2003:2003/tcp
environment:
- TZ=Europe/Berlin
volumes:
- /volume1/docker/homegear/lib:/var/lib/homegear
- /volume1/docker/homegear/etc:/etc/homegear:ro
networks:
- home
tmpfs:
- /tmp:rw,size=100m
- /var/log:rw,size=10m
- /var/run

Hier die Fehlermeldungen:
cp: target ‘/var/lib/homegear/node-blue/nodes/’ is not a directory
Could not copy nodes to “homegear.data/node-blue/nodes”. Please check the permissions on this directory and make sure it is writeable.
cp: cannot stat ‘/var/lib/homegear.data/node-blue/node-red’: No such file or directory
Could not copy nodes to “homegear.data/node-blue/node-red”. Please check the permissions on this directory and make sure it is writeable.
rm: cannot remove ‘/var/lib/homegear/’: Device or resource busy
chown: changing ownership of ‘/etc/homegear/devices/0/rf_4dis.xml’: Read-only file system
chown: changing ownership of ‘/etc/homegear/devices/0/rf_ao.xml’: Read-only file system
chown: changing ownership of ‘/etc/homegear/devices/0/rf_ash550.xml’: Read-only file system
chown: changing ownership of ‘/etc/homegear/devices/0/rf_bl.xml’: Read-only file system
chown: changing ownership of ‘/etc/homegear/devices/0/rf_bl_644.xml’: Read-only file system
chown: changing ownership of ‘/etc/homegear/devices/0/rf_bl_conf_644.xml’: Read-only file system
chown: changing ownership of ‘/etc/homegear/devices/0/rf_bl_conf_644_e_v2_0.xml’: Read-only file system
chown: changing ownership of ‘/etc/homegear/devices/0/rf_bl_conf_644_e_v2_1.xml’: Read-only file system
chown: changing ownership of ‘/etc/homegear/devices/0/rf_bl_le_v2_3.xml’: Read-only file system
chown: changing ownership of ‘/etc/homegear/devices/0/rf_cc_rt_dn.xml’: Read-only file system
chown: changing ownership of ‘/etc/homegear/devices/0/rf_cc_rt_dn_bom.xml’: Read-only file system
chown: changing ownership of ‘/etc/homegear/devices/0/rf_cc_tc.xml’: Read-only file system
chown: changing ownership of ‘/etc/homegear/devices/0/rf_cc_tc_le_v1_9.xml’: Read-only file system
chown: changing ownership of ‘/etc/homegear/devices/0/rf_cc_vd.xml’: Read-only file system
chown: changing ownership of ‘/etc/homegear/devices/0/rf_cf.xml’: Read-only file system
chown: changing ownership of ‘/etc/homegear/devices/0/rf_cfm.xml’: Read-only file system
chown: changing ownership of ‘/etc/homegear/devices/0/rf_cfm_tw.xml’: Read-only file system
chown: changing ownership of ‘/etc/homegear/devices/0/rf_cm.xml’: Read-only file system
chown: changing ownership of ‘/etc/homegear/devices/0/rf_d.xml’: Read-only file system
chown: changing ownership of ‘/etc/homegear/devices/0/rf_d_le_v1_7.xml’: Read-only file system
chown: changing ownership of ‘/etc/homegear/devices/0/rf_d_le_v1_9.xml’: Read-only file system
chown: changing ownership of ‘/etc/homegear/devices/0/rf_ddc.xml’: Read-only file system
chown: changing ownership of ‘/etc/homegear/devices/0/rf_dim_1l_644.xml’: Read-only file system
chown: changing ownership of ‘/etc/homegear/devices/0/rf_dim_1l_644_le_v2_4.xml’: Read-only file system
chown: changing ownership of ‘/etc/homegear/devices/0/rf_dim_1pwm_644.xml’: Read-only file system
chown: changing ownership of ‘/etc/homegear/devices/0/rf_dim_1pwm_644_le_v2_4.xml’: Read-only file system
chown: changing ownership of ‘/etc/homegear/devices/0/rf_dim_1t_644.xml’: Read-only file system
chown: changing ownership of ‘/etc/homegear/devices/0/rf_dim_1t_644_le_v2_4.xml’: Read-only file system
chown: changing ownership of ‘/etc/homegear/devices/0/rf_dim_1t_dr.xml’: Read-only file system
chown: changing ownership of ‘/etc/homegear/devices/0/rf_dim_1t_fm_lf.xml’: Read-only file system
chown: changing ownership of ‘/etc/homegear/devices/0/rf_dim_1tconf_644.xml’: Read-only file system
chown: changing ownership of ‘/etc/homegear/devices/0/rf_dim_1tconf_644_le_v2_4.xml’: Read-only file system
chown: changing ownership of ‘/etc/homegear/devices/0/rf_dim_2l_644.xml’: Read-only file system
chown: changing ownership of ‘/etc/homegear/devices/0/rf_dim_2l_644_le_v2_4.xml’: Read-only file system
chown: changing ownership of ‘/etc/homegear/devices/0/rf_dim_2pwm.xml’: Read-only file system
chown: changing ownership of ‘/etc/homegear/devices/0/rf_dim_2t_644.xml’: Read-only file system
[…]
chmod: changing permissions of ‘/etc/homegear/devices/7’: Read-only file system
chmod: changing permissions of ‘/etc/homegear/devices/8’: Read-only file system
chmod: changing permissions of ‘/etc/homegear/devices/9’: Read-only file system
chmod: changing permissions of ‘/etc/homegear/families’: Read-only file system
find: ‘/var/lib/homegear/scripts’: No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Could not get working directory.
Could not get working directory.
Could not get working directory.
Could not get working directory.
Could not get working directory.
cat: /var/run/homegear/homegear.pid: No such file or directory
cat: /var/run/homegear/homegear-management.pid: No such file or directory
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec … or kill -l [sigspec]
cat: /var/run/homegear/homegear-webssh.pid: No such file or directory
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec … or kill -l [sigspec]
cat: /var/run/homegear/homegear-influxdb.pid: No such file or directory
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec … or kill -l [sigspec]
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec … or kill -l [sigspec]
/start.sh: line 9: wait: `’: not a pid or valid job spec
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory

@sathya Da ist ein übler Fehler im start-Skript, Zeile 66 welche das /var/lib/homegear-Verzeichnis löscht!

Einfachste Lösung ist die Datei start.sh von Github zu holen, Zeile 66 (rm -rf /var/lib/homegear) auskommentieren und sie als Volume in den Container zu bringen (docker run ... -v $PWD/start.sh:/start.sh)

Vorher natürlich /var/lib/homegear aus Backup wiederherstellen.

1 Like

Thx - Jetzt läuft es wieder! :+1:

@sathya Es wäre auch sinnvoll, richtige Versionstags an die Images zu heften, dann könnte man in solchen Fällen wenigsten ein Rollback auf eine ältere Version des Image machen …

2 Likes

Ja, da stimme ich zu. Wir werden dieses Jahr sicherlich eine saubere Versionierung starten (müssen). Dann werden wir genau das machen.

1 Like

Gerade hierüber gestolpert. Für reproduzierbare Deployments ist es IMO wichtig, dass die Docker-Images eine saubere Versionierung haben.
@sathya du hast das vor längerem schon angekündigt. Wie ist da der aktuelle Stand?