# Containers cannot start: port is already allocated

**URL:** <https://forums.balena.io/t/containers-cannot-start-port-is-already-allocated/165545>\
**Category:** Product support\
**Tags:** docker\
**Created:** [July 29, 2020, 1:22pm UTC](https://forums.balena.io/t/containers-cannot-start-port-is-already-allocated/165545 "2020-07-29T13:22:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vbersier](https://avatars.discourse-cdn.com/v4/letter/v/e9a140/32.png) [@vbersier](https://forums.balena.io/u/vbersier)\
**Post date:** [July 29, 2020, 1:22pm UTC](https://forums.balena.io/t/containers-cannot-start-port-is-already-allocated/165545/1 "2020-07-29T13:22:40Z")

</div>

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:

```nohighlight
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](https://github.com/docker/compose/issues/3277) but none worked so far.

Any help would be appreciated!

---

<div class="post-metadata">

**Author:** ![zvin](https://avatars.discourse-cdn.com/v4/letter/z/a5b964/32.png) [@zvin](https://forums.balena.io/u/zvin)\
**Post date:** [July 29, 2020, 1:37pm UTC](https://forums.balena.io/t/containers-cannot-start-port-is-already-allocated/165545/4 "2020-07-29T13:37:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![vbersier](https://avatars.discourse-cdn.com/v4/letter/v/e9a140/32.png) [@vbersier](https://forums.balena.io/u/vbersier)\
**Post date:** [July 29, 2020, 1:43pm UTC](https://forums.balena.io/t/containers-cannot-start-port-is-already-allocated/165545/5 "2020-07-29T13:43:05Z")

</div>

> [@zvin](#):
>
> netstat -lauten

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!
