Addons not starting after docker upgrade due to network address binding errors

I’m running a supervised install on debian 10. As a pre-cursor to upgrading to debian 11, I decided to sort out my docker server installation. It worked OK but was still using dockerd from way back.

I stopped all the HA services and docker itself and then follwed the official guide to install docker on debian Install Docker Engine on Debian | Docker Documentation removing the old docker and installing docker-ce. I then used the script at https://github.com/home-assistant/supervised-installer to reinstall HA. After a reboot, HA started OK, but any addon reuiring network access failed to start.

Example is nginx_proxy

http+docker://localhost/v1.41/containers/c53cf2c6780580af03726a64e56cff79c965576ad1bd1cb186cd58600890f85e/start: Internal Server Error ("driver failed programming external connectivity on endpoint addon_core_nginx_proxy (41b8e30a39f50c9c01f0264bb741a69f843315edc4c8e70f749cba8d3fa45ee8): Error starting userland proxy: listen tcp [::]:443: bind: address already in use")

COMMENT: port 443 is not in use by any other process.
Similar messages appear for core-mosquitto, appdaemon etc. All are failing due to not being able to bind to the external address.
There’s nothing in the HA logs, supervisor log is empty and journal is not very informative unfortunately.

Oct 11 11:41:41 docker2 systemd[12002]: var-lib-docker-overlay2-8d42999d75b08746df5fe85b836b37158e1fe1e5c76bd8278f4a6d3b12a0f4af\x2dinit-merged.mount: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- The unit UNIT has successfully entered the 'dead' state.
Oct 11 11:41:41 docker2 systemd[12002]: var-lib-docker-overlay2-8d42999d75b08746df5fe85b836b37158e1fe1e5c76bd8278f4a6d3b12a0f4af-merged.mount: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- The unit UNIT has successfully entered the 'dead' state.
Oct 11 11:41:41 docker2 systemd[12002]: var-lib-docker-overlay2-8d42999d75b08746df5fe85b836b37158e1fe1e5c76bd8278f4a6d3b12a0f4af-merged.mount: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- The unit UNIT has successfully entered the 'dead' state.

This repeats every 30 secs.

Despite a lot of googling I had to give up and restore last night’s backup.
If I get a chance I may clone the server (it’s a SmartOS zone) and experiment more.

In the mean time I’ll just have to accept that I am running an unsupported configuration.

I have a very similar issue with nginx proxy after the latest update. Did you figured out what was the reason?

Thanks
L:

Unfortunately, not. Sorry.
The problem didn’t recur after I had restored the backup.

Supposing that “userland” corresponds to the host network(s), I suggest to use netstat -a -n -p to verify that port 443 is effectively not in use. You can use netstat -a -n -p | grep 443 to limit the output.
This commands shows what is listening on ports and also the ongoing connexions.
I know that the first post mentions that “port 443 is not in use by any other process”, but sometimes I am surprised myself of processes that use a port that is not supposed to be used. BTW, a port can be reserved even if no process is currently running (inetd) - it may only be started when there is an incoming request.