Search code examples
dockerdocker-swarm

Use an overlay network for standalone containers is throwing context deadline exceeded


I have 2 servers where I tryed to create 1 container in each one and tryed to connect them via an overlay network, the servers specs are the folowing ones:

Server 1

  • Centos 7
  • docker 17.06.1-ce

Server 2

  • Centos 7
  • Docker 18.09.3

I followed the guide of this link (Use an overlay network for standalone containers), but when I executed the command docker run -dit --name alpine2 --network test-net alpine on server 2 it throws the error docker: Error response from daemon: attaching to network failed, make sure your network options are correct and check manager logs: context deadline exceeded., Can someone help me with this issue?


Solution

  • I needed to update the version of docker of server 1 from 17.06.1-ce to 18.09.3 and later follow the same guide, now everything works great.