Containers cannot start: port is already allocated

Hello,

I have a multi-container app running on 2 raspberry pi’s (first is a rpi4, the other is a rpi3b+). No problem on the rpi4, everything starts up as expected.

However, on the rpi3, some containers fail to start. They seem to be stuck in a loop where the logs report “Starting service…” over and over again.

By running journalctl -n 50 -f -a -u resin-supervisor I could identify that there are errors happening:

Jul 29 13:12:55 cae5e45 resin-supervisor[5609]: [error]   Scheduling another update attempt in 2000ms due to failure:  Error: Failed to apply state transition steps. (HTTP code 500) server error - driver failed programming external connectivity on endpoint smsl-daemon_2554057_1477104 (a6c54af75aa695f41e0c4c3372da092cfaa9a70ef8bc1b41df7c3924575df35c): Bind for 0.0.0.0:9090 failed: port is already allocated  Steps:["start","start","start","start"]
Jul 29 13:13:02 cae5e45 resin-supervisor[5609]: [error]   Scheduling another update attempt in 4000ms due to failure:  Error: Failed to apply state transition steps. (HTTP code 500) server error - driver failed programming external connectivity on endpoint smsl-screen_2554060_1477104 (37f3bb6ee222ccf84bb744ba2939c51c13589815fdabc917c34dbc77fcd8f642): Bind for 0.0.0.0:80 failed: port is already allocated  Steps:["start","start","start"]

Both of those ports (80 and 9090) are forwarded to/from my containers for communication with other containers.

I tried some of the solutions mentioned here but none worked so far.

Any help would be appreciated!

What is the output of netstat -lauten on the host OS ?

Damnit I rebooted the device and it spinned up all containers succesfully. I need to wait until it happens again to show you the result of this command during the error. Hopefully it never happens again!