Docker cannot find a free IP address range error


(bubill) #1

Continuing the discussion from [How to Fix ]Cannot connect to the Docker daemon. Is ‘docker -d’ running on this host?:

Session 1:

root@AY1:/var/docker# service docker stop
stop: Unknown instance: 
root@AY140222173108710dc0Z:/var/docker# docker -d
2014/06/29 01:33:22 WARNING: You are running linux kernel version 3.2.0-64-generic, which might be unstable running docker. Please upgrade your kernel to 3.8.0.
2014/06/29 01:33:22 docker daemon: 1.0.1 990021a; execdriver: native; graphdriver: 
[ce3a4985] +job serveapi(unix:///var/run/docker.sock)
[ce3a4985] +job initserver()
[ce3a4985.initserver()] Creating server
2014/06/29 01:33:22 Listening for HTTP on unix (/var/run/docker.sock)
[ce3a4985] +job init_networkdriver()
[ce3a4985.init_networkdriver()] creating new bridge for docker0
Could not find a free IP address range for interface 'docker0'. Please configure its address manually and run 'docker -b docker0'
[ce3a4985] -job init_networkdriver() = ERR (1)
Could not find a free IP address range for interface 'docker0'. Please configure its address manually and run 'docker -b docker0'
[ce3a4985] -job initserver() = ERR (1)
2014/06/29 01:33:22 Could not find a free IP address range for interface 'docker0'. Please configure its address manually and run 'docker -b docker0'
root@AY140222173108710dc0Z:/var/docker# service docker start
docker start/running, process 18105
root@AY140222173108710dc0Z:/var/docker# service docker stop
stop: Unknown instance: 
root@AY140222173108710dc0Z:/var/docker# docker -d
2014/06/29 01:34:04 WARNING: You are running linux kernel version 3.2.0-64-generic, which might be unstable running docker. Please upgrade your kernel to 3.8.0.
2014/06/29 01:34:04 docker daemon: 1.0.1 990021a; execdriver: native; graphdriver: 
[585cf499] +job serveapi(unix:///var/run/docker.sock)
[585cf499] +job initserver()
[585cf499.initserver()] Creating server
2014/06/29 01:34:04 Listening for HTTP on unix (/var/run/docker.sock)
[585cf499] +job init_networkdriver()
[585cf499.init_networkdriver()] creating new bridge for docker0
Could not find a free IP address range for interface 'docker0'. Please configure its address manually and run 'docker -b docker0'
[585cf499] -job init_networkdriver() = ERR (1)
Could not find a free IP address range for interface 'docker0'. Please configure its address manually and run 'docker -b docker0'
[585cf499] -job initserver() = ERR (1)
2014/06/29 01:34:04 Could not find a free IP address range for interface 'docker0'. Please configure its address manually and run 'docker -b docker0'
root@AY1:/var/docker# 

Session 2:

root@AY1:/var/docker# ./launcher bootstrap app
2014/06/29 01:35:42 Cannot connect to the Docker daemon. Is 'docker -d' running on this host?
Cannot connect to the docker daemon - verify it is running and you have access
root@AY1:/var/docker# 

(Ben T) #2

This is an unusual part. It seems that your provider does not allow internal IP addresses; or docker can not find an address space to use. You will have to ask your vps provider for more information; or attempt to manually set an address as the error says.


(Jeff Atwood) #3

Your cloud provider is not compatible with Docker. I suggest mailing their support about it, or switch to Digital Ocean, or another provider that supports Docker and offers a modern Linux install.


(James Milligan) #4

@bubill by any chance are you using a VPS with OpenVZ?


(Michael Brown) #5

Is the usual address range used by Docker (172.17 I think) already allocated on the host?

What networks are attached?


(bubill) #6

Yes. aliyun.com cloud provider can’t support Docker. Thanks


(bubill) #7

Discourse needs OpenVZ?


(James Milligan) #8

Nope, but I had problems getting it running inside OpenVZ, and had a very similar message to what you had.