Skip to content

Commit b01720e

Browse files
committed
partially solving arun-gupta#110
1 parent 8aca1eb commit b01720e

2 files changed

Lines changed: 74 additions & 12 deletions

File tree

chapters/docker-troubleshooting.adoc

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,23 @@
44

55
Depending upon the network speed and restrictions, you may not be able to download Docker images from Docker Hub. The error message may look like:
66

7-
[source, text]
8-
----
7+
```console
98
$ docker pull arungupta/wildfly-mysql-javaee7
109
Using default tag: latest
1110
Pulling repository docker.io/arungupta/wildfly-mysql-javaee7
1211
Network timed out while trying to connect to https://index.docker.io/v1/repositories/arungupta/wildfly-mysql-javaee7/images. You may want to check your internet connection or if you are behind a proxy.
13-
----
12+
```
1413

1514
This section provide a couple of alternatives to solve this.
1615

1716
==== Restart Docker Machine
1817

1918
It seems like Docker Machine gets into a strange state and restarting it fixes that.
2019

21-
[source, text]
22-
----
20+
```console
2321
docker-machine restart <MACHINE_NAME>
2422
eval $(docker-machine env <MACHINE_NAME>)
25-
----
23+
```
2624

2725
==== Loading Images Offline
2826

@@ -58,11 +56,10 @@ Accessing the WildFly and MySQL sample in Kubernetes gives 404 when you give the
5856

5957
This may be resolved by stopping the node and restarting the cluster again:
6058

61-
[source, text]
62-
----
59+
```console
6360
vagrant halt minion-1
6461
./cluster/kube-up.sh
65-
----
62+
```
6663

6764
These commands need to be given in the '`kubernetes`' directory.
6865

@@ -84,3 +81,30 @@ And download the latest .iso
8481
After that you can move that iso to the docker cache directory. This is located in `~/.docker/machine/cache` on Mac & Linux and `/Users/yourUserName/.docker/machine/cache` on Windows.
8582

8683
Issue: https://github.com/docker/machine/issues/2186 is raised so that the docker-machine team can hopefully find a way around this.
84+
85+
=== "`You may be getting rate limited by Github`" error message
86+
87+
Credits: https://github.com/docker/machine/blob/master/README.md#troubleshooting
88+
89+
In order to `create` or `upgrade` virtual machines running Docker, Docker
90+
Machine will check the Github API for the latest release of the [boot2docker
91+
operating system](https://github.com/boot2docker/boot2docker). The Github API
92+
allows for a small number of unauthenticated requests from a given client, but
93+
if you share an IP address with many other users (e.g. in an office), you may
94+
get rate limited by their API, and Docker Machine will error out with messages
95+
indicating this.
96+
97+
In order to work around this issue, you can https://help.github.com/articles/creating-an-access-token-for-command-line-use/[generate a
98+
token] and pass it to Docker Machine using the global `--github-api-token` flag:
99+
100+
```console
101+
$ docker-machine --github-api-token=token create -d virtualbox newbox
102+
```
103+
104+
This should eliminate any issues you've been experiencing with rate limiting.
105+
106+
=== Docker Machine Troubleshooting
107+
108+
https://github.com/docker/machine/blob/master/README.md#troubleshooting[Docker Machine Troubleshooting] section has good tips on what can possibly go wrong with Docker Machine. Look there if your issue is not explained here.
109+
110+
===

readme.html

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,8 @@ <h1>Docker and Kubernetes for Java Developers</h1>
583583
<li><a href="#_cannot_create_docker_machine_on_windows">Cannot create Docker Machine on Windows</a></li>
584584
<li><a href="#_no_route_to_host">No route to host</a></li>
585585
<li><a href="#_docker_machine_creation_fails_with_an_error_about_dial_tcp_i_o_timeout">Docker machine creation fails with an error about dial tcp: i/o timeout</a></li>
586+
<li><a href="#__you_may_be_getting_rate_limited_by_github_error_message">&#8220;You may be getting rate limited by Github&#8221; error message</a></li>
587+
<li><a href="#_docker_machine_troubleshooting">Docker Machine Troubleshooting</a></li>
586588
</ul>
587589
</li>
588590
<li><a href="#_references">References</a></li>
@@ -4971,7 +4973,7 @@ <h3 id="_network_timed_out">Network Timed Out</h3>
49714973
</div>
49724974
<div class="listingblock">
49734975
<div class="content">
4974-
<pre class="highlight"><code class="language-text" data-lang="text">$ docker pull arungupta/wildfly-mysql-javaee7
4976+
<pre class="highlight"><code class="language-console" data-lang="console">$ docker pull arungupta/wildfly-mysql-javaee7
49754977
Using default tag: latest
49764978
Pulling repository docker.io/arungupta/wildfly-mysql-javaee7
49774979
Network timed out while trying to connect to https://index.docker.io/v1/repositories/arungupta/wildfly-mysql-javaee7/images. You may want to check your internet connection or if you are behind a proxy.</code></pre>
@@ -4987,7 +4989,7 @@ <h4 id="_restart_docker_machine">Restart Docker Machine</h4>
49874989
</div>
49884990
<div class="listingblock">
49894991
<div class="content">
4990-
<pre class="highlight"><code class="language-text" data-lang="text">docker-machine restart &lt;MACHINE_NAME&gt;
4992+
<pre class="highlight"><code class="language-console" data-lang="console">docker-machine restart &lt;MACHINE_NAME&gt;
49914993
eval $(docker-machine env &lt;MACHINE_NAME&gt;)</code></pre>
49924994
</div>
49934995
</div>
@@ -5040,7 +5042,7 @@ <h3 id="_no_route_to_host">No route to host</h3>
50405042
</div>
50415043
<div class="listingblock">
50425044
<div class="content">
5043-
<pre class="highlight"><code class="language-text" data-lang="text">vagrant halt minion-1
5045+
<pre class="highlight"><code class="language-console" data-lang="console">vagrant halt minion-1
50445046
./cluster/kube-up.sh</code></pre>
50455047
</div>
50465048
</div>
@@ -5074,6 +5076,42 @@ <h3 id="_docker_machine_creation_fails_with_an_error_about_dial_tcp_i_o_timeout"
50745076
<p>Issue: <a href="https://github.com/docker/machine/issues/2186" class="bare">https://github.com/docker/machine/issues/2186</a> is raised so that the docker-machine team can hopefully find a way around this.</p>
50755077
</div>
50765078
</div>
5079+
<div class="sect2">
5080+
<h3 id="__you_may_be_getting_rate_limited_by_github_error_message">&#8220;You may be getting rate limited by Github&#8221; error message</h3>
5081+
<div class="paragraph">
5082+
<p>Credits: <a href="https://github.com/docker/machine/blob/master/README.md#troubleshooting" class="bare">https://github.com/docker/machine/blob/master/README.md#troubleshooting</a></p>
5083+
</div>
5084+
<div class="paragraph">
5085+
<p>In order to <code>create</code> or <code>upgrade</code> virtual machines running Docker, Docker
5086+
Machine will check the Github API for the latest release of the [boot2docker
5087+
operating system](<a href="https://github.com/boot2docker/boot2docker" class="bare">https://github.com/boot2docker/boot2docker</a>). The Github API
5088+
allows for a small number of unauthenticated requests from a given client, but
5089+
if you share an IP address with many other users (e.g. in an office), you may
5090+
get rate limited by their API, and Docker Machine will error out with messages
5091+
indicating this.</p>
5092+
</div>
5093+
<div class="paragraph">
5094+
<p>In order to work around this issue, you can <a href="https://help.github.com/articles/creating-an-access-token-for-command-line-use/">generate a
5095+
token</a> and pass it to Docker Machine using the global <code>--github-api-token</code> flag:</p>
5096+
</div>
5097+
<div class="listingblock">
5098+
<div class="content">
5099+
<pre class="highlight"><code class="language-console" data-lang="console">$ docker-machine --github-api-token=token create -d virtualbox newbox</code></pre>
5100+
</div>
5101+
</div>
5102+
<div class="paragraph">
5103+
<p>This should eliminate any issues you&#8217;ve been experiencing with rate limiting.</p>
5104+
</div>
5105+
</div>
5106+
<div class="sect2">
5107+
<h3 id="_docker_machine_troubleshooting">Docker Machine Troubleshooting</h3>
5108+
<div class="paragraph">
5109+
<p><a href="https://github.com/docker/machine/blob/master/README.md#troubleshooting">Docker Machine Troubleshooting</a> section has good tips on what can possibly go wrong with Docker Machine. Look there if your issue is not explained here.</p>
5110+
</div>
5111+
<div class="paragraph">
5112+
<p>===</p>
5113+
</div>
5114+
</div>
50775115
</div>
50785116
</div>
50795117
<div class="sect1">

0 commit comments

Comments
 (0)