"failed to allocate gateway (1…"

I Am using docker swarm
Client:
Version: 1.12.1
Server:
Version: 1.12.1
But facing issue “failed to allocate gateway (1…” when creating the replica 3 of service .

Regards,
Jatin Alve

Any update I Am still facing this issue after delete the local-kv db file in docker swarm mode

Hi Jatin, I hit the same error today. Can you confirm whether the overlay network you created used the --subnet option? I’m going to debug this more tomorrow. I had no issues until scaling the service up to 50 and then this error happened on 2 nodes. Tom

I too see similar problem and I dont use --subnet option.

Ran into this situation. I restarted docker on the newly joined node and things quiesced and the new node is now working as expected. Not sure if waiting wouldve magically fixed it or not. I just added another node, and it just worked as expected without delay or gateway messages. Added a third node and got the gateway failure again, intentionally did nothing about it and it sorted itself out.

I’m also on 1.12.1 at this time, planning to update.
Also, not using --subnet.

Hope this is helpful.

Does any one have a solution for this? I am having the same issue here and unfortunately for us “wait it out and let it sort itself out” is not an option. I am using --subnet option ex: 10.1.1.0/24 ~50 containers using the network.

I have also seen this happen with 2/2 (manger/worker) VMs. For some reason the second worker keeps giving “failed to allocate gateway (1…” when running services in swarm mode.