3
votes

I created an App Engine project on Google Cloud Platform and followed a very basic quick start tutorial for Go, but when trying to deploy my app using gcloud app deploy it is looking like it's trying to deploy using Docker (flexible environment), whereas I want to deploy using the standard environment. How do I avoid Docker and deploy this app?

$ gcloud app deploy
<...>

Beginning deployment of service [default]...
╔════════════════════════════════════════════════════════════╗
╠═ Uploading 1 file to Google Cloud Storage                 ═╣
╚════════════════════════════════════════════════════════════╝
File upload done.
Updating service [default]...failed.                                                                                                                      
ERROR: (gcloud.app.deploy) Error Response: [9] Cloud build ... status: FAILURE.
Error ID: 581A171A.
Error type: BuildError.
Error message: 2019/07/25 23:59:26 Building from Go source in /tmp/staging/srv/gopath/src/<project_name>, with main package at <project_name>
2019/07/25 23:59:26 Building /tmp/staging/srv/gopath/src/<project_name>, saving to /tmp/staging/usr/local/bin/start
2019/07/25 23:59:30 Wrote build output to /builder/outputs/output
2019/07/25 23:59:30 Wrote output to /tmp/staging/usr/local/bin/start
2019/07/25 23:59:30 Making tarball /tmp/tar-out406385400/app.tar.gz
2019/07/25 23:59:31 Creating app image on GCR: <...>
2019/07/25 23:59:32 Failed to create app image on GCR: [/bin/appender.par --src-image us.gcr.io/gae-runtimes/go112:go112_20190613_1_12_6_RC00 --tarball /tmp/tar-out406385400/app.tar.gz --dst-image us.gcr.io/<project_name>/app-engine-tmp/app/ttl-2h:4d75e939-3879-42b5-8fec-da14ad651baf]: Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/bin/appender.par/__main__.py", line 90, in <module>
  File "/bin/appender.par/__main__.py", line 79, in main
  File "/bin/appender.par/containerregistry/client/v2_2/docker_session_.py", line 71, in __init__
  File "/bin/appender.par/containerregistry/client/v2_2/docker_http_.py", line 198, in __init__
  File "/bin/appender.par/containerregistry/client/v2_2/docker_http_.py", line 301, in _Refresh
containerregistry.client.v2_2.docker_http_.TokenRefreshException: Bad status during token exchange: 403
{"errors":[{"code":"DENIED","message":"Token exchange failed for project '<project_name>'. Access denied."}]}.
1
By checking the time you created the case, I can correlated to a Google outage Incident #19009[1]. The incident is marked as resolved now. In the future, if you experience an issue with a Google Cloud Product as in the case of running a quickstart guides, I encourage you to report the issue in the Public Issue Tracker under the right component. Available components can be found in [2]. If the issue still persist, please create a new issue. [1] status.cloud.google.com/incident/appengine/19009 [2] cloud.google.com/support/docs/issue-trackers - K F
make sure your app.yaml states that you're using standard environment, something like runtime: go111 - Anzel
@k-f All good, projects deploys this morning. Thanks for the information. - macu
It's also worth checking the cloud status page for service disruptions - filing issues in disruption conditions isn't very productive. - Dan Cornilescu

1 Answers

0
votes

I was getting the exact same error. I tried switching to another language just to make sure the error would still be related to access denied. My guess was the billing. I have an old account that I have never enabled billing. Neither the free trial $300. In the old times, we were able to register and deploy standard AppEngines without setting up billing. Once I enable billing (with those $300 free trial 😉) the deployment succeeded.