Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't connect #7

Open
makamekm opened this issue Aug 6, 2018 · 3 comments
Open

Can't connect #7

makamekm opened this issue Aug 6, 2018 · 3 comments

Comments

@makamekm
Copy link

makamekm commented Aug 6, 2018

$ docker-machine ls
NAME    ACTIVE   DRIVER   STATE     URL                    SWARM   DOCKER    ERRORS
test0   -        qemu     Running   tcp://127.0.0.1:2376           Unknown   Unable to query docker version: Cannot connect to the docker engine endpoint
$ docker -H tcp://127.0.0.1:2376 ps
Cannot connect to the Docker daemon at tcp://127.0.0.1:2376. Is the docker daemon running?

But docker-machine ssh test0 works fine! Thanks! [I installed all with brew, but this package i had built]

@makamekm
Copy link
Author

makamekm commented Aug 6, 2018

It works after the second try

@makamekm
Copy link
Author

makamekm commented Aug 6, 2018

Fixed after docker-machine provision test0

@afbjorklund
Copy link
Contributor

Presumably something went wrong when starting docker after the first "start", but hard to tell without the logs. It seems unlikely that tcp://127.0.0.1:2376 is a valid response.*.. Glad that it worked out in the end!

  • Since that would conflict both with the host docker (if any) and the second machine created, this driver is running docker on a random port instead. For this to work smoothly, docker-machine needs a patch:

docker/machine#4034

NAME      ACTIVE   DRIVER   STATE     URL                     SWARM   DOCKER        ERRORS
default   -        qemu     Running   tcp://127.0.0.1:35280           v18.06.1-ce   

But it should still work with the default machine version, even though you will get a bogus printout like:

Setting Docker configuration on the remote daemon...

This machine has been allocated an IP address, but Docker Machine could not
reach it successfully.

SSH for the machine should still work, but connecting to exposed ports, such as
the Docker daemon port (usually <ip>:2376), may not work properly.

You may need to add the route manually, or use another related workaround.

This could be due to a VPN, proxy, or host file configuration issue.

You also might want to clear any VirtualBox host only interfaces you are not using.
Checking connection to Docker...
Docker is up and running!

(it didn't get a public IP and it isn't running on 2376, which unfortunately had been hard-coded)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants