0

I encountered a deal problem:
I have fedora24 as host and installed centos7 minimal as guest on KVM.
installed docker in guest, there is one NIC by ens3 name with 192.168.122.120 address
I can ssh to guest from host before start docker service. in this step when i run route -n in guest,i would have Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.110.133.1 0.0.0.0 UG 100 0 0 ens3 192.168.122.0 0.0.0.0 255.255.255.0 U 100 0 0 ens3
now when i run service docker start in guest, i will lost ssh to guest by ssh: connect to host 192.168.122.120 port 22: No route to host and when i check rout table in guest machine, i faced Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.110.133.1 0.0.0.0 UG 100 0 0 ens3 172.17.0.0 0.0.0.0 255.255.255.0 U 0 0 0 ens3 192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 br-c2a15a4ad6d2 192.168.122.0 0.0.0.0 255.255.255.0 U 100 0 0 ens3
does know any one a logic reasonable?how can i solve it?

0

When you install docker it adds a bridge to connect to the outside world and an IP class 172.x.0.0. You can change that by following the document here https://docs.docker.com/v1.10/engine/userguide/networking/default_network/custom-docker0/ . If it disconnects you, look for the docker file /etc/default/docker or /etc/sysconfig/docker.

  • thanks alex,please first let me know is it a regular happen?, next, more interesting item that yesterday i hadn't this issue,I'm wondering if you provide me the reason. – Hossein Vatani Jul 19 '16 at 13:52
  • I have not seen this happen on any live server, but theoretically if the bridge settings conflict with your enviroment, or your enviroment has changed and it brings the docker networking in conflict with it, then it can happen. I do not have enough information on your environment to fully explain why. I hope this makes sense. – Alex H Jul 19 '16 at 13:55
  • Have a look over here github.com/docker/docker/issues, maybe someone else has already raised that issue. – Alex H Jul 19 '16 at 13:57
  • I asked,it seems a bug – Hossein Vatani Jul 20 '16 at 4:33
  • Did you solve the issue now? – Alex H Jul 20 '16 at 10:05
0

i opened a ticket in github and the answer is:

Pls remove the networks that are conflicting using docker network rm (or) stop the deamon, remove the /var/lib/docker/network directory and restart docker daemon.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.