9

I'm pushing to a private docker repository on Docker Hub and I keep getting this error:

2726b5968341: Image successfully pushed 
2fd0731064ec: Image successfully pushed 
49328a658a81: Image successfully pushed 
6beafaa9c78d: Image successfully pushed 
bb8b822852f4: Image successfully pushed 
6a0d258340b1: Pushing 
FATA[0457] Failed to upload metadata: Put https://cdn-registry-1.docker.io/v1/images/6a0d258340b180fd569ec687653d805ebb70e77c1943ca6cfc9d296392ad79ee/json: dial tcp: lookup cdn-registry-1.docker.io on 192.168.1.1:53: read udp 192.168.1.1:53: i/o timeout 

I'm running Docker on Mac OS using boot2docker. After running the push command 7+ times it finally finished successfully, but I figured I'd ask anyway.

Anyone see this before? Tips on how to resolve?

Jacek Laskowski
  • 72,696
  • 27
  • 242
  • 420
threejeez
  • 2,314
  • 6
  • 30
  • 51

1 Answers1

11
  • If you are using docker-machine, try restarting it:

    docker-machine restart default
    

    Note: default is the name of VM running the docker daemon. In case you have more than one or a different name then use the appropriate.

  • If you are using boot2docker, restart it:

    boot2docker stop
    boot2docker start
    

Interwebs suggest it's a network issue locally on your box; likely related to DNS. I've tried many things but restarting boot2docker fixed it.

And if you get this issue while restarting:

An error occurred trying to connect: Post https://192.168.59.103:2376/v1.19/images/create?fromImage=...: x509: certificate is valid for 127.0.0.1, 10.0.2.15, not 192.168.59.103

Then try reinstalling boot2docker; note that you loose all your local images

boot2docker stop
boot2docker delete
boot2docker init
boot2docker start

Because of https://github.com/boot2docker/boot2docker/issues/968

Good luck

Update:

No need to boot2docker delete anymore! A fix was merged in a latter version of boot2docker (1.7.1).

You can now boot2docker upgrade and the issue should be fixed.

Alternatively, if that's a problem for you, you can simply bounce docker within the boot2docker VM like so:

boot2docker ssh 'sudo /etc/init.d/docker restart’

Ivan Hristov
  • 3,046
  • 2
  • 25
  • 23
mlg
  • 1,447
  • 15
  • 19
  • This is the correct answer for this specific case. If you are getting HTTP 4xx or 5xx errors, it could be a Docker Hub issue. Otherwise please check your local VM and/or restart your local VM. – Andy Jul 28 '15 at 22:10
  • 2
    [Docker Toolbox](https://www.docker.com/toolbox) replaces boot2docker but you still need to `docker-machine restart default` pretty frequently. – mmell Oct 09 '15 at 02:43
  • 1
    Restarting the machine didn't fix my problem. This looks like a serious one to me. – dagonza Sep 15 '16 at 08:39