Managed VM Not Connecting to gcr.io on OS X

Ran into this issue today fooling around with Docker and Managed VMs on Google Cloud Platform. I was running on Mac OS X, which meant boot2docker was also in the mix. Figured this could help someone else because it baffled me for a bit.

I was trying to start up a standard runtime for python on Managed VM. I was using the following app.yaml:

module: default
runtime: python27
vm: true

api_version: 1
threadsafe: yes

resources:
  cpu: .5
  memory_gb: 1.3

manual_scaling:
  instances: 1

handlers:
- url: .*
  script: main.app

I ran the gcloud command:

gcloud preview app run ./app.yaml

In the midst of the output, this error was buried:

ERROR    2015-05-22 17:21:59,043 containers.py:283] v1 ping attempt failed
with error: Get https://gcr.io/v1/_ping: dial tcp: i/o timeout. If this
private registry supports only HTTP or HTTPS with an unknown CA certificate,
please add `--insecure-registry gcr.io` to the daemon's arguments. In the
case of HTTPS, if you have access to the registry's CA certificate, no need
for the flag; simply place the CA certificate at
/etc/docker/certs.d/gcr.io/ca.crt

What was really frustrating is that this had worked yesterday and I had changed nothing in between.  I tried a whole bunch of things. I fired a whole lot of searches on Google. In my searches I found this thread on github that suggests it’s an issue with some sort of caching in Docker. So I did the following:

  • Launched Virtual Box
  • Right clicked boot2docker-vm
  • Chose Close ->Power Off
  • Launched boot2docker again via Applications->boot2docker
  • Tried again

And now it works.

Hope this helps someone else.