-
Notifications
You must be signed in to change notification settings - Fork 18.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
False address already in use #47944
Comments
Hi @Tohjuler, could you please enable debug mode (see here: https://docs.docker.com/config/daemon/logs/#enable-debugging) and post all revelant logs you find? |
This is the debug info from one of the containers that can't start
Can it be because |
Could you post the I wonder if the case here is not that of a port but of colliding IP addresses in the bridge network? |
I used a portainer template. Here is the template, its from Pi-hosted {
"categories": [
"Other",
"Tools"
],
"description": "A Linux network-level advertisement and Internet tracker blocking application which acts as a DNS sinkhole. This version has Ubound software installed on it so you don't need to rely on external DNS providers. When the installation is complete, navigate to your.ip.goes.here:1010/admin. Follow the article <a href='https://medium.com/@niktrix/getting-rid-of-systemd-resolved-consuming-port-53-605f0234f32f'>here</a>",
"env": [
{
"default": "192.168.0.X",
"description": "Insert the Raspberry Pi IP here",
"label": "ServerIP",
"name": "ServerIP"
},
{
"default": "Europe\\London",
"label": "TZ",
"name": "TZ"
},
{
"label": "DNSSEC",
"name": "DNSSEC",
"select": [
{
"default": true,
"text": "Enable DNSSEC",
"value": "true"
},
{
"text": "Disable DNSSEC",
"value": "false"
}
]
},
{
"default": "127.0.0.1#5335",
"label": "DNS1",
"name": "DNS1",
"preset": true
},
{
"default": "127.0.0.1#5335",
"label": "DNS2",
"name": "DNS2",
"preset": true
}
],
"image": "cbcrowe/pihole-unbound:latest",
"logo": "https://raw.githubusercontent.com/pi-hosted/pi-hosted/master/images/pihole-unbound.png",
"name": "pihole-unbound",
"note": "<b>Template created by Pi-Hosted Series</b><br><b>Check our Github page: <a href=\"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/pi-hosted/pi-hosted\" target=\"_blank\">https://github.com/pi-hosted/pi-hosted</a></b><br><br><b>Official Webpage: </b><a href=\"https://pi-hole.net/\" target=\"_blank\">https://pi-hole.net/</a><br><b>Official Docker Documentation: </b><a href=\"https://github.com/chriscrowe/docker-pihole-unbound/tree/master/one-container\" target=\"_blank\">https://github.com/chriscrowe/docker-pihole-unbound/tree/master/one-container</a><br><h3><b>Pi-Hosted dedicated documentation: </b><a href=\"https://github.com/pi-hosted/pi-hosted/blob/master/docs/pi-hole.md\" target=\"_blank\">pi-hole.md</a></h3><br><br><br>When the installation is complete, navigate to your.ip.goes.here:1010/admin. Follow the article <a href='https://medium.com/@niktrix/getting-rid-of-systemd-resolved-consuming-port-53-605f0234f32f'>here</a> if you run into issues binding to port 53. For extra information on this container visit the mainteiner <a href='https://github.com/chriscrowe/docker-pihole-unbound/tree/master/one-container'>GitHub Page</a>. You can add ports: 5335 to access Ubound externally; 22 to enable SSH; 67 to use DHCP Server. Add those ports in Show advanced options. if you run into issues binding to port 53. If you like to use Pi-Hole's built in DHCP-Server change the Network type to host and open advance options and scroll to Labels and add: NET_ADMIN with the value True. When you do so, specify a port is no more needed, navigate to your.ip.goes.here/admin.",
"platform": "linux",
"ports": [
"53:53/tcp",
"53:53/udp",
"1010:80/tcp",
"4443:443/tcp"
],
"restart_policy": "unless-stopped",
"title": "Pi-Hole-Unbound",
"type": 1,
"volumes": [
{
"bind": "/portainer/Files/AppData/Config/PiHole-Unbound",
"container": "/etc/pihole"
},
{
"bind": "/portainer/Files/AppData/Config/PiHole-Unbound/DNS",
"container": "/etc/dnsmasq.d"
}
]
}, |
Ran into the same problem on a new machine, where only docker is installed.
And the command: docker run -d -p 9000:8000 -p 9000:9000 -p 9443:9443 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ee:2.20.3 The first machine is a arm64 this is a x86_64. |
@Tohjuler That seems different and looks like port 9000 is already allocated on your host?
(Looks like port 9000 might be used by portainer itself for http - maybe it's a portainer issue?) |
@legobeat No, i have checked, it's the same problem, the port is not in use, when i switch to network mode host it works. Maybe it is Tailscale as it changes some things around the internal network, tailscale is installed on both machines. |
@Tohjuler You're tring to bind internal port 9000 twice |
@w84miracle Ups, that explains that one, thanks. I have migrated server, and haven't seen the problem since (minus that one) |
Description
After a restart of my server, some containers can't start because of Address already in use, but they ran fine before the restart.
And sudo lsof -i -P -n | grep LISTEN says that the port is not in use.
The bug has been there since 26.0.0, but sometime it will be fixed by restarting the server.
I haven't seen this bug on any other server.
I am considering reinstalling the server, but wanted to share the bug first.
Reproduce
docker start
Expected behavior
No response
docker version
Client: Docker Engine - Community Version: 26.1.4 API version: 1.45 Go version: go1.21.11 Git commit: 5650f9b Built: Wed Jun 5 11:29:35 2024 OS/Arch: linux/arm64 Context: default Server: Docker Engine - Community Engine: Version: 26.1.4 API version: 1.45 (minimum version 1.24) Go version: go1.21.11 Git commit: de5c9cf Built: Wed Jun 5 11:29:35 2024 OS/Arch: linux/arm64 Experimental: true containerd: Version: 1.6.33 GitCommit: d2d58213f83a351ca8f528a95fbd145f5654e957 runc: Version: 1.1.12 GitCommit: v1.1.12-0-g51d5e94 docker-init: Version: 0.19.0 GitCommit: de40ad0
docker info
Additional Info
Here is the output from
docker inspect
on one of the effected containers:I was told to run
sudo ss -tlpn 'sport = :5432'
with one of the affected ports, but it did not list anything.The text was updated successfully, but these errors were encountered: