Description
Hi,
I'm running ct-smart-home on a Pi 4 and I keep experiencing an issue where restarting the nodered container will fail.
docker-compose ps
would tell me that nodered is unhealthy
and nodered would not be accessible via the configured ports. docker-compose logs nodered
would reveal that the container is stuck at the following point:
dbus-daemon[10]: Failed to start message bus: The pid file "/run/dbus/dbus.pid" exists, if the message bus is not running, remove this file
.
Looking at entrypoint.sh
reveals that prior to starting dbus /var/run/dbus.pid
is indeed removed, but not /run/dbus/dbus.pid
. Not sure if some update moved dbus.pid
to the new location ...
I probably could edit entrypint.sh
and build a custom docker image but atm I don't have the time, so I'm going with this quick & dirty workaround, which I apply manually whenever needed:
# container needs to run for this
docker-compose up -d nodered
# remove unhandled dbus pid file
docker-compose exec nodered sh -c 'su-exec root rm -f /run/dbus/dbus.pid'
# restart
docker-compose restart nodered
I would expect that adding somethin like the following line to entrypoint.sh
would fix this issue, but I haven't verified it.
[[ -e /run/dbus/dbus.pid ]] && su-exec root rm -f /run/dbus/dbus.pid
Just wanted to share my observations at this point.
Cheers!
Edit:
Note that I added container_name: nodered
to my docker-compose.yml
, so you will need to adapt my docker-compose commands to your container name.