When I create my docker machines, I assign them a specific MAC address and then use a DHCP reservation on my router to give them the same IP address every time. This works great… For a while.
Eventually, after a few shutdowns and restarts, this stops working and when I run
docker-machine ls, I’ll get a response like the one below and I can no longer connect to the machine.
main - hyperv Running tcp://10.95.153.101:2376 Unknown Unable to query docker version: Get https://10.95.153.101:2376/v1.15/version: dial tcp 10.95.153.101:2376: connectex: No connection could be made because the target machine actively refused it.
In this case, the docker machine should have IP address 10.95.153.123. 10.95.153.101 is the IP address of the host machine.
I’ve not found a way to repair this issue. I simply have to remove the machine and recreate it from scratch.
I’m using hyperv and I have an external virtual switch created.
My version info is:
Client: Version: 18.06.1-ce API version: 1.38 Go version: go1.10.3 Git commit: e68fc7a Built: Tue Aug 21 17:21:34 2018 OS/Arch: windows/amd64 Experimental: false Server: Engine: Version: 18.06.1-ce API version: 1.38 (minimum version 1.12) Go version: go1.10.3 Git commit: e68fc7a Built: Tue Aug 21 17:29:02 2018 OS/Arch: linux/amd64 Experimental: false
Thanks for any help anyone can offer on this.