Re-installed docker container: Error response from daemon: Address already in use.

Recommended Posts

My internet connection received a new IPv6 prefix. The container did not show the new prefix, so I restarted the docker service. After that the new IPv6 prefix was visible in the containers br0 ip settings, but then I was not able to start the container:

docker run -d --name='npm' --net='br0' --ip='' --ip6='2001:e1:a711:1911::8' -e TZ="Europe/Berlin" -e HOST_OS="Unraid" -e 'TCP_PORT_81'='81' -e 'TCP_PORT_80'='80' -e 'TCP_PORT_443'='443' -e 'DB_MYSQL_HOST'='' -e 'DB_MYSQL_PORT'='3306' -e 'DB_MYSQL_USER'='npm' -e 'DB_MYSQL_PASSWORD'='npm_100' -e 'DB_MYSQL_NAME'='npm' -v '/mnt/cache/appdata/npm/data':'/data':'rw' -v '/mnt/cache/appdata/npm/letsencrypt':'/etc/letsencrypt':'rw' --memory=1G --no-healthcheck 'jc21/nginx-proxy-manager'
docker: Error response from daemon: Address already in use.

The command failed.


My unraid server runs on so its not related the port, it must be related to the IP. I was able to verify that because starting the container with (and ::10 ipv6 interface id) was no problem.


How does Unraid / docker check if an IP is already in use? I tried netstat, but it looks normal to me:

netstat -tulnp | grep 443
netstat -tulnp | grep 80
tcp        0      0    *               LISTEN      7393/nginx: master  
tcp6       0      0 :::80                   :::*                    LISTEN      7393/nginx: master  
udp6       0      0 fe80::b62e:99ff:fea:123 :::*                                1905/ntpd           
udp6       0      0 fe80::b62e:99ff:fea:546 :::*                                1826/dhcpcd 


Finally I restarted the server, which solved the issue, but next time I really like to know how to analyze the problem.

2021-07-08 14_28_59.png

Link to comment

You can probably run

root@MediaStore:~# docker network inspect br1
        "Name": "br1",
        "Id": "dd6c416d2efd0344bfd6f0bb0c3336dbd9e9f0ca3063f5afd599e083fb334f79",
        "Created": "2021-05-20T08:02:01.315812887+08:00",
        "Scope": "local",
        "Driver": "macvlan",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": {},
            "Config": [
                    "Subnet": "",
                    "IPRange": "",
                    "Gateway": ""
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        "ConfigOnly": false,
        "Containers": {
            "ed5c7c0711940e2afa7475732a0af723a6c1e18ef176762e300c398cd3511bb4": {
                "Name": "EmbyServer",
                "EndpointID": "aab01aaffad69b23bfa9719083fd9b14a6ba2d9eb16f54ea9786ef469d083253",
                "MacAddress": "02:42:c0:a8:02:46",
                "IPv4Address": "",
                "IPv6Address": ""
        "Options": {
            "parent": "br1"
        "Labels": {}

And pay attention to the Containers object as its a dict of the various containers plugged into that docker network.

My sample is IPV4 only since I'm using the SLAAC method to distribute IPv6 addresses (which does not require any adjustments to the Unraid networking if the delegated prefix changes)

And as long as the container mac address doesn't change, the SLAAC IPv6 address won't either

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.