VMWare虚拟机搭建Docker swarm集群,挂起虚拟机遇到的问题
- 使用VMWare虚拟机搭建了三个Ubuntu20系统,其中各自跑了docker服务,为了测试swarm集群
- 在docker中跑了zookeeper实例,一共3个,在没有挂起虚拟机的时候是正常的,也可以远程连接zookeeper,但是如果挂起虚拟机,然后在重新运行虚拟机,就会出现zookeeper连不上其他实例的情况,然后截取了挂起前后的网卡配置情况,发现docker0和docker swarm默认创建的docker-gwbridge的ip地址没有了,各位大佬有没有什么解决方法呢?
- 挂起前
2: ens32: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 00:50:56:37:f4:94 brd ff:ff:ff:ff:ff:ff
inet 192.168.7.41/24 brd 192.168.7.255 scope global ens32
valid_lft forever preferred_lft forever
inet6 fe80::250:56ff:fe37:f494/64 scope link
valid_lft forever preferred_lft forever
3: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 02:42:25:50:ec:63 brd ff:ff:ff:ff:ff:ff
inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
valid_lft forever preferred_lft forever
4: docker_gwbridge: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
link/ether 02:42:b8:64:0c:ff brd ff:ff:ff:ff:ff:ff
inet 172.18.0.1/16 brd 172.18.255.255 scope global docker_gwbridge
valid_lft forever preferred_lft forever
inet6 fe80::42:b8ff:fe64:cff/64 scope link
valid_lft forever preferred_lft forever
- 挂起后:
2: ens32: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 00:50:56:37:f4:94 brd ff:ff:ff:ff:ff:ff
inet 192.168.7.41/24 brd 192.168.7.255 scope global ens32
valid_lft forever preferred_lft forever
inet6 fe80::250:56ff:fe37:f494/64 scope link
valid_lft forever preferred_lft forever
3: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 02:42:25:50:ec:63 brd ff:ff:ff:ff:ff:ff
4: docker_gwbridge: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
link/ether 02:42:b8:64:0c:ff brd ff:ff:ff:ff:ff:ff
inet6 fe80::42:b8ff:fe64:cff/64 scope link
valid_lft forever preferred_lft forever
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论