machine icon indicating copy to clipboard operation
machine copied to clipboard

Error with pre-create check: ...no such host

Open Mahmoudz opened this issue 10 years ago • 9 comments

When I run this command docker-machine create --driver virtualbox default I get this error:

Running pre-create checks...
(default) No default Boot2Docker ISO found locally, downloading the latest release...
Error with pre-create check: "Get https://api.github.com/repos/boot2docker/boot2docker/releases/latest: dial tcp: lookup api.github.com on 192.168.0.1:53: no such host"

Also when I double click the docker quickstart terminal, I get the following error:

bash --login '/Applications/Docker/Docker Quickstart Terminal.app/Contents/Resources/Scripts/start.sh'
Running pre-create checks...
(default) No default Boot2Docker ISO found locally, downloading the latest release...
(default) Latest release for github.com/boot2docker/boot2docker is v1.10.3
(default) Downloading /Users/mz/.docker/machine/cache/boot2docker.iso from https://github.com/boot2docker/boot2docker/releases/download/v1.10.3/boot2docker.iso...
Error with pre-create check: "Get https://github.com/boot2docker/boot2docker/releases/download/v1.10.3/boot2docker.iso: dial tcp: lookup github.com on 192.168.0.1:53: no such host"
Host does not exist: "default"
Regenerate TLS machine certs?  Warning: this is irreversible. (y/n): Regenerating TLS certificates
Host does not exist: "default"
Host does not exist: "default"


                        ##         .
                  ## ## ##        ==
               ## ## ## ## ##    ===
           /"""""""""""""""""\___/ ===
      ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ /  ===- ~~~
           \______ o           __/
             \    \         __/
              \____\_______/


Host does not exist: "default"
docker is configured to use the default machine with IP
For help getting started, check out the docs at https://docs.docker.com

I am on MAC OS X El Capitan v10.11.3 My Docker machine version is: 0.6.0, build e27fb87

Additional Info:

When I try to ping any server I get this:

❯ ping google.com
PING google.com (216.58.211.78): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
^C
--- google.com ping statistics ---
5 packets transmitted, 0 packets received, 100.0% packet loss

But all the other tools (cURL, NPM, Bower, Composer,...) works just fine.

Mahmoudz avatar Mar 19 '16 00:03 Mahmoudz

Here's a workaround that solves this *&^%$%#@!

Download the boot2docker.iso file manually by going to https://api.github.com/repos/boot2docker/boot2docker/releases/latest then clicking on the html_url and finally choosing to download the file.

Once you get the file go and place it manually in /Users/{user}/.docker/machine/cache/

Finally re-run this command docker-machine create --driver virtualbox default

Mahmoudz avatar Mar 30 '16 03:03 Mahmoudz

Maybe you have to set the proxy:

export PROXY="http://my.corp.proxy.ipadd:myport" export HTTP_PROXY=$PROXY export HTTPS_PROXY=$PROXY

ingimp avatar Mar 21 '17 13:03 ingimp

Because ping is for ICMP protocal, ICMP not base TCP/UDP。 CURL, NPM, Bower, Composer is base TCP/UDP, So ping can visit google!

Resolve method:

you can see @Mahmoudz answer is right!

download the boot2docker.iso and replace it ,

Download URL"

https://github-cloud.s3.amazonaws.com/releases/14930729/2a7d9b36-1aba-11e7-951b-a7c27f5bb4fd.iso?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20170408%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170408T003114Z&X-Amz-Expires=300&X-Amz-Signature=fdc5dbbbda03b3233c2efa5cf5cfbd218c454d1dcab2c578cf5f81fbf825b00f&X-Amz-SignedHeaders=host&actor_id=12511107&response-content-disposition=attachment%3B%20filename%3Dboot2docker.iso&response-content-type=application%2Foctet-stream

GeekHades avatar Apr 08 '17 00:04 GeekHades

It works!

mbXian avatar Apr 19 '17 06:04 mbXian

Here is the right link to download boot2docker.iso https://github.com/boot2docker/boot2docker/releases/download/v17.06.0-ce-rc5/boot2docker.iso

rajbettaswamy avatar Jun 21 '17 14:06 rajbettaswamy

The links provided by therajone and GeekHades are down . I managed to download the source version but what now? I tried converting the folder to an iso image but I get "Unable to get the local Boot2Docker ISO version: Did not find prefix "-v" in version string" and it tried to download it again which fails with "dial tcp [::1]:443: getsockopt: connection refused". Any ideas?

adolfoyanes avatar Dec 10 '17 15:12 adolfoyanes

try to change your DNS server address to 8.8.8.8 and 8.8.4.4 (google DNS)

jatnikonm avatar Apr 07 '18 08:04 jatnikonm

I faced that issue past two days but I fixed windows host file that file was contained wrong pointing

delgerbb avatar Nov 23 '18 08:11 delgerbb

Maybe you have to set the proxy:

export PROXY="http://my.corp.proxy.ipadd:myport" export HTTP_PROXY=$PROXY export HTTPS_PROXY=$PROXY

Thanks for the help, while I had http_proxy set in env, HTTP_PROXY not set. Apparently http_proxy without CAPS is not the same as HTTP_PROXY with CAPS, and the download for boot2docker only read CAPS... Similar things happen while setting build args when running docker builds, sometimes http_proxy, sometimes HTTP_PROXY, sometimes both works because the execution behind the command looks for either. Better to set both.

TXRock avatar May 13 '19 08:05 TXRock