machine icon indicating copy to clipboard operation
machine copied to clipboard

Getting timeout trying to create totally new store / machine from b2d github releases

Open nathanleclaire opened this issue 11 years ago • 12 comments

Try this with master:

$ docker-machine --storage-path /tmp/store create -d virtualbox dev
Creating CA: /tmp/store/certs/ca.pem
Creating client certificate: /tmp/store/certs/cert.pem
Image cache does not exist, creating it at /tmp/store/cache...
No default boot2docker iso found locally, downloading the latest release...
Error creating machine: Get https://api.github.com/repos/boot2docker/boot2docker/releases: dial tcp: i/o timeout
You will want to check the provider to make sure the machine and associated resources were properly removed.

Haven't dug into it too much yet, can anyone dupe? cc @ehazlett @hairyhenderson

nathanleclaire avatar May 29 '15 22:05 nathanleclaire

tl;dr - I can't reproduce...

With HEAD:

$ machine --storage-path /tmp/store create -d virtualbox testvbox
Creating CA: /tmp/store/certs/ca.pem
Creating client certificate: /tmp/store/certs/cert.pem
Image cache does not exist, creating it at /tmp/store/cache...
No default boot2docker iso found locally, downloading the latest release...
Downloading https://github.com/boot2docker/boot2docker/releases/download/v1.6.2/boot2docker.iso to /tmp/store/cache/boot2docker.iso...
Creating VirtualBox VM...
Creating SSH key...
Starting VirtualBox VM...
Starting VM...
To see how to connect Docker to this machine, run: machine env testvbox
$ machine --storage-path /tmp/store ssh testvbox uptime
00:23:25 up 1 min,  1 user,  load average: 1.04, 0.66, 0.26
$ # all good...

hairyhenderson avatar May 30 '15 00:05 hairyhenderson

Mmm, yeah, I'm kind of suspicious that there's some funny business with the network at the office.

nathanleclaire avatar May 30 '15 01:05 nathanleclaire

Closing as this looks network related. Please re-open if you continue to have issues.

ehazlett avatar Jun 08 '15 13:06 ehazlett

Same problem:(

docker-machine --storage-path /tmp/store create -d virtualbox dev Creating CA: /tmp/store/certs/ca.pem Creating client certificate: /tmp/store/certs/cert.pem Image cache does not exist, creating it at /tmp/store/cache... No default boot2docker iso found locally, downloading the latest release... Error creating machine: Get https://api.github.com/repos/boot2docker/boot2docker/releases: dial tcp: i/o timeout You will want to check the provider to make sure the machine and associated resources were properly removed.

If it's network related, it should still have something to do with docker machine. Everything else is just normal.

chouclee avatar Jun 13 '15 00:06 chouclee

@chouclee that error is machine not being able to resolve github.com. Are you behind a firewall or anything?

ehazlett avatar Jun 16 '15 13:06 ehazlett

@ehazlett Yes... I think you are right. Now it's working.

chouclee avatar Jun 16 '15 19:06 chouclee

I had the same problem because of the nameservers in my /etc/resolv.conf; the DNS resolver will pick them in the same order as they are listed and won't try the next one in the list unless the previous one times out.

dnozay avatar Jun 24 '15 14:06 dnozay

I've had this happen to me since, but trying more creates seems to work eventually :(

nathanleclaire avatar Jun 25 '15 19:06 nathanleclaire

I got the same error:

docker-machine create --driver virtualbox dev
No default boot2docker iso found locally, downloading the latest release...
Error creating machine: Get https://api.github.com/repos/boot2docker/boot2docker/releases: dial tcp: i/o timeout
You will want to check the provider to make sure the machine and associated resources were properly removed.

I was able to resolve github.com:

curl https://api.github.com/repos/boot2docker/boot2docker/releases
...
    "url": "https://api.github.com/repos/boot2docker/boot2docker/releases/1537750",
    "assets_url": "https://api.github.com/repos/boot2docker/boot2docker/releases/1537750/assets",
    "upload_url": "https://uploads.github.com/repos/boot2docker/boot2docker/releases/1537750/assets{?name}",
    "html_url": "https://github.com/boot2docker/boot2docker/releases/tag/v1.7.1",
...

I have a local DNS server in my office. A TCP dump of port 53 from the two requests:

docker-machine create:

10:21:32.010850 IP 192.168.100.15.54541 > 192.168.200.10.53: 16666+ A? api.github.com. (32)
10:21:37.011731 IP 192.168.100.15.54541 > 192.168.200.10.53: 16666+ A? api.github.com. (32)

curl:

10:20:48.694514 IP 192.168.100.15.58137 > 192.168.200.10.53: 45930+ A? api.github.com. (32)
10:20:49.695032 IP 192.168.100.15.58137 > 192.168.200.10.53: 45930+ A? api.github.com. (32)
10:20:50.794949 IP 192.168.100.15.58137 > 192.168.200.11.53: 45930+ A? api.github.com. (32)
10:20:50.819443 IP 192.168.200.11.53 > 192.168.100.15.58137: 45930 1/0/0 A 192.30.252.138 (48)

The solution for me was to clear my DNS settings and re-connect to the network -- turns out the the first DNS server IP was dead (192.168.200.10), and after reconnecting it was replaced with the new IP. As @dnozay said it seems it will only try the first DNS server in the list, so you really need to make sure your DNS works perfectly.

jonatanblue avatar Jul 15 '15 09:07 jonatanblue

For others who might've had the same issue, it turned out to be rate-limiting for me:

curl https://api.github.com/repos/boot2docker/boot2docker/releases
{
  "message": "API rate limit exceeded for <ip address>. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)",
  "documentation_url": "https://developer.github.com/v3/#rate-limiting"
}

mefellows avatar Oct 30 '15 01:10 mefellows

@mefellows If you're getting rate limited, there's now a --github-api-token flag to specify your own GH API token to dodge the rate limit

nathanleclaire avatar Oct 30 '15 02:10 nathanleclaire

Thanks @nathanleclaire, good tip!

mefellows avatar Nov 01 '15 07:11 mefellows