1. 问题描述
docker Get started part 4 can't visit myvm1 or myvm2.
curl: (7) Failed to connect to 192.168.99.* port 4000: Connection refused
docker 入门教程第四部分无法访问VM的地址
2. 解决方案
停止所有服务,从集群里脱离,重新创建的myvm1和myvm2
# stop getstartedlab
docker stack rm getstartedlab
# remove myvm1 and myvm2
$ docker-machine ssh myvm2 "docker swarm leave"
$ docker-machine ssh myvm1 "docker swarm leave --force"
# Unsetting docker-machine shell variable settings
$ eval $(docker-machine env -u)
# stop and remove myvm1, myvm2
$ docker-machine stop myvm1
$ docker-machine stop myvm2
$ docker-machine rm myvm1
$ docker-machine rm myvm2
# create myvm1, myvm2
$ docker-machine create --driver virtualbox --virtualbox-boot2docker-url=https://github.com/boot2docker/boot2docker/releases/download/v18.06.1-ce/boot2docker.iso myvm1
$ docker-machine create --driver virtualbox --virtualbox-boot2docker-url=https://github.com/boot2docker/boot2docker/releases/download/v18.06.1-ce/boot2docker.iso myvm2