Dockercloud-agent error: …Error creating default \”bridge\” network:…

Problem

When trying to use the dockercloud-agent with docker you have the following error in the /var/log/dockercloud/agent.log

level=fatal msg="Error starting daemon: Error initializing network controller: Error creating default \"bridge\" network: cannot create network xxx... (docker0): conflicts with network yyy.... (docker0): networks have same bridge name" 

Solution

If you remove the file var/lib/docker/network/files/local-kv.db as suggested here, then if you look again at the log files, it should be a message that the docker daemon has been started:

016/11/17 10:30:28 Respawning docker daemon
2016/11/17 10:30:28 Starting docker daemon: [/usr/bin/docker daemon -H unix:///var/run/docker.sock -H tcp://0.0.0.0:2375 --userland-proxy=false --tlscert /etc/dockercloud/agent/cert.pem --tlskey /etc/dockercloud/agent/key.pem --tlscacert /etc/dockercloud/agent/ca.pem --tlsverify]
2016/11/17 10:30:28 Docker daemon (PID:4036) has been started