Machine: `docker-machine create --driver amazonec2 machine-name` fails to start docker daemon

Created on 17 Jul 2017  Â·  12Comments  Â·  Source: docker/machine

Docker version 17.06.0-ce, build 02c1d87
docker-machine version 0.12.0, build 45c69ad

I'm relatively new to docker, but this command worked fine for me prior to about a week ago. I assume it has something to do with a recent update? I see similar issues being reported with other drivers, but none yet for amazonec2.

docker-machine successfully creates a new ec2 instance and I can ssh to the machine, but the output of docker-machine ls indicates a certificate error.

Debug output (docker-machine -D create --driver amazonec2 machine-name) is insanely long so I've uploaded the output to https://gist.github.com/zazazack/7afe7f30a9f83c290d029468f3e82a26.

I believe the following open issues are related:

4197

4144

4189

➤ docker-machine ls
NAME         ACTIVE   DRIVER       STATE     URL                         SWARM   DOCKER        ERRORS
aws-docker   -        amazonec2    Running   tcp://54.90.147.183:2376            Unknown       Unable to query docker version: Cannot connect to the docker engine endpoint

I've added the ec2 instance user (ubuntu) to the docker group:

➤ sudo usermod -aG docker $(whoami)

I've attemtped to regenerate certs:

➤ docker-machine regenerate-certs aws-docker
Error getting SSH command to check if the daemon is up: ssh command error:
command : sudo docker version
err     : exit status 1
output  : Client:
 Version:      17.06.0-ce
 API version:  1.30
 Go version:   go1.8.3
 Git commit:   02c1d87
 Built:        Fri Jun 23 21:23:31 2017
 OS/Arch:      linux/amd64
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

docker-machine rm machine-name also produces an error and doesn't delete the aws ssh key-pair provisioned to the machine upon deletion (it used to):

➤ docker-machine rm aws-docker
About to remove aws-docker
WARNING: This action will delete both local reference and remote instance.
Are you sure? (y/n): y
Error removing host "aws-docker": unexpected EOF

Most helpful comment

@shin- I can confirm that these issues still occur in v0.12.2

All 12 comments

EC2 issues are fixed in 0.12.2. See the releases page to upgrade. It should be included in the toolbox release coming this week.

@shin- I can confirm that these issues still occur in v0.12.2

@brandontamm With the EC2 driver?

No sorry, with Digitalocean driver like in https://github.com/docker/machine/issues/4189 (but I'd assume with any driver..)

Unfortunately, while drivers do share a large amount of code, there are noticeable differences between them which can cause issues to appear with one but not another.

Since I actually tested EC2 + 0.12.2, I can confirm that that specific issue is fixed.

@shin- Confirming docker-machine create --driver amazonec2 machine-name works in docker-machine version 0.12.2, build 9371605 on macOS.

Note: for anyone using the Homebrew version of docker-machine, to use 0.12.2 I had to do

brew link --overwrite docker-machine

Still having the same issue with the Google driver, should I create a new issue?

+1 I wonder when they will update the docker-machine version from 0.12.0 to 0.12.1+ to solve this issue.

Yeah, this repo hasn't had a new commit in 3+ weeks, that's a long to be on the bleeding edge without any bugfixes. I hope the project isn't being deprecated in favor of something new.

@minac what are you talking about? We released 0.12.2 weeks ago.

Sorry I wasn't clear, the issue was on this repo. Docker for Mac is not
updated with this docker image, that's the problem. :(

--
Miguel

On 10 Aug 2017 6:22 p.m., "Joffrey F" notifications@github.com wrote:

@minac https://github.com/minac what are you talking about? We released
0.12.2 weeks ago.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/docker/machine/issues/4198#issuecomment-321617817,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEzKhsyGoOEnxQ5b_nTG4_kZ5WsphkFUks5sWzxIgaJpZM4OaGzE
.

Was this page helpful?
0 / 5 - 0 ratings