managed vms deployment errors

236 views
Skip to first unread message

John Smith

unread,
Jan 14, 2016, 8:28:07 AM1/14/16
to Google App Engine
Today I have created a new project (referenced here as my-app-id) in my account and attempted to deploy my code.

using this command:
aedeploy gcloud preview app deploy --promote backend.yaml --verbosity debug

I have got the following output:

DEBUG: Running gcloud.preview.app.deploy with Namespace(__calliope_internal_deepest_parser=ArgumentParser(prog='gcloud.preview.app.deploy', usage=None, description="*(BETA)* This command is used to deploy both code and configuration to the App Engine\nserver.  As an input it takes one or more ``DEPLOYABLES'' that should be\nuploaded.  A ``DEPLOYABLE'' can be a module's .yaml file or a configuration's\n.yaml file.", version=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=False), account=None, authority_selector=None, authorization_token_file=None, bucket=None, cmd_func=<bound method Command.Run of <googlecloudsdk.calliope.backend.Command object at 0x02E67B50>>, command_path=['gcloud', 'preview', 'app', 'deploy'], configuration=None, deployables=['backend.yaml'], docker_build=None, document=None, force=False, format=None, h=None, help=None, http_timeout=None, image_url=None, log_http=None, project=None, promote='true', quiet=None, repo_info_file=None, server=None, stop_previous_version=None, trace_email=None, trace_log=False, trace_token=None, user_output_enabled=None, verbosity='debug', version=None).
DEBUG
: API endpoint: [https://appengine.googleapis.com/], API version: [v1beta4]
You are about to deploy the following modules:
 
- my-app-id/default (from [C:\Users\username\AppData\Local\Temp\aedeploy188210551\backend.yaml])
     
Deployed URL: [https://my-app-id.appspot.com]


Do you want to continue (Y/n)?  Y


Beginning deployment...
DEBUG
: Host: appengine.google.com
DEBUG
: _Authenticate configuring auth; needs_auth=False
DEBUG
: Sending request to https://appengine.google.com/api/vms/prepare?app_id=my-app-id headers={'X-appcfg-api-version': '1', 'content-length': '0', 'Content-Type':'application/octet-stream'} body=
INFO
: Attempting refresh to obtain initial access_token
INFO
: Refreshing access_token
If this is your first deployment, this may take a while...\DEBUG: Got http error 400.
DEBUG
: Unexpected results: {'status': '400', 'content-length': '86', 'expires': 'Mon, 01 Jan 1990 00:00:00 GMT', 'server': 'Google Frontend', 'cache-control': 'no-cache', 'date': 'Thu, 14 Jan 2016 12:54:01 GMT', 'content-type': 'text/plain'}
If this is your first deployment, this may take a while...failed.
WARNING
: If this is your first deployment, please try again.
DEBUG
: (gcloud.preview.app.deploy) Server responded with code [400]:
 
(unknown).
 
Failed Project Preparation (app_id='s~my-app-id'). Out of retries.  Last error:
Traceback (most recent call last):
 
File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\calliope\cli.py", line 643, in Execute
    result
= args.cmd_func(cli=self, args=args)
 
File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\calliope\backend.py", line 1401, in Run
    resources
= command_instance.Run(args)
 
File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\surface\preview\app\deploy.py", line 350, in Run
    deploy_command_util
.DoPrepareManagedVms(gae_client)
 
File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\api_lib\app\deploy_command_util.py", line 250, in DoPrepareManagedVms
    gae_client
.PrepareVmRuntime()
 
File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\api_lib\app\appengine_client.py", line 198, in PrepareVmRuntime
    rpcserver
.Send('/api/vms/prepare', app_id=self.project)
 
File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\api_lib\app\util.py", line 370, in Send
    response
= self._server.Send(*args, **kwargs)
 
File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\third_party\appengine\tools\appengine_rpc_httplib2.py", line 286, in Send
   
'Unexpected HTTP status %s' % status)
 
File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\third_party\appengine\tools\appengine_rpc_httplib2.py", line 69, in RaiseHttpError
   
raise urllib2.HTTPError(url, response_info.status, msg, response_info, stream)
RPCError: Server responded with code [400]:
 
(unknown).
 
Failed Project Preparation (app_id='s~my-app-id'). Out of retries.  Last error:
ERROR
: (gcloud.preview.app.deploy) Server responded with code [400]:
 
(unknown).
 
Failed Project Preparation (app_id='s~my-app-id'). Out of retries.  Last error:
aedeploy
: Error: unable to run "gcloud preview app deploy --promote backend.yaml --verbosity debug": exit status 1


re-setting my project id to my OLD-app-id works perfectly. (old-app-id is a project I was using up to today, yesterday I have deployed multiple versions into it successfully)


things I have tried to solve this error:
  • create a new-and-unrelated-project-id
  • using appcfg.py -V 1 -A my-app-id update backend.yaml (to no avail, the deployment is "successful" but rolling back immediately) 
  • revoking the ***-cloud@gservices account permissions and apis and re-enabling them
  • removing and re-setting the billing account
  • using a different billing account
  • removing and re-installing the gcloud sdk
  • using a different computer
  • creating a cloud computing instance to "jumpstart" things and deleting it
  • writing a new empty project (code-wise) and trying to deploy it
  • checking the status.cloud.google.com page

can you please help shed some light on this matter?

Thanks,
John

Christian F. Howes

unread,
Jan 14, 2016, 7:31:26 PM1/14/16
to Google App Engine
Hi John,

I really don't know about setting up a new project, i haven't done it in a while, but can you try an experiment and rename your module?  GAE used to have something that was controlled from backend.yaml or backends.yaml (can't remember which) and perhaps that is still a sort of keyword.

good luck!

cfh

John Smith

unread,
Jan 15, 2016, 10:58:52 AM1/15/16
to Google App Engine
Hey and thanks for the reply,

unfortunately as I've already noted, I tried this approach with my 
  • writing a new empty project (code-wise) and trying to deploy it
the new project had "empty.yaml" file as the application definition file (with a module named "empty" as the deployed module)

I've tried to run the very same command today and it proceeded as it usually would the application was successfully built but then I've got this error:

...
...
...
Removing intermediate container ID1
Successfully built ID2
---------------------------------------------------------------------------------------------------------------------

Beginning teardown of remote build environment (this may take a few seconds).
Updating module [default]...failed.
ERROR: (gcloud.preview.app.deploy) Error Response: [13] Could not pick a region and/or zone. Version: 20160115t174246...
aedeploy: Error: unable to run "gcloud preview app deploy --promote backend.yaml": exit status 1

the output of my "gcloud config list" command is:

Your active configuration is: [default]

[app]
suppress_change_warning = true
[compute]
region = us-central1
zone = us-central1-b
[core]
account = acc...@email.tld
disable_usage_reporting = True
project = my-app-id


the project is on the us-central location

things I've already tried:
  • removing the region and zone settings from gcloud
  • setting the zone to us-central1-{a,b,f}
  • settings the region to us-central, us-central1
  • changing computer, creating a new project, deploying my empty project, etc..

can you please enlighten me of what I do wrong?


Thanks
John. 

John Smith

unread,
Jan 15, 2016, 11:23:34 AM1/15/16
to Google App Engine
Attaching --verbosity debug relevant lines:

Updating module [default]...\DEBUG: Operation [apps/my-app-id/operations/UUID1] complete. Result: {
    "metadata": {
        "target": "apps/my-app-id/modules/default/versions/20160115t181126",
        "operationType": "create_version",
        "user": "acc...@email.tld",
        "insertTime": "2016-01-15T16:16:37.783Z",
        "endTime": "2016-01-15T16:16:55.627Z",
        "method": "google.appengine.v1beta4.Versions.CreateVersion"
    },
    "done": true,
    "name": "apps/my-app-id/operations/UUID1",
    "error": {
        "message": "Could not pick a region and/or zone. Version: 20160115t181126...",
        "code": 13
    }
}
Updating module [default]...failed.
DEBUG: (gcloud.preview.app.deploy) Error Response: [13] Could not pick a region and/or zone. Version: 20160115t181126...
Traceback (most recent call last):
  File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\calliope\cli.py", line 643, in Execute
    result = args.cmd_func(cli=self, args=args)
  File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\calliope\backend.py", line 1401, in Run
    resources = command_instance.Run(args)
  File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\surface\preview\app\deploy.py", line 387, in Run
    images.get(module))
  File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\api_lib\app\appengine_api_client.py", line 90, in DeployModule
    return operations.WaitForOperation(self.client.apps_operations, operation)
  File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\api_lib\app\api\operations.py", line 66, in WaitForOperation
    encoding.MessageToPyValue(completed_operation.error)))
OperationError: Error Response: [13] Could not pick a region and/or zone. Version: 20160115t181126...
ERROR: (gcloud.preview.app.deploy) Error Response: [13] Could not pick a region and/or zone. Version: 20160115t181126...

John Smith

unread,
Jan 15, 2016, 12:02:23 PM1/15/16
to Google App Engine
I've created a new project and the new issue is now resolved.

please close this thread

Nicholas (Google Cloud Support)

unread,
Jan 15, 2016, 4:44:34 PM1/15/16
to Google App Engine
Thanks for supplying your thorough details, logs and success here publicly. Would you mind also posting the versions of the gcloud or App Engine SDKs used for each of your tests and posts? This may indicate a relationships between these failures or successes that might be helpful to others stumbling upon this post when encountering a similar error. Note that version 92.0.0 of the gcloud SDK was released on the 13th though not indicating any definitive relation to this issue.

John Smith

unread,
Jan 17, 2016, 5:10:37 AM1/17/16
to Google App Engine
At the time of my first post I was using a version which is NOT 92.0.0 (I cannot recall which exact version but I regularly update the SDK).
As part of my attempts to solve this issue I upgraded the SDK version to 92.0.0

  • removing and re-installing the gcloud sdk

Reply all
Reply to author
Forward
0 new messages