Skip to content
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

Address already in use for IPv6 Local-Link #988

Closed
nerdalert opened this issue Mar 4, 2016 · 1 comment
Closed

Address already in use for IPv6 Local-Link #988

nerdalert opened this issue Mar 4, 2016 · 1 comment

Comments

@nerdalert
Copy link
Contributor

Issue Description
  • When assigning an IPv6 Link-Local address to a container it uncovered an issue. When specifying a Link-Local --ipv6=, the allocation from the default IPAM driver works fine the first time, but when you exit the endpoint the ipv6 release for the endpoint does not occur. When you go to start the same container config again it will throw an error with docker: Error response from daemon: Address already in use.
  • While assigning a Link-Local is questionable from a practical standpoint, I think it makes sense to either A) block it from creation or B) Don't perform v6 categorical type checks outside of is it 64-bit etc.
  • On the error returned it might be worth considering adding more information to address in use errors with the ability to set an IP addr --ip=x.x.x.x as of v1.10. In the err msg of Address already in use. specifying the address that is already in use could make it a bit easier to track down when it comes to dual stack v4/v6 and multi-subnet v4 and/or v6 e.g. Address %s already in use.
  • The error does not occur with the -d bridge driver since it uses a bit different of v6 support to support backwards compatable bridge use cases.
Build Details
Steps to reproduce - Create a Dual Stack v4/v6 Network (Also the same results with v6 only etc.)
  • Create a network using the `-d ipvlan' or '-d macvlan' drivers
docker network create -d macvlan  \
  --subnet=192.168.123.0/24 \
  --gateway=192.168.123.1 \
  --subnet=fe96::/64 \
  --gateway=fe96::1 \
  -o host_iface=eth0 macnet
  • Daemon debug logs
DEBU[0705] form data: {"CheckDuplicate":true,"Driver":"macvlan","IPAM":{"Config":[{"Gateway":"192.168.123.1","Subnet":"192.168.123.0/24"},{"Gateway":"fe96::1","Subnet":"fe96::/64"}],"Driver":"default","Options":{}},"Internal":false,"Name":"macnet","Options":{"host_iface":"eth0"}}
DEBU[0705] Allocating IPv4 pools for network macnet (fcc6b19e01ee0b2e1a24c1da76d8b2ee7c97ed83e01ec9903b2d48d6090d67ec)
DEBU[0705] RequestPool(LocalDefault, 192.168.123.0/24, , map[], false)
DEBU[0705] RequestAddress(LocalDefault/192.168.123.0/24, 192.168.123.1, map[RequestAddressType:com.docker.network.gateway])
DEBU[0705] Allocating IPv6 pools for network macnet (fcc6b19e01ee0b2e1a24c1da76d8b2ee7c97ed83e01ec9903b2d48d6090d67ec)
DEBU[0705] RequestPool(LocalDefault, fe96::/64, , map[], true)
DEBU[0705] RequestAddress(LocalDefault/fe96::/64, fe96::1, map[RequestAddressType:com.docker.network.gateway])
Start container # 1 and then exit
  • Specify an explicit --ip6 address:
docker run -it --net=macnet --ip6=fe96::10 --rm alpine /bin/sh
  • Daemon debug logs
DEBU[0803] RequestAddress(LocalDefault/192.168.123.0/24, <nil>, map[])
DEBU[0803] RequestAddress(LocalDefault/fe96::/64, fe96::10, map[])
DEBU[0803] Assigning addresses for endpoint clever_morse's interface on network macnet
DEBU[0803] Macvlan Endpoint Joined with IPv4_Addr: 192.168.123.2, Gateway: 192.168.123.1, MacVlan_Mode: bridge, Host_Iface: eth0
DEBU[0803] Macvlan Endpoint Joined with IPv6_Addr: fe96::10 Gateway: fe96::1 MacVlan_Mode: bridge, Host_Iface: eth0
  • Logs from exiting the container with v4 only release, v6 doesn't release:
DEBU[0827] ReleaseAddress(LocalDefault/192.168.123.0/24, 192.168.123.2)
Recreate container # 1
  • Container output:
docker run -it --net=macnet --ip6=fe96::10 --rm alpine /bin/sh
docker: Error response from daemon: Address already in use.
  • Daemon Debug logs:
DEBU[0888] Assigning addresses for endpoint boring_hypatia's interface on network macnet
DEBU[0888] RequestAddress(LocalDefault/192.168.123.0/24, <nil>, map[])
DEBU[0888] RequestAddress(LocalDefault/fe96::/64, fe96::10, map[])
WARN[0888] failed to cleanup ipc mounts:
...
(trunc)
...
ERRO[0888] Handler for POST /v1.22/containers/51e020f96de4ab2ee7b9a995577f0550a81fbda36eb659306a6d0c0f166e9b45/start returned error: Address already in use

@GordonTheTurtle
Copy link

@nerdalert It has been detected that this issue has not received any activity in over 6 months. Can you please let us know if it is still relevant:

  • For a bug: do you still experience the issue with the latest version?
  • For a feature request: was your request appropriately answered in a later version?

Thank you!
This issue will be automatically closed in 1 week unless it is commented on.
For more information please refer to #1926

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants