6
votes

I'm trying to deploy an app to App Engine using a Docker container (I'm running on Mac). The project has no instance initially.

These are the versions I have:

  • docker v1.6.2
  • boot2docker v1.6.2
  • GCloud SDK v0.9.61

My Docker container runs fine locally (with docker run or with gcloud preview app run which probably means that my Dockerfile and app.yml are fine).

When trying to deploy it to production using gcloud preview app deploy app.yml, the server responds with a Bad Request.

Updating module [default]...|Pushing image to Google Container Registry...
Updating module [default].../The push refers to a repository [gcr.io/_m_sdk/dreamyproject.default.20150521t230120] (len: 1)
Sending image list
Updating module [default]...-Pushing repository gcr.io/_m_sdk/dreamyproject.default.20150521t230120 (1 tags)
Image 5c5e3f8382f6 already pushed, skipping
[...]
Image de8576728671 already pushed, skipping
Updating module [default]...\Image 4579da2d2faf already pushed, skipping
Image ad7184108492 already pushed, skipping
[...]
Image 369d7ef21685 already pushed, skipping
Pushing
Buffering to disk: 15.65 MB.|Buffering to disk: 557.1 kB
Image successfully pushed...|Pushing: [==================================================>] 15.65 MB/15.65 MB
Pushing
Updating module [default]...-Buffering to disk: 557.1 kB
Image successfully pushed...-Pushing: [==================================================>] 121.7 MB/121.7 MB
Pushing tag for rev [6de771c3b6c4] on {https://gcr.io/v1/repositories/_m_sdk/dreamyproject.default.20150521t230120/tags/latest}
Updating module [default]...done.
ERROR: (gcloud.preview.app.deploy) Server responded with code [400]:
  Bad Request Unexpected HTTP status 400

Did I forget to do something in the google developer console or anything ?

edit: deploying to a fresh project worked. I still don't know about the bad request though.

edit 2: after playing around a bit, I think it could be due (the bad request) to selecting EU servers when creating the project.

edit 3: Error details. The thing that seems weird is the expiration date. DEBUG: Unexpected results: {'status': '400', 'alternate-protocol': '443:quic,p=1', 'content-length': '73', 'expires': 'Fri, 01 Jan 1990 00:00:00 GMT', 'server': 'Google Frontend', 'cache-control': 'no-cache', 'date': 'Sat, 23 May 2015 11:49:41 GMT', 'content-type': 'text/plain'}

edit 4: According to this thread, Managed VMs are not available in EU projects. This should be why.

1
Try running 'gcloud auth login' to see if that helps. - Amy U.
Doesn't seem to change anything. I think it might be related to EU servers. Not 100% sure though. - Mouz
Is this because you tested on a fresh EU project vs. a normal project? - Nick
In addition to confirming whether that's the case, I'm interested whether you can still produce the failure condition? If so, I'd really be curious to see the gcloud --verbosity debug preview app deploy app.yaml output, as it may contain more error info. - Nick
It worked on a fresh US project and didn't on an EU one. Not sure if that was clear. I'll edit with the verbose option asap. - Mouz

1 Answers

1
votes

According to this thread, Managed VMs are not available in EU projects yet. This should be why.

Ryan (Cloud Platform Support) - 26/05/15

[...] Managed VM's are currently only available in US projects [...]

(update) Now on the official documentation:

While in Beta, United States only. European Union-hosted applications should not deploy apps to the flexible environment.