Docker Community Forums

Share and learn in the Docker community.

Multiple Containers trying to use the same ip from overlay network


(Geekgonecrazy) #1

I’ve got around 10 services trying to start up, that all seem to be trying to use the same ip address. The start up logs look like this:

Choosing best nodes...
Candidate node State: Deployed. Total num containers: 284. Num containers from this service: 0
Choosing node because of the deployment strategy
Scaling up...
rge-1: Deploying in
rge-1: Pulling image rocketchat/ in
rge-1: Creating in with docker name rge-1.665a3bdd
rge-1: Attaching container to overlay network dockercloud with ip
rge-1: Starting with docker id b13baacc738dee6959279f2238f0707aed79acbe392794254622b26448b2d34f in
ERROR: rge-1: Address already in use
ERROR: Service Scale action on 'rge' (using 'rocketchat/') has failed

No matter how many times I try to redeploy it insists on using this ip for all of the hosts.

I’ve worked around this once when I had just a single container insisting on using this ip address, by redeploying the container (surprisingly it got a new ip) then manually going and removing the endpoint from the network. But now i’ve got 10 of them trying to use this same ip.

What’s weirder is its the same exact ip as I solved for before. Plenty of ip’s left in the /10 it has to provide addresses from… but for some reason its stuck on handing out this ip and this ip alone.


(Levin Keller) #2

I have the same issue.

(Levin Keller) #3

The issue still persists!

(Geekgonecrazy) #4

Hopefully you managed to figure it out. :slight_smile: we ended up switching to another orchestration solution where we could control things a bit better.

(Paolo Memoli) #5

its definitely a bug, I know because you can bypass the issue by switching the network from ‘bridge’ to ‘host’ then back to ‘bridge’

Which orchestration are you now using geekgonecrazy? totally fed up of dealing with these bugs on docker cloud.

(Boro Vukovic) #6

@geekgonecrazy and @memolipd
What did you guys end up switching to?
I’ve literally had this issue for the last few weeks and trying to find a workaround that works one time but doesn’t the next is driving me crazy. lol

Thanks in advance!

(Paolo Memoli) #7

We use Rancher now.

Took a little bit of setup and getting used to but when running you can mostly just copy the stack files over. Good luck!

(Stephen Pope) #8

This trick worked for me (network flipping). At least on the second try. The issue is really annoying…we’re likely to switch to Rancher too, maybe once 2.0 comes out.

(Clumpost) #9

have you figured it out? i see some months have passed and still no answers. wanted to find out something useful now that i’m sitting home and not doing anything but searching for because of health issues that i need to deal with. in the meantime wanted ot search for answers. having the same issues so i would appreciate if someone could help me out. thanks!

(Stephen Pope) #10

Just keep switching between host and bridge and redeploying until it works. You should see the internal IP changingf each time if you go to the timeline and look at the “Service Redeploy” action. Eventually it picks one that actually works.

(Boro Vukovic) #11

Thanks for the reply! I’m testing out docker on a separate vps for now and trying to get used to it. Looks like a good alternative (and the agen supports ubuntu 16.04 too!)

(Boro Vukovic) #12

And @clumpost

i’ve been trying to network switch so many times but it still sometimes doesn’t want to start up when I switch back. I’ve settled on deploying containers on another vps server I have temporarily until it finally runs on the server I want it to. I have no idea why this is happening :frowning:

Rancher is an option if you’re looking for an alternative