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.

2 thoughts on “Managed VM Not Connecting to gcr.io on OS X

  1. Thank you! Given the flakiness of Boot2docker and virtualBox , I feel gcloud suppoirt team should put some information on this as this error was not intuitive at all.

    Like

    1. I hear you. I think the reason you don’t see more is that managed vm is moving to the remote model where we don’t build locally, but build on our servers.

      Like

Leave a Reply to Amit Srivastava Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s