GoogleCloudPlatform / gcloud-maven-plugin

Cloud SDK Maven Plugin for Google App Engine (Managed VMs and non Managed VMs)
Apache License 2.0
29 stars 24 forks source link

gcloud:deploy fails with custom Dockerfile #85

Closed erugeri closed 8 years ago

erugeri commented 8 years ago

When I try to deploy our app with custom Dockerfile using gcloud:deploy, I have a 400 - INVALID_ARGUMENT. Here's the command I use:

mvn gcloud:deploy -Dgcloud.gcloud_project=_myprojectid_ -Dgcloud.version=test I noticed that when I use the _-Dgcloud.gcloudproject value of another project it works. However I need to deploy on that specific project...

gcloud logs:

[INFO] Verifying that Managed VMs are enabled and ready.
[INFO] Building and pushing image for service [default]
[INFO] ERROR: gcloud crashed (HttpError): HttpError accessing <https://cloudbuild.googleapis.com/v1/projects/my-app-id/builds?alt=json>: response: <{'status': '400', 'alternate-protocol': '443:quic', 'content-length': '127', 'x-xss-protection': '1; mode=block', 'x-content-type-options': 'nosniff', 'transfer-encoding': 'chunked', 'vary': 'Origin, X-Origin, Referer', 'server': 'ESF', '-content-encoding': 'gzip', 'cache-control': 'private', 'date': 'Mon, 09 May 2016 13:53:11 GMT', 'x-frame-options': 'SAMEORIGIN', 'alt-svc': 'quic=":443"; ma=2592000; v="33,32,31,30,29,28,27,26,25"', 'content-type': 'application/json; charset=UTF-8'}>, content <{
[INFO]   "error": {
[INFO]     "code": 400,
[INFO]     "message": "Request contains an invalid argument.",
[INFO]     "status": "INVALID_ARGUMENT"
[INFO]   }
[INFO] }

Installation information:

Google Cloud SDK [108.0.0]
Platform: [Mac OS X, x86_64]
Python Version: [2.7.8 (default, Oct 19 2014, 16:02:00)  [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.54)]]
Python Location: [/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python]
Site Packages: [Disabled]
Installation Root: [/Users/etienne/DEV/google-cloud-sdk]
Installed Components:
  core: [2016.05.02]
  app-engine-python: [1.9.36]
  core-nix: [2016.03.28]
  kubectl: []
  app-engine-java: [1.9.36]
  gcloud: []
  gsutil-nix: [4.18]
  app-engine-python-extras: [1.9.21]
  gsutil: [4.19]
  bq: [2.0.24]
  bq-nix: [2.0.24]
  kubectl-darwin-x86_64: [1.2.3]

-> gcloud maven plugin version: 2.0.9.106.v20160420

Full stack trace (formatted):

googlecloudsdk/gcloud_main.py:169
 gcloud_cli.Execute()
googlecloudsdk/calliope/cli.py:647
 result = args.cmd_func(cli=self, args=ar...
googlecloudsdk/calliope/backend.py:1407
 resources = command_instance.Run(args)
surface/preview/app/deploy.py:502
 config_cleanup)
googlecloudsdk/api_app/deploy_command_util.py:193
 storage_client)
googlecloudsdk/api_app/deploy_command_util.py:243
 image.tag, cloudbuild_client)
googlecloudsdk/api_app/cloud_build.py:151
 logsBucket=logs_bucket,
googlecloudsdk/third_party/apis/cloudbuild/v1/cloudbuild_v1_client.py:198
 config, request, global_params=global_pa...
googlecloudsdk/third_party/apitools/base/py/base_api.py:708
 return self.ProcessHttpResponse(method_c...
googlecloudsdk/third_party/apitools/base/py/base_api.py:714
 self.__ProcessHttpResponse(method_config...
googlecloudsdk/third_party/apitools/base/py/base_api.py:586
 raise exceptions.HttpError.FromResponse(...
HttpError: HttpError accessing <https://cloudbuild.googleapis.com/v1/projects/adbuddiz-prd/builds?alt=json>: response: <{'status': '400', 'alternate-protocol': '443:quic', 'content-length': '127', 'x-xss-protection': '1; mode=block', 'x-content-type-options': 'nosniff', 'transfer-encoding': 'chunked', 'vary': 'Origin, X-Origin, Referer', 'server': 'ESF', '-content-encoding': 'gzip', 'cache-control': 'private', 'date': 'Mon, 09 May 2016 13:53:11 GMT', 'x-frame-options': 'SAMEORIGIN', 'alt-svc': 'quic=":443"; ma=2592000; v="33,32,31,30,29,28,27,26,25"', 'content-type': 'application/json; charset=UTF-8'}>, content <{

Thanks a lot for your help, I can communicate my project id via email ( etienne.rugeri at gmail ) !

ludoch commented 8 years ago

I doubt the error HttpError: HttpError accessing https://cloudbuild.googleapis.com/v1/projects/adbuddiz-prd/builds?alt=json: response: <{'status': '400', 'alternate-protocol': '443:quic', 'content-length': '127', 'x-xss-protection': '1; mode=block', 'x-content-type-options': 'nosniff', 'transfer-encoding': 'chunked', 'vary': 'Origin, X-Origin, Referer', 'server': 'ESF', '-content-encoding': 'gzip', 'cache-control': 'private', 'date': 'Mon, 09 May 2016 13:53:11 GMT', 'x-frame-options': 'SAMEORIGIN', 'alt-svc': 'quic=":443"; ma=2592000; v="33,32,31,30,29,28,27,26,25"', 'content-type': 'application/json; charset=UTF-8'}>, content <{

is coming from Maven or the maven environment... Seems to be either a Cloud SDK bug, or the server side it is talking to... Would you mind to file an issue on https://code.google.com/p/google-cloud-sdk/issues/list ?

erugeri commented 8 years ago

Done, in case other users are interested to follow it: https://code.google.com/p/google-cloud-sdk/issues/detail?id=826&thanks=826&ts=1462958159

ludoch commented 8 years ago

closing on this side.