flungo-docker / avahi

Docker image for the Avahi mDNS/DNS-SD daemon.
MIT License
66 stars 32 forks source link

Avahi PID file not removed on unclean shutdown of container/Daemon already running on PID 1 #7

Closed nonlinearsugar closed 1 year ago

nonlinearsugar commented 1 year ago

Hi there. Thanks for making this.

If the container shuts down uncleanly, a PID file is left in /var/run/avahi-daemon/pid

This file prevents avahi from starting, and the container restarts indefinitely.

I've observed this happens when my server reboots (which I've raised the shutdown timeout to 120s to help mitigation), and when I kill the container.

I tried both of these lines in my docker-compose file which didn't help. entrypoint: ["rm","-f","/var/run/avahi-daemon/pid"] command: rm -f /var/run/avahi-daemon/pid

Would you be able to alter the entrypoint/startup scripts in the container to remove an existing pid file?

gcormier commented 1 year ago

Just ran in to this myself was wondering why things weren't working.