As of this morning all of my build pipelines have started to fail. No code in many of the pipelines have changed, and none of the cloudbuild.yaml files have changed.
I've got a few NodeJS applications that have a CloudBuild.yaml file that looks similar to this:
steps:
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
entrypoint: 'bash'
args: ['-c', 'gcloud config set app/cloud_build_timeout 1600']
#Install Dependencies
- name: node
entrypoint: npm
args: ['install']
#Build an optimized version of the website
- name: node
entrypoint: npm
args: ['run', 'build']
env:
- [LIST OF ENV VARIABLES HERE -- Omitted for the question"
#Deploy to AppEngine using the Branch as the version
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
entrypoint: 'bash'
args: ['-c', 'gcloud app deploy $_ENV_YAML']
timeout: '1600s'
options:
machineType: 'N1_HIGHCPU_8'
Since this morning CloudBuild seems to get stuck after "Uploading Files" and eventually errors out:
Step #3: Beginning deployment of service [development]...
Step #3: ╔════════════════════════════════════════════════════════════╗
Step #3: ╠═ Uploading 7 files to Google Cloud Storage ═╣
Step #3: ╚════════════════════════════════════════════════════════════╝
Step #3: File upload done.
Step #3: Updating service [development]...
Step #3: ..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................failed.
Step #3: ERROR: (gcloud.app.deploy) Error Response: [13] An internal error occurred.
When I turn on debugging:
..............................DEBUG: Operation [apps/munch-web/operations/8048d88b-1993-4155-ad6f-9322f88e44f3] complete. Result: {
"done": true,
"error": {
"code": 13,
"message": "An internal error occurred."
},
"metadata": {
"#type": "type.googleapis.com/google.appengine.v1.OperationMetadataV1",
"endTime": "2021-07-02T19:10:58.770Z",
"insertTime": "2021-07-02T18:55:55.020Z",
"method": "google.appengine.v1.Versions.CreateVersion",
"target": "apps/munch-web/services/development/versions/20210702t185547",
"user": "498370915597#cloudbuild.gserviceaccount.com"
},
"name": "apps/munch-web/operations/8048d88b-1993-4155-ad6f-9322f88e44f3"
}
failed.
DEBUG: (gcloud.app.deploy) Error Response: [13] An internal error occurred.
Traceback (most recent call last):
File "/usr/lib/google-cloud-sdk/lib/googlecloudsdk/calliope/cli.py", line 982, in Execute
resources = calliope_command.Run(cli=self, args=args)
File "/usr/lib/google-cloud-sdk/lib/googlecloudsdk/calliope/backend.py", line 809, in Run
resources = command_instance.Run(args)
File "/usr/lib/google-cloud-sdk/lib/surface/app/deploy.py", line 130, in Run
use_legacy_apis=args.use_legacy_apis)
File "/usr/lib/google-cloud-sdk/lib/googlecloudsdk/command_lib/app/deploy_util.py", line 691, in RunDeploy
service_account=service_account)
File "/usr/lib/google-cloud-sdk/lib/googlecloudsdk/command_lib/app/deploy_util.py", line 463, in Deploy
extra_config_settings, service_account)
File "/usr/lib/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/appengine_api_client.py", line 213, in DeployService
poller=done_poller)
File "/usr/lib/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/operations_util.py", line 314, in WaitForOperation
sleep_ms=retry_interval)
File "/usr/lib/google-cloud-sdk/lib/googlecloudsdk/api_lib/util/waiter.py", line 264, in WaitFor
sleep_ms, _StatusUpdate)
File "/usr/lib/google-cloud-sdk/lib/googlecloudsdk/api_lib/util/waiter.py", line 326, in PollUntilDone
sleep_ms=sleep_ms)
File "/usr/lib/google-cloud-sdk/lib/googlecloudsdk/core/util/retry.py", line 243, in RetryOnResult
if not should_retry(result, state):
File "/usr/lib/google-cloud-sdk/lib/googlecloudsdk/api_lib/util/waiter.py", line 320, in _IsNotDone
return not poller.IsDone(operation)
File "/usr/lib/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/operations_util.py", line 183, in IsDone
encoding.MessageToPyValue(operation.error)))
googlecloudsdk.api_lib.app.operations_util.OperationError: Error Response: [13] An internal error occurred.
ERROR: (gcloud.app.deploy) Error Response: [13] An internal error occurred.
I can't seem to pinpoint where the issue is here. The crazy part is when I run this pipeline locally on my machine it deploys just fine with no issues to AppEngine.
Any idea where I can start troubleshooting?
It happened exactly at this time for us ! we checked lots of thing but finally emailed to google cloud support service and it was them bug not us! and they fixed it.
Related
I have inherited a php codebase that uses google appengine, so I have a fully built app locally that I am trying to deploy. But when I run:
gcloud app deploy --project project-name --verbosity=debug
I get the error below. I don't understand the staging command error because in the app.yaml I specify runtime: php55. I don't know what the API endpoint error means, and I also don't understand why no app was found. Any help on any of these errors would be much appreciated.
DEBUG: Running [gcloud.app.deploy] with arguments: [--project:
"project-name", --verbosity: "debug"] DEBUG: No staging command found
for runtime [php55] and environment [STANDARD]. DEBUG: API endpoint:
[https://appengine.googleapis.com/], API version: [v1] DEBUG: No app
found: Traceback (most recent call last): File
"/Users/myname/Downloads/google-cloud-sdk/lib/googlecloudsdk/command_lib/app/deploy_util.py",
line 679, in _PossiblyCreateApp
return api_client.GetApplication() File "/Users/myname/Downloads/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/appengine_api_client.py",
line 66, in GetApplication
return self.client.apps.Get(request) File "/Users/myname/Downloads/google-cloud-sdk/lib/googlecloudsdk/third_party/apis/appengine/v1/appengine_v1_client.py",
line 1124, in Get
config, request, global_params=global_params) File "/Users/myname/Downloads/google-cloud-sdk/lib/third_party/apitools/base/py/base_api.py",
line 722, in _RunMethod
return self.ProcessHttpResponse(method_config, http_response, request) File
"/Users/myname/Downloads/google-cloud-sdk/lib/third_party/apitools/base/py/base_api.py",
line 728, in ProcessHttpResponse
self.__ProcessHttpResponse(method_config, http_response, request)) File
"/Users/myname/Downloads/google-cloud-sdk/lib/third_party/apitools/base/py/base_api.py",
line 599, in __ProcessHttpResponse
http_response, method_config=method_config, request=request) HttpNotFoundError: HttpError accessing
https://appengine.googleapis.com/v1/apps/project-name?alt=json:
response: <{'status': '404', 'content-length': '136',
'x-xss-protection': '0', 'x-content-type-options': 'nosniff',
'transfer-encoding': 'chunked', 'vary': 'Origin, X-Origin, Referer',
'server': 'ESF', '-content-encoding': 'gzip', 'cache-control':
'private', 'date': 'Tue, 24 Sep 2019 22:49:44 GMT', 'x-frame-options':
'SAMEORIGIN', 'alt-svc': 'quic=":443"; ma=2592000; v="46,43"',
'content-type': 'application/json; charset=UTF-8'}>, content <{
"error": {
"code": 404,
"message": "Could not find Application \"project-name\".",
"status": "NOT_FOUND" } }
The value for --project must correspond to a Google Cloud Platform project ID.
It's unclear whether you replaced your actual project ID (NB Project IDs and Project names are distinct properties, see link) with project-name when you pasted your question.
One way to verify that the project exists would be to:
gcloud projects describe [[PROJECT]]
Assuming the project exists, a second consideration is that (since you're not specifying deployables), the command assumes the working directory contains an app.yaml (App Engine app configuration) file.
I am trying to deploy a go 1.11 runtime that used to work, but recently I've been getting: ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: unable to resolve source errors.
Nothing in my app.yaml has changed, and the error message isn't helpful to understand what the issue could be. I ran it with the --verbosity=debug flag and get:
Building and pushing image for service [apiv1]
DEBUG: Could not call git with args ('config', '--get-regexp', 'remote\\.(.*)\\.url'): Command '['git', 'config', '--get-regexp', 'remote\\.(.*)\\.url']' returned non-zero exit status 1
INFO: Could not generate [source-context.json]: Could not list remote URLs from source directory: /var/folders/18/k3w6w7f169xg4mypdwj7p4_c0000gn/T/tmp6IkZKx/tmphibUAo
Stackdriver Debugger may not be configured or enabled on this application. See https://cloud.google.com/debugger/ for more information.
INFO: Uploading [/var/folders/18/k3w6w7f169xg4mypdwj7p4_c0000gn/T/tmpVHKXol/src.tgz] to [staging.wildfire-app-backend.appspot.com/asia.gcr.io/wildfire-app-backend/appengine/apiv1.20190506t090359:latest]
DEBUG: Using runtime builder root [gs://runtime-builders/]
DEBUG: Loading runtimes manifest from [gs://runtime-builders/runtimes.yaml]
INFO: Reading [<googlecloudsdk.api_lib.storage.storage_util.ObjectReference object at 0x105ca9b10>]
DEBUG: Resolved runtime [go1.11] as build configuration [gs://runtime-builders/go-1.11-builder-20181217154124.yaml]
INFO: Using runtime builder [gs://runtime-builders/go-1.11-builder-20181217154124.yaml]
INFO: Reading [<googlecloudsdk.api_lib.storage.storage_util.ObjectReference object at 0x105b03b50>]
DEBUG: (gcloud.app.deploy) INVALID_ARGUMENT: unable to resolve source
Traceback (most recent call last):
File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/googlecloudsdk/calliope/cli.py", line 985, in Execute
resources = calliope_command.Run(cli=self, args=args)
File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/googlecloudsdk/calliope/backend.py", line 795, in Run
resources = command_instance.Run(args)
File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/surface/app/deploy.py", line 90, in Run
parallel_build=False)
File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/googlecloudsdk/command_lib/app/deploy_util.py", line 636, in RunDeploy
flex_image_build_option=flex_image_build_option)
File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/googlecloudsdk/command_lib/app/deploy_util.py", line 411, in Deploy
image, code_bucket_ref, gcr_domain, flex_image_build_option)
File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/googlecloudsdk/command_lib/app/deploy_util.py", line 287, in _PossiblyBuildAndPush
self.deploy_options.parallel_build)
File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/deploy_command_util.py", line 450, in BuildAndPushDockerImage
return _SubmitBuild(build, image, project, parallel_build)
File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/deploy_command_util.py", line 483, in _SubmitBuild
build, project=project)
File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/googlecloudsdk/api_lib/cloudbuild/build.py", line 149, in ExecuteCloudBuild
build_op = self.ExecuteCloudBuildAsync(build, project)
File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/googlecloudsdk/api_lib/cloudbuild/build.py", line 133, in ExecuteCloudBuildAsync
build=build,))
File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/googlecloudsdk/third_party/apis/cloudbuild/v1/cloudbuild_v1_client.py", line 205, in Create
config, request, global_params=global_params)
File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/third_party/apitools/base/py/base_api.py", line 731, in _RunMethod
return self.ProcessHttpResponse(method_config, http_response, request)
File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/third_party/apitools/base/py/base_api.py", line 737, in ProcessHttpResponse
self.__ProcessHttpResponse(method_config, http_response, request))
File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/third_party/apitools/base/py/base_api.py", line 604, in __ProcessHttpResponse
http_response, method_config=method_config, request=request)
HttpBadRequestError: HttpError accessing <https://cloudbuild.googleapis.com/v1/projects/wildfire-app-backend/builds?alt=json>: response: <{'status': '400', 'content-length': '114', 'x-xss-protection': '0'
, 'x-content-type-options': 'nosniff', 'transfer-encoding': 'chunked', 'vary': 'Origin, X-Origin, Referer', 'server': 'ESF', '-content-encoding': 'gzip', 'cache-control': 'private', 'date': 'Mon, 06 May 2
019 16:04:41 GMT', 'x-frame-options': 'SAMEORIGIN', 'alt-svc': 'quic=":443"; ma=2592000; v="46,44,43,39"', 'content-type': 'application/json; charset=UTF-8'}>, content <{
"error": {
"code": 400,
"message": "unable to resolve source",
"status": "INVALID_ARGUMENT"
}
}
>
ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: unable to resolve
Any advice would be useful, I also tried it with gcloud beta, I rotated my credentials and was of no use. My user has Owner role, but I added individually all the roles that might be necessary
App Engine Admin
App Engine Code Viewer
App Engine Deployer
App Engine Service Admin
Project Billing Manager
Cloud Build Service Account
Cloud Build Editor
Cloud Build Viewer
Owner
Storage Admin
Try disabling and enabling the Cloud Build API in your project so a new service account is created, then try to deploy again.
This ensures that Cloud Build has permission to start builds (the service account name should look like project-number#cloudbuild.gserviceaccount.com).
I found that it took a while for the API permissions to propagate fully.
I had this error after enabling the App Engine Admin API, but I waited a few minutes and tried again and it worked fine.
Cloud Build uses a service account instead of your user credential, so adding roles to your user won't help in this case.
You should be able to manually add the service account, [project-number]#cloudbuild.gserviceaccount.com, back to your account without re-enabling the API. Some users are known to delete random service accounts they don't recognize, which can sometimes cause this issue.
In summary, check if the service account exists. If so, give it all the roles it needs; if not, then create it and give it all the role it needs.
I'm encountering an issue when trying to run a simple BigQuery ETL pipeline with a flask app on Google App Engine in the flex environment.
It works when I run it locally, which I do by first starting it with flask run or gunicorn -b :$PORT main:app and then going to an endpoint in my browser, doing stuff on the page, and submitting a form. The POST handler for the page then invokes the Apache Beam pipeline. All of that works fine.
But when I deploy it with gcloud app deploy and try to access any endpoint I get a 502 error and the logs show the following:
2018-10-04 14:03:39 default[20181003t232620] Traceback (most recent call last): File "/env/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker worker.init_process() File "/env/local/lib/python2.7/site-packages/gunicorn/workers/base.py", line 129, in init_process self.load_wsgi() File "/env/local/lib/python2.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi self.wsgi = self.app.wsgi() File "/env/local/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi self.callable = self.load() File "/env/local/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load return self.load_wsgiapp() File "/env/local/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp return util.import_app(self.app_uri) File "/env/local/lib/python2.7/site-packages/gunicorn/util.py", line 350, in import_app __import__(module) File "/home/vmagent/app/main.py", line 15, in <module> import rw_bigquery_etl File "/home/vmagent/app/rw_bigquery_etl.py", line 9, in <module> import apache_beam as beam File "lib/apache_beam/__init__.py", line 88, in <module> from apache_beam import coders File "lib/apache_beam/coders/__init__.py", line 19, in <module> from apache_beam.coders.coders import * File "lib/apache_beam/coders/coders.py", line 30, in <module> from apache_beam.coders import coder_impl ImportError: lib/apache_beam/coders/coder_impl.so: invalid ELF header
2018-10-04 14:03:39 default[20181003t232620] [2018-10-04 14:03:39 +0000] [8] [INFO] Worker exiting (pid: 8)
2018-10-04 14:03:39 default[20181003t232620] [2018-10-04 14:03:39 +0000] [1] [INFO] Shutting down: Master
2018-10-04 14:03:39 default[20181003t232620] [2018-10-04 14:03:39 +0000] [1] [INFO] Reason: Worker failed to boot.
With the actual error being from apache_beam.coders import coder_impl ImportError: lib/apache_beam/coders/coder_impl.so: invalid ELF header
I had lots of issues with dependencies recently, so I just ran pip freeze > requirements.txt in the project folder, giving me this (pastebin). I've installed this to a lib folder in the project folder and have the line
vendor.add('lib') in appengine_config.py. Also, this is my app.yaml:
runtime: python
api_version: 1
threadsafe: true
env: flex
entrypoint: gunicorn -b :$PORT main:app
runtime_config:
python_version: 2
handlers:
- url: /.*
script: main.app
login: required
How can I resolve this issue, or go about troubleshooting it?
I'm new to Google Cloud and pip, so I'm still trying to understand how the cloud environment works, especially with python packages.
Consolidating python dependencies/requirements for apache beam is uniquely frustrating.
It would be helpful to see your
pipeline config
how you launch your pipeline locally
how you launch your pipeline remotely (your request handler code that launches it)
where your pipeline code sits relative to your project root
But it sounds like that requirements.txt you set up is the requirements.txt for your gae flex instance but not getting used for your dataflow worker. Possibly you supplied your requirements.txt as a commandline option when running locally and your server code is not supplying that same option.
Look at my answer here:
https://stackoverflow.com/a/51312281/4458510
I've had the best luck using a setup.py for my pipeline's dependencies, like they do in this example: https://github.com/apache/beam/tree/master/sdks/python/apache_beam/examples/complete/juliaset
I'm trying to run the example application hosted at: https://github.com/googlesamples/cloud-polymer-go, but when running it behind a proxy, I get the following errors:
$ goapp serve dispatch.yaml frontend/app.yaml backend/app.yaml
INFO 2015-10-13 13:04:19,461 devappserver2.py:763] Skipping SDK update check.
INFO 2015-10-13 13:04:19,526 api_server.py:205] Starting API server at: http://localhost:59441
INFO 2015-10-13 13:04:19,527 dispatcher.py:185] Starting dispatcher running at: http://localhost:8080
INFO 2015-10-13 13:04:19,529 dispatcher.py:197] Starting module "frontend" running at: http://localhost:8081
INFO 2015-10-13 13:04:19,534 dispatcher.py:197] Starting module "default" running at: http://localhost:8082
INFO 2015-10-13 13:04:19,534 admin_server.py:116] Starting admin server at: http://localhost:8000
INFO 2015-10-13 13:04:23,859 module.py:786] frontend: "GET / HTTP/1.1" 304 -
INFO 2015-10-13 13:04:23,870 module.py:786] frontend: "GET /elements/post-list.html HTTP/1.1" 304 -
INFO 2015-10-13 13:04:24,377 module.py:786] frontend: "GET /elements/post-service.html HTTP/1.1" 304 -
INFO 2015-10-13 13:04:24,377 module.py:786] frontend: "GET /elements/post-form.html HTTP/1.1" 304 -
INFO 2015-10-13 13:04:24,377 module.py:786] frontend: "GET /elements/post-card.html HTTP/1.1" 304 -
WARNING 2015-10-13 13:04:26,344 dispatcher.py:762] Skipping dispatch.yaml rules because /_ah/api/static/proxy.html is not a dispatchable path.
socket.error 101
Traceback (most recent call last):
File "/home/robert/applib/appEngine/go_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 1302, in communicate
req.respond()
File "/home/robert/applib/appEngine/go_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 831, in respond
self.server.gateway(self).respond()
File "/home/robert/applib/appEngine/go_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 2117, in respond
for chunk in response:
File "/home/robert/applib/appEngine/go_appengine/google/appengine/tools/devappserver2/endpoints/endpoints_server.py", line 121, in __call__
yield self.dispatch(request, start_response)
File "/home/robert/applib/appEngine/go_appengine/google/appengine/tools/devappserver2/endpoints/endpoints_server.py", line 138, in dispatch
start_response)
File "/home/robert/applib/appEngine/go_appengine/google/appengine/tools/devappserver2/endpoints/endpoints_server.py", line 172, in dispatch_non_api_requests
return dispatch_function(request, start_response)
File "/home/robert/applib/appEngine/go_appengine/google/appengine/tools/devappserver2/endpoints/endpoints_server.py", line 212, in handle_api_static_request
response, body = discovery_api.get_static_file(request.relative_url)
File "/home/robert/applib/appEngine/go_appengine/google/appengine/tools/devappserver2/endpoints/discovery_api_proxy.py", line 113, in get_static_file
connection.request('GET', path, None, {})
File "/usr/lib/python2.7/httplib.py", line 979, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python2.7/httplib.py", line 1013, in _send_request
self.endheaders(body)
File "/usr/lib/python2.7/httplib.py", line 975, in endheaders
self._send_output(message_body)
File "/usr/lib/python2.7/httplib.py", line 835, in _send_output
self.send(msg)
File "/usr/lib/python2.7/httplib.py", line 797, in send
self.connect()
File "/usr/lib/python2.7/httplib.py", line 1178, in connect
self.timeout, self.source_address)
File "/usr/lib/python2.7/socket.py", line 571, in create_connection
raise err
error: [Errno 101] Network is unreachable
The variables:
$ echo $http_proxy
http://asusis-isa2.personal.com.py:8080/
$ echo $https_proxy
http://asusis-isa2.personal.com.py:8080/
Are correctly set.
I works with a direct Internet connection.
I'm under Ubuntu 14.04.
EDIT Looks like there is a defect in the SDK around using a proxy with URLFetch.
https://code.google.com/p/googleappengine/issues/detail?id=544
Try setting the uppercase versions of those environment variables, HTTP_PROXY and HTTPS_PROXY. The gcloud launcher requires them that way so I assume goapp does as well.
Using an HTTP proxy
If you are running gcloud preview app behind an HTTP proxy, you must
tell gcloud preview app the name of the proxy. To set an HTTP proxy
for gcloud preview app, set the http_proxy and https_proxy environment
variables. Note that you must specify the full path for the app.yaml
file.
Using Windows (in Command Prompt):
$ set HTTP_PROXY=http://cache.mycompany.com:3128
$ set HTTPS_PROXY=http://cache.mycompany.com:3128
$ gcloud preview app deploy DIRECTORY/app.yaml
Using the command line in Mac OS X (in Terminal) or Linux:
$ export HTTP_PROXY="http://cache.mycompany.com:3128"
$ export HTTPS_PROXY="http://cache.mycompany.com:3128"
$ gcloud preview app deploy DIRECTORY/app.yaml
On a Mac OS X, trying to turn on the debug flag or to run the hello world test project for Go Managed VMs, I am getting the following error: AttributeError: 'module' object has no attribute 'CleanableContainerName'
Any ideas?
Full error log:
orcaman$ $(boot2docker shellinit)
Writing /Users/orcaman/.boot2docker/certs/boot2docker-vm/ca.pem
Writing /Users/orcaman/.boot2docker/certs/boot2docker-vm/cert.pem
Writing /Users/orcaman/.boot2docker/certs/boot2docker-vm/key.pem
orcaman$ gcloud --verbosity debug preview app setup-managed-vms
DEBUG: Running gcloud.preview.app.setup-managed-vms with _Args({'base_image_bucket': 'containers-prod',
'docker_host': None,
'format': None,
'h': None,
'help': None,
'image_version': 'latest',
'markdown': None,
'project': None,
'quiet': None,
'shell': None,
'user_output_enabled': None,
'verbosity': 'debug'}).
DEBUG: Detected docker environment variables: DOCKER_HOST=tcp://192.168.59.103:2376, DOCKER_CERT_PATH=/Users/orcaman/.boot2docker/certs/boot2docker-vm, DOCKER_TLS_VERIFY=1
INFO: Starting new HTTPS connection (1): 192.168.59.103
DEBUG: "GET /v1.10/_ping HTTP/1.1" 200 2
INFO: Looking for image_id for image with tag google/docker-registry
DEBUG: "GET /v1.10/images/json?filter=google%2Fdocker-registry&only_ids=1&all=0 HTTP/1.1" 200 253
DEBUG: Found Cloud SDK root: /Users/orcaman/google-cloud-sdk
Select the runtime to download the base image for:
[1] Go
[2] Java
[3] Python27
[4] All
Please enter your numeric choice (4): 1
DEBUG: Detected docker environment variables: DOCKER_HOST=tcp://192.168.59.103:2376, DOCKER_CERT_PATH=/Users/orcaman/.boot2docker/certs/boot2docker-vm, DOCKER_TLS_VERIFY=1
INFO: Starting new HTTPS connection (1): 192.168.59.103
DEBUG: "GET /v1.10/_ping HTTP/1.1" 200 2
Pulling base images for runtimes [go] from Google Cloud Storage
INFO: Refreshing access_token
DEBUG: Copy /Users/orcaman/.config/gcloud/legacy_credentials/orhiltch#gmail.com/.boto to /var/folders/dv/g8_pdljx49gdtbs25_1ch7vm0000gn/T/tmp7imPhg...
DEBUG: Copy /Users/orcaman/google-cloud-sdk/docker/true-asm to /var/folders/dv/g8_pdljx49gdtbs25_1ch7vm0000gn/T/tmp7imPhg...
Traceback (most recent call last):
File "/Users/orcaman/google-cloud-sdk/./lib/googlecloudsdk/gcloud/gcloud.py", line 177, in <module>
main()
File "/Users/orcaman/google-cloud-sdk/./lib/googlecloudsdk/gcloud/gcloud.py", line 173, in main
_cli.Execute()
File "/Users/orcaman/google-cloud-sdk/./lib/googlecloudsdk/calliope/cli.py", line 409, in Execute
post_run_hooks=self.__post_run_hooks, kwargs=kwargs)
File "/Users/orcaman/google-cloud-sdk/./lib/googlecloudsdk/calliope/frontend.py", line 274, in _Execute
pre_run_hooks=pre_run_hooks, post_run_hooks=post_run_hooks)
File "/Users/orcaman/google-cloud-sdk/./lib/googlecloudsdk/calliope/backend.py", line 928, in Run
result = command_instance.Run(args)
File "/Users/orcaman/google-cloud-sdk/lib/googlecloudsdk/appengine/app_commands/setup_managed_vms.py", line 39, in Run
args.image_version)
File "/Users/orcaman/google-cloud-sdk/./lib/googlecloudsdk/appengine/lib/images/pull.py", line 54, in PullBaseDockerImages
util.PullSpecifiedImages(docker_client, image_names, version, bucket)
File "/Users/orcaman/google-cloud-sdk/./lib/googlecloudsdk/appengine/lib/images/util.py", line 217, in PullSpecifiedImages
with credentials.CredentialsContainer(docker_client) as creds, (
File "/Users/orcaman/google-cloud-sdk/./lib/googlecloudsdk/appengine/lib/images/credentials.py", line 114, in __enter__
self.Start()
File "/Users/orcaman/google-cloud-sdk/./lib/googlecloudsdk/appengine/lib/images/credentials.py", line 95, in Start
name=containers.CleanableContainerName(
AttributeError: 'module' object has no attribute 'CleanableContainerName'
Docker/Boot2docker version:
bash-3.2$ docker version
Client version: 1.4.1
Client API version: 1.16
Go version (client): go1.3.3
Git commit (client): 5bc2ff8
OS/Arch (client): darwin/amd64
Server version: 1.4.1
Server API version: 1.16
Go version (server): go1.3.3
Git commit (server): 5bc2ff8
gcloud version:
gcloud version
Google Cloud SDK 0.9.42
app 2015.01.06
app-engine-go-darwin-x86_64 1.9.17
app-engine-java 1.9.17
app-engine-managed-vms 2014.11.03
app-engine-python 1.9.17
bq 2.0.18
bq-nix 2.0.18
compute 2015.01.06
core 2015.01.06
core-nix 2014.10.20
dns 2015.01.06
gcutil 1.16.5
gcutil-nix 1.16.5
gsutil 4.7
gsutil-nix 4.6
preview 2015.01.06
preview-extensions-darwin-x86_64 0.7.0
sql 2015.01.06
UPDATE:
The fix for gcloud is now available in the latest version and this issue should be resolved.
Previous Post:
As a temporary workaround you can run:
gcloud components restore
There may be a bug in the latest gcloud update. I saw the same error after updating - but is working now after running the above command.