1

I am trying to enable the Docker Remote API on Windows by following the steps in this SO answer. After performing the last step which is to do a docker-machine restart, I get a message

Unable to verify the Docker daemon is listening: Maximum number of retries (10) exceeded

Also, if I do command docker-machine ls, I get the following error

Unable to query docker version: Get https://192.168.99.100:2376/v1.15/version: dial tcp 192.168.99.100:2376: connectex: No connection could be made because the target machine actively refused it.

Community
  • 1
  • 1
jmc
  • 1,649
  • 6
  • 26
  • 47
  • Are you able to ssh to docker-machine now? If yes, check if docker service is running in VM. – t6nand Nov 04 '16 at 12:35
  • Did you open all firewall ports for WinRM HTTPS (2376/tcp)? this is sometimes tricky as there are internal and public rules for beyond your subnet – Falco Alexander Nov 04 '16 at 13:52
  • @FalcoAlexander why you need to open docker port to the whole world? Ssh is used for communication with a docker right...?? – holms Jul 13 '17 at 14:29

2 Answers2

3

This issue maybe occurred due to the unexpected shutdown of vm.

Please remove the existing vm and create one.

docker-machine rm -f [name]
docker-machine create -d virtualbox [name]

If you using the default machine then the cmd will look like this

docker-machine rm -f default
docker-machine create -d virtualbox default
Midhun
  • 1,107
  • 10
  • 24
  • Isn't it removing also all the containers and their content? If so doesn't seem like a valid solution... – Dane411 Sep 13 '22 at 16:55
0

I had the same error message, not sure if the issue was the same. In my case seems the machine got corrupted by some unexpected shutdown, and it was failing to boot.

I solved it by shutting down the machine from VirtualBox and booting docker, which launched the VM and fixed the existing issues.

Dane411
  • 823
  • 1
  • 13
  • 27