5

I installed docker toolbox and I am trying to connect to my private registry.

I added the following to /var/lib/boot2docker/profile

 EXTRA_ARGS='
--label provider=virtualbox --insecure-registry http://myregistry.com:80

'

I am able to login to the registry successfully. But when I try to pull/push from/to the registry, I get the following error.

Error response from daemon: unable to ping registry endpoint
https://myregistry.com:80/v0/ v2 ping attempt failed with error: Get
https://myregistry.com:80/v2/: tls: oversized record received with
length 20527  v1 ping attempt failed with error: Get
https://myregistry.com:80/v1/_ping: tls: oversized record received
with length 20527

Any help would be appreciated. Thanks

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Shriram Sharma
  • 599
  • 1
  • 5
  • 19

2 Answers2

3

I was able to resolve the issue.

instead of

--insecure-registry http://myregistry.com:80

I did

--insecure-registry=myregistry.com

and it worked

Shriram Sharma
  • 599
  • 1
  • 5
  • 19
1

The main way to debug, as in issue 958, is to run the daemon docker in debug:

docker -D -d

In your case, the v2 registry was not able to be contacted and then attempted v1, giving the error you see.
The logs should tell you more.

Make sure you have followed Deploying a plain HTTP registry.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks @VonC. The problem is, when I login it uses "http://" and when I pull it uses "https://". I am not sure why. I don't know what am I missing. – Shriram Sharma Nov 04 '15 at 21:50
  • @ShriramSharma That reminds me of https://github.com/docker/distribution/issues/1028#issuecomment-148958771 and https://github.com/docker/docker/issues/17317, but you don't have nginx in your setup, do you? – VonC Nov 04 '15 at 21:54
  • No I don't have nginx – Shriram Sharma Nov 04 '15 at 22:05
  • @ShriramSharma then trying a debug session might be able to tell you more with the docker logs. – VonC Nov 04 '15 at 22:06