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

Docker fails to parse ip route output #1214

Closed
nickstenning opened this issue Jul 16, 2013 · 3 comments · Fixed by #1374
Closed

Docker fails to parse ip route output #1214

nickstenning opened this issue Jul 16, 2013 · 3 comments · Fixed by #1374

Comments

@nickstenning
Copy link
Contributor

Docker is failing to parse the output of ip route on my machine when starting:

$ sudo docker -D -d
[debug] network.go:101 Routes:

default via X.X.X.1 dev eth0
10.0.3.0/24 dev lxcbr0  proto kernel  scope link  src 10.0.3.1
10.8.0.0/24 via 10.8.0.2 dev tun0
10.8.0.2 dev tun0  proto kernel  scope link  src 10.8.0.1
X.X.X.0/24 dev eth0  proto kernel  scope link  src X.X.X.X

[debug] network.go:130 172.16.42.1/24: Unexpected ip route output: invalid CIDR address: 10.8.0.2 (10.8.0.2 dev tun0  proto kernel  sco
pe link  src 10.8.0.1 )
[debug] network.go:101 Routes:

default via X.X.X.1 dev eth0
10.0.3.0/24 dev lxcbr0  proto kernel  scope link  src 10.0.3.1
10.8.0.0/24 via 10.8.0.2 dev tun0
10.8.0.2 dev tun0  proto kernel  scope link  src 10.8.0.1
X.X.X.0/24 dev eth0  proto kernel  scope link  src X.X.X.X

[debug] network.go:130 10.0.42.1/24: Unexpected ip route output: invalid CIDR address: 10.8.0.2 (10.8.0.2 dev tun0  proto kernel  scope
 link  src 10.8.0.1 )
[debug] network.go:101 Routes:

default via 178.79.178.1 dev eth0
10.0.3.0/24 dev lxcbr0  proto kernel  scope link  src 10.0.3.1
10.8.0.0/24 via 10.8.0.2 dev tun0
10.8.0.2 dev tun0  proto kernel  scope link  src 10.8.0.1
X.X.X.0/24 dev eth0  proto kernel  scope link  src X.X.X.X

[debug] network.go:130 192.168.42.1/24: Unexpected ip route output: invalid CIDR address: 10.8.0.2 (10.8.0.2 dev tun0  proto kernel  scope link  src 10.8.0.1 )
2013/07/16 15:20:51 Could not find a free IP address range for interface 'docker0'. Please configure its address manually and run 'docker -b docker0'

I've replaced some IP address octets above with X -- they appear correctly in the original output.

Full output of ip route below:

$ ip route
default via X.X.X.1 dev eth0
10.0.3.0/24 dev lxcbr0  proto kernel  scope link  src 10.0.3.1
10.8.0.0/24 via 10.8.0.2 dev tun0
10.8.0.2 dev tun0  proto kernel  scope link  src 10.8.0.1
X.X.X.0/24 dev eth0  proto kernel  scope link  src X.X.X.X

FWIW, the 10.8.0.0/24 block is managed by OpenVPN.

@nickstenning
Copy link
Contributor Author

It looks like Docker doesn't like the mask-less bare IP address on line 4 of the output of ip route. I might have a go at patching the appropriate bit of network.go when I get a chance.

@nickstenning
Copy link
Contributor Author

I think this has been fixed in docker 0.5.0. Closing.

@steeve
Copy link
Contributor

steeve commented Aug 1, 2013

It hasn't :(

steeve added a commit to steeve/docker that referenced this issue Aug 1, 2013
Sometimes `ip route` will show mask-less IPs, so net.ParseCIDR will fail. If it does we check if we can net.ParseIP, and fail only if we can't.
Fixes moby#1214
Fixes moby#362
crosbymichael pushed a commit that referenced this issue Aug 13, 2013
Sometimes `ip route` will show mask-less IPs, so net.ParseCIDR will fail. If it does we check if we can net.ParseIP, and fail only if we can't.
Fixes #1214
Fixes #362
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants