Error response from daemon on Ubuntu 16.04

I installed docker-ce for Ubuntu, when ran sample hello-world, met error response.
sudo docker run hello-world
Unable to find image ‘hello-world:latest’ locally
docker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers).
See ‘docker run --help’.

what cause it? how to solve it?

I didn’t enable firewall, it’s inactive status.
Which steps I missed when installing docker-ce?

First things first:

1.Try pinging registry IP, if you can’t reach it you have a network issue:

ping registry-1.docker.io

2.Try curling the registry, you should get a JSON error response if things are OK:

curl https://registry-1.docker.io/v2/ {"errors":[{"code":"UNAUTHORIZED","message":"authentication required","detail":null}]}

If you can ping and curl then you should be able to use the registry normally.
I’ve heard something about China blocking registry IP/DNS, I dunno (check https://groups.google.com/forum/#!topic/docker-user/9ScigkPORRg).

2 Likes

yes, as you said.
I can’t ping registry-1.docker.io, also get error message when curling the registry.

What does the google doc show? I can’t open it, I don’t know which group I should join?

This means that your workstation can’t reach the registry. This could be a corporate network/proxy issue. This is not a docker engine issue.

2 Likes

many thanks for your reply.

1 Like