issues deploying modified docker image (custom image ) in google appengine - google-app-engine

I have been trying to deploy a modified docker image on google appengine from the google custom runtimes tutorial but it looks like there are errors that google cloud logs dont seem to show clearly.
Has anyone been able to ever make sense of these logs?
Updating service [default]...|DEBUG: Operation [apps/cobalt-door-118421/operations/c34145bb-3baf-4d1b-8e34-e39f0ec65743] not complete. Waiting 5s.
Updating service [default]...-DEBUG: Operation [apps/cobalt-door-118421/operations/c34145bb-3baf-4d1b-8e34-e39f0ec65743] not complete. Waiting 5s.
Updating service [default]...\DEBUG: Operation [apps/cobalt-door-118421/operations/c34145bb-3baf-4d1b-8e34-e39f0ec65743] not complete. Waiting 5s.
Updating service [default]...|DEBUG: Operation [apps/cobalt-door-118421/operations/c34145bb-3baf-4d1b-8e34-e39f0ec65743] not complete. Waiting 5s.
Updating service [default].../DEBUG: Operation [apps/myprojectid/operations/c34145bb-3baf-4d1b-8e34-e39f0ec65743] complete. Result: {
Updating service [default]...failed.
DEBUG: (gcloud.preview.app.deploy) Error Response: [13] Timed out when starting VMs. It's possible that the application code is unhealthy. (0/2 ready, 2 still deploying).
Traceback (most recent call last):
File "/home/japheth/Downloads/google-cloud-sdk/lib/googlecloudsdk/calliope/cli.py", line 715, in Execute
resources = args.calliope_command.Run(cli=self, args=args)
File "/home/japheth/Downloads/google-cloud-sdk/lib/googlecloudsdk/calliope/backend.py", line 1538, in Run
resources = command_instance.Run(args)
File "/home/japheth/Downloads/google-cloud-sdk/lib/surface/app/deploy.py", line 80, in Run
return deploy_util.RunDeploy(self, args, enable_endpoints=True)
File "/home/japheth/Downloads/google-cloud-sdk/lib/googlecloudsdk/command_lib/app/deploy_util.py", line 378, in RunDeploy
all_services)
File "/home/japheth/Downloads/google-cloud-sdk/lib/googlecloudsdk/command_lib/app/deploy_util.py", line 253, in Deploy
endpoints_info)
File "/home/japheth/Downloads/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/appengine_api_client.py", line 118, in DeployService
return operations.WaitForOperation(self.client.apps_operations, operation)
File "/home/japheth/Downloads/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/api/operations.py", line 70, in WaitForOperation
encoding.MessageToPyValue(completed_operation.error)))
OperationError: Error Response: [13] Timed out when starting VMs. It's possible that the application code is unhealthy. (0/2 ready, 2 still deploying).
ERROR: (gcloud.preview.app.deploy) Error Response: [13] Timed out when starting VMs. It's possible that the application code is unhealthy. (0/2 ready, 2 still deploying).
#WillHayworth The Dockerfile looks like this
#FROM nginx
FROM eu.gcr.io/myprojectid/nginx_september
COPY nginx.conf /etc/nginx/nginx.conf
RUN mkdir -p /var/log/app_engine
RUN mkdir /usr/local/installations
RUN mkdir -p /usr/share/nginx/www/_ah && \
echo "healthy" > /usr/share/nginx/www/_ah/health
ADD www/ /usr/share/nginx/www/
RUN chmod -R a+r /usr/share/nginx/www This is the example from google, notice I have FROM pointing to a custom image which is just the original nginx image but modified with say a command like mkdir /usr/local

Related

Why would an AppEngine deploy fail with a build failure?

I started working on an app and suddenly it fails to deploy to appengine, with the following error message:
siim#pebble:~/projects/xyz$ gcloud app deploy
Services to deploy:
descriptor: [/home/siim/projects/xyz/app.yaml]
source: [/home/siim/projects/xyz]
target project: [xyz]
target service: [default]
target version: [20220313t182940]
target url: [https://xyz.uc.r.appspot.com]
target service account: [App Engine default service account]
Do you want to continue (Y/n)? y
Beginning deployment of service [default]...
╔════════════════════════════════════════════════════════════╗
╠═ Uploading 2 files to Google Cloud Storage ═╣
╚════════════════════════════════════════════════════════════╝
File upload done.
Updating service [default]...failed.
ERROR: (gcloud.app.deploy) Error Response: [9] Cloud build 016c4604-6ea6-47df-8144-e7f1471c6df6 status: FAILURE
removing /layers/google.go.gomod/gopath: unlinkat /layers/google.go.gomod/gopath/pkg/mod/github.com/golang/protobuf#v1.3.1/regenerate.sh: permission denied
Full build logs: https://console.cloud.google.com/cloud-build/builds;region=us-central1/016c4604-6ea6-47df-8144-e7f1471c6df6?project=576574664421
Clicking through to the build log, I see:
===> DETECTING
google.go.appengine_gomod 0.9.0
google.go.gomod 0.9.0
google.go.build 0.9.0
google.go.appengine 0.9.0
google.utils.label 0.0.2
===> ANALYZING
Previous image with name "us.gcr.io/xyz/app-engine-tmp/app/default/ttl-18h:69af35b6-6fc6-4167-88f3-da16f9cfc7e7" not found
Restoring metadata for "google.go.gomod:gopath" from cache
===> RESTORING
Restoring data for "google.go.gomod:gopath" from cache
===> BUILDING
=== App Engine Gomod (google.go.appengine_gomod#0.9.0) ===
--------------------------------------------------------------------------------
Running "cp --dereference -R . /layers/google.go.appengine_gomod/srv"
Done "cp --dereference -R . /layers/google.go.appengine_gomod/srv" (53.220262ms)
=== Go - Gomod (google.go.gomod#0.9.0) ===
DEBUG: go.mod SHA has changed: clearing GOPATH layer's cache
Failure: (ID: f51775d1) removing /layers/google.go.gomod/gopath: unlinkat /layers/google.go.gomod/gopath/pkg/mod/github.com/golang/protobuf#v1.3.1/regenerate.sh: permission denied
--------------------------------------------------------------------------------
Running "mv -f /builder/outputs/output-5577006791947779410 /builder/outputs/output"
Done "mv -f /builder/outputs/output-5577006791947779410 /builder/o..." (5.980458ms)
ERROR: failed to build: exit status 1
I'm completely mystified by this. AFAICT this is something AppEngine does internally so I don't think I have any way to debug this further? FWIW, my app is super simple ATM:
module xyz
go 1.17
require (
github.com/go-chi/chi/v5 v5.0.7
go.etcd.io/bbolt v1.3.6
google.golang.org/appengine/v2 v2.0.1
)
require (
github.com/golang/protobuf v1.3.1 // indirect
golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d // indirect
)
And:
runtime: go116
main: ./cmd/server
The solution was to go to container registry (maybe artifact registry soon) in the cloud console and delete all the containers there. The issue was quite likely just one of those images (maybe the build cache one) but my app is not released so I could just delete all of them.
I resolve it using --no-cache option, but its not perfect because cache is not enabled.
$ gcloud app deploy app.yaml --no-cache

Gcloud app deploy - problems with .net HelloWorld

I am on the learning curve for gcloud app deploy. I have been struggling with running the .net HelloWorld example code from this location:
https://github.com/GoogleCloudPlatform/dotnet-docs-samples/tree/master/appengine/flexible/HelloWorld
The example runs fine on a desktop when I start it with Visual Studio. But, I can't get past the step of
running using "gcloud app deploy" from a cmd window. Below are details of two runs, first as an
out-of-the-box, and second as after adding a doocker file.
Is anyone else able to run the HelloWorld example as is with the current version of gcloud sdk?
Thanks for your help,
Bob
Here is the gcloud version info:
gcloud --version
Google Cloud SDK 299.0.0
bq 2.0.58
core 2020.06.26
gsutil 4.51
RUN 1
Here is the tail end of the gcloud output after a fresh install of gcloud sdk, and a fresh clone of
/dotnet-docs-samples/...
...
Step #0: Status: Downloaded newer image for gcr.io/gcp-runtimes/aspnetcorebuild#sha256:f5552a5efdaf278a3124ea10fd1c9636b09fc9f98f9e620cbd71279797576b3f
Step #0: gcr.io/gcp-runtimes/aspnetcorebuild#sha256:f5552a5efdaf278a3124ea10fd1c9636b09fc9f98f9e620cbd71279797576b3f
Step #0: No .deps.json file found for the app
Finished Step #0
ERROR
ERROR: build step 0 "gcr.io/gcp-runtimes/aspnetcorebuild#sha256:f5552a5efdaf278a3124ea10fd1c9636b09fc9f98f9e620cbd71279797576b3f" failed: step exited with non-zero status: 1
------------------------------------------------------------------------------------------------------------------------
ERROR: (gcloud.app.deploy) Cloud build failed. Check logs at https://console.cloud.google.com/cloud-build/builds/44677e0d-0fcb-4460-907b-835cbf621f5e?project=704308180369 Failure status: UNKNOWN: Error Response: [2] Build failed; check build logs for details
RUN 2
After some searching around, I found a suggestion to switch to using a custom runtime, and a docker file.
So I made two changes, one in the app.yaml file, and adding the docker file.
Here is the app.yaml file.
runtime: custom
env: flex
# This sample incurs costs to run on the App Engine flexible environment.
# The settings below are to reduce costs during testing and are not appropriate
# for production use. For more information, see:
# https://cloud.google.com/appengine/docs/flexible/python/configuring-your-app-with-app-yaml
manual_scaling:
instances: 1
resources:
cpu: 1
memory_gb: 4
disk_size_gb: 10
env_variables:
# The __ in My__Greeting will be translated to a : by ASP.NET.
My__Greeting: Hello AppEngine!
readiness_check:
app_start_timeout_sec: 600
Here is the Dockerfile. The file came from this location:
https://github.com/dotnet/dotnet-docker/blob/50e95cd9af6458ce0db21e6ec952e29c3ee1fadf/2.1/aspnet/alpine3.10/amd64/Dockerfile
ARG REPO=mcr.microsoft.com/dotnet/core/runtime-deps
FROM $REPO:2.1-alpine3.10
# Install ASP.NET Core
ENV ASPNETCORE_VERSION 2.1.15
RUN wget -O aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNETCORE_VERSION/aspnetcore-runtime-$ASPNETCORE_VERSION-linux-musl-x64.tar.gz \
&& aspnetcore_sha512='4a6ab78abc08c3e02c948de0af5fd324269785adad1b4e17bb849025ab280b7b8216cb48da5d480270cf3d596b342cedd4dc77eeaae82151fea44816e3856c69' \
&& echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \
&& mkdir -p /usr/share/dotnet \
&& tar -zxf aspnetcore.tar.gz -C /usr/share/dotnet \
&& rm aspnetcore.tar.gz \
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet
Here is the tail end of the run using the docker file.
...
},
"handlers": [
{
"script": {
"scriptPath": "PLACEHOLDER"
},
"urlRegex": ".*"
}
],
"manualScaling": {
"instances": 1
},
"resources": {
"cpu": 1.0,
"diskGb": 10,
"memoryGb": 0.5
},
"runtime": "vm"
}"
DEBUG: Operation [apps/solitairesupport/operations/a41d48d9-6fc8-422b-84b6-1e18b3a70162] not complete. Waiting to retry.
Updating service [default] (this may take several minutes).../DEBUG: Operation [apps/solitairesupport/operations/a41d48d9-6fc8-422b-84b6-1e18b3a70162] not complete. Waiting to retry.
Updating service [default] (this may take several minutes)...-DEBUG: Operation [apps/solitairesupport/operations/a41d48d9-6fc8-422b-84b6-1e18b3a70162] not complete. Waiting to retry.
[MANY LINES REMOVED HERE]
Updating service [default] (this may take several minutes)...-DEBUG: Operation [apps/solitairesupport/operations/a41d48d9-6fc8-422b-84b6-1e18b3a70162] not complete. Waiting to retry.
Updating service [default] (this may take several minutes).../DEBUG: Operation [apps/solitairesupport/operations/a41d48d9-6fc8-422b-84b6-1e18b3a70162] complete. Result: {
"done": true,
"error": {
"code": 9,
"message": "\nApplication startup error! Code: APP_CONTAINER_CRASHED\n"
},
"metadata": {
"#type": "type.googleapis.com/google.appengine.v1.OperationMetadataV1",
"insertTime": "2020-07-03T17:06:36.191Z",
"method": "google.appengine.v1.Versions.CreateVersion",
"target": "apps/solitairesupport/services/default/versions/20200703t100554",
"user": "xxxx#gmail.com"
},
"name": "apps/solitairesupport/operations/a41d48d9-6fc8-422b-84b6-1e18b3a70162"
}
Updating service [default] (this may take several minutes)...failed.
DEBUG: (gcloud.app.deploy) Error Response: [9]
Application startup error! Code: APP_CONTAINER_CRASHED
Traceback (most recent call last):
File "...AppData\Local\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\calliope\cli.py", line 983, in Execute
resources = calliope_command.Run(cli=self, args=args)
File "...\Local\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\calliope\backend.py", line 807, in Run
resources = command_instance.Run(args)
File "...\Local\Google\Cloud SDK\google-cloud-sdk\lib\surface\app\deploy.py", line 117, in Run
default_strategy=flex_image_build_option_default))
File "...\Local\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\command_lib\app\deploy_util.py", line 651, in RunDeploy
ignore_file=args.ignore_file)
File "...\Local\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\command_lib\app\deploy_util.py", line 437, in Deploy
extra_config_settings)
File "...\Local\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\api_lib\app\appengine_api_client.py", line 208, in DeployService
poller=done_poller)
File "...\Local\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\api_lib\app\operations_util.py", line 314, in WaitForOperation
sleep_ms=retry_interval)
File "...\Local\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\api_lib\util\waiter.py", line 264, in WaitFor
sleep_ms, _StatusUpdate)
File "...\Local\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\api_lib\util\waiter.py", line 326, in PollUntilDone
sleep_ms=sleep_ms)
File "...\Local\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\core\util\retry.py", line 229, in RetryOnResult
if not should_retry(result, state):
File "...\Local\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\api_lib\util\waiter.py", line 320, in _IsNotDone
return not poller.IsDone(operation)
File "...\Local\Google\Cloud SDK\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: [9]
Application startup error! Code: APP_CONTAINER_CRASHED
ERROR: (gcloud.app.deploy) Error Response: [9]
Application startup error! Code: APP_CONTAINER_CRASHED
Ok, I'm familiar with Google Cloud Platform but not (now) as familiar with .NET.
I'm using Linux (!) and Cloud Shell:
gcloud alpha cloud-shell ssh
I cloned the repo and made no other changes to it.
I am able to run the project locally and test it:
dotnet run
and, from another shell:
curl localhost:8080
Hello World!
NOTE it's unstated (perhaps obvious) but you must dotnet run (better dotnet publish) to create the ./bin/Debug directory.
I created a project, set up billing, created an app engine app:
PROJECT="[[YOUR-PROJECT-ID]]"
BILLING="[[YOUR-BILLING-ID]]"
REGION="[[YOUR-REGION]]"
gcloud projects create ${PROJECT}
gcloud beta billing projects link ${PROJECT} --billing-account=${BILLING}
gcloud app create --project=${PROJECT} --region=${REGION}
Then, per documentation:
dotnet publish
The contents of ./bin/Debug/netcoreapp2.1/publish:
56 Jul 6 16:23 appsettings.json
544 Jul 6 16:23 app.yaml
223992 Jul 6 16:27 HelloWorld.deps.json
8192 Jul 6 16:27 HelloWorld.dll
1708 Jul 6 16:27 HelloWorld.pdb
213 Jul 6 16:27 HelloWorld.runtimeconfig.json
516 Jul 6 16:30 web.config
NOTE contains app.yaml and HelloWorld.deps.json
Then:
gcloud app deploy ./bin/Debug/netcoreapp2.1/publish/app.yaml \
--project=${PROJECT}
And:
ENDPOINT=$(\
gcloud app describe \
--project=${PROJECT} \
--format="value(defaultHostname)")
curl ${ENDPOINT}
Hello AppEngine!
Then, in the ./appengine/flexible/HelloWorld directory, I created Dockerfile:
FROM mcr.microsoft.com/dotnet/core/sdk:2.1 AS builder
WORKDIR /source
COPY *.sln .
COPY *.csproj .
RUN dotnet restore
COPY . .
RUN dotnet publish -c release -o /app --no-restore
FROM mcr.microsoft.com/dotnet/core/aspnet:2.1
WORKDIR /app
COPY --from=builder /app ./
ENTRYPOINT ["dotnet", "HelloWorld.dll"]
NOTE using this as a guide.
NOTE I downgraded to 2.1 (rather than 3.1) to avoid a dotnet build error but that's due to my unfamiliarity with the runtime(s).
I changed Program.cs to force the use of :8080:
public static IWebHost BuildWebHost(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>()
.UseUrls("http://0.0.0.0:8080")
.Build();
}
I revised app.yaml to use custom runtime:
runtime: custom
env: flex
Then:
gcloud app deploy --project=${PROJECT}
Works.

GAE deploying results in an error

I'm trying to deploy my projet on Google App Engine. It previously worked successfully but since yesterday, I can't deploy it.
I get the following error :
File upload done.
Updating service [default]...failed.
ERROR: (gcloud.app.deploy) Error Response: [13] The system encountered a fatal error
When looking at the log file, I get the following :
2017-02-17 10:15:51,710 DEBUG root Operation [apps/my-project/operations/4aced3ef-a018-4913-9a5b-b3f8f13ed4ae] not complete. Waiting 5s.
2017-02-17 10:15:56,876 DEBUG root Operation [apps/my-project/operations/4aced3ef-a018-4913-9a5b-b3f8f13ed4ae] not complete. Waiting 5s.
2017-02-17 10:16:02,173 DEBUG root Operation [apps/my-project/operations/4aced3ef-a018-4913-9a5b-b3f8f13ed4ae] not complete. Waiting 5s.
2017-02-17 10:16:07,352 DEBUG root Operation [apps/my-project/operations/4aced3ef-a018-4913-9a5b-b3f8f13ed4ae] not complete. Waiting 5s.
2017-02-17 10:16:12,654 DEBUG root Operation [apps/my-project/operations/4aced3ef-a018-4913-9a5b-b3f8f13ed4ae] not complete. Waiting 5s.
2017-02-17 10:16:17,817 DEBUG root Operation [apps/my-project/operations/4aced3ef-a018-4913-9a5b-b3f8f13ed4ae] not complete. Waiting 5s.
2017-02-17 10:16:23,119 DEBUG root Operation [apps/my-project/operations/4aced3ef-a018-4913-9a5b-b3f8f13ed4ae] not complete. Waiting 5s.
2017-02-17 10:16:28,296 DEBUG root Operation [apps/my-project/operations/4aced3ef-a018-4913-9a5b-b3f8f13ed4ae] not complete. Waiting 5s.
2017-02-17 10:16:33,475 DEBUG root Operation [apps/my-project/operations/4aced3ef-a018-4913-9a5b-b3f8f13ed4ae] not complete. Waiting 5s.
2017-02-17 10:16:38,650 DEBUG root Operation [apps/my-project/operations/4aced3ef-a018-4913-9a5b-b3f8f13ed4ae] not complete. Waiting 5s.
2017-02-17 10:16:43,838 DEBUG root Operation [apps/my-project/operations/4aced3ef-a018-4913-9a5b-b3f8f13ed4ae] complete. Result: {
"metadata": {
"target": "apps/my-project/services/default/versions/20170217t100612",
"method": "google.appengine.v1.Versions.CreateVersion",
"user": "user#gmail.com",
"insertTime": "2017-02-17T09:06:34.800Z",
"ephemeralMessage": "Creating new version configuration in service \"20170217t100612\".",
"endTime": "2017-02-17T09:16:43.099Z",
"#type": "type.googleapis.com/google.appengine.v1.OperationMetadataV1"
},
"done": true,
"name": "apps/my-project/operations/4aced3ef-a018-4913-9a5b-b3f8f13ed4ae",
"error": {
"message": "The system encountered a fatal error",
"code": 13
}
}
2017-02-17 10:16:43,838 DEBUG root (gcloud.app.deploy) Error Response: [13] The system encountered a fatal error
Traceback (most recent call last):
File "/opt/google-cloud-sdk/lib/googlecloudsdk/calliope/cli.py", line 742, in Execute
resources = args.calliope_command.Run(cli=self, args=args)
File "/opt/google-cloud-sdk/lib/googlecloudsdk/calliope/backend.py", line 739, in Run
resources = command_instance.Run(args)
File "/opt/google-cloud-sdk/lib/surface/app/deploy.py", line 59, in Run
return deploy_util.RunDeploy(args)
File "/opt/google-cloud-sdk/lib/googlecloudsdk/command_lib/app/deploy_util.py", line 413, in RunDeploy
all_services)
File "/opt/google-cloud-sdk/lib/googlecloudsdk/command_lib/app/deploy_util.py", line 255, in Deploy
endpoints_info)
File "/opt/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/appengine_api_client.py", line 141, in DeployService
operation)
File "/opt/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/operations_util.py", line 142, in WaitForOperation
encoding.MessageToPyValue(completed_operation.error)))
OperationError: Error Response: [13] The system encountered a fatal error
2017-02-17 10:16:43,841 ERROR root (gcloud.app.deploy) Error Response: [13] The system encountered a fatal error
2017-02-17 10:16:44,726 DEBUG root Metrics reporting process started...
There is a lot of similar line like "2017-02-17 10:15:51,710 DEBUG root Operation [apps/my-project/operations/4aced3ef-a018-4913-9a5b-b3f8f13ed4ae] not complete. Waiting 5s.".
When I take a look at the "Activity" tab on the GAE web console, here's what I see :
Sorry it's in French. It's written :
10:16 - Successful operation : create a version of AppEngine
10:06 - Create a version of AppEngine
So I suspect the deployment worked, but took a lot of time to be deployed (10 minutes). Also you can see that it always take 10 minutes to be successfully done, on all my attempts.
What is wrong?
From recent google-cloud-sdk issue 1443 (same symptoms as far as I can tell):
We suspect from the backend logs that the application is actually
deploying successfully but that part that checks if the application is
ready to serve is in fact returning a false negative and thus,
returning the error message you received. It is then stuck in this
inaccurate state. I've added the internal tracking number of that
issue to this report as well.
Can you try issuing requests to that application/service before,
during and after attempting to deploy? The hypothesis is that this
request should provide a positive response to a health check. If this
is received during the troubling deployment, it may trigger the
deployment to returning a positive when checking if the version is
ready to serve.
And the workaround suggestion worked:
As per your request: I issued requests before, during and after
deployment. The deployment was successful. 'gcloud app deploy'
returned normally without any errors reported I tested the GAE app and
indeed the code running in the GAE project is the newly deployed
version.

Unable to pull google/appengine-go docker image

I'm trying to deploy my appengine go application to managed vm, and I keep getting this error
Pulling image: google/appengine-go
Traceback (most recent call last):
File "/home/honeybooboo/google-cloud-sdk/./lib/googlecloudsdk/gcloud/gcloud.py", line 170, in <module>
main()
File "/home/honeybooboo/google-cloud-sdk/./lib/googlecloudsdk/gcloud/gcloud.py", line 166, in main
_cli.Execute()
File "/home/honeybooboo/google-cloud-sdk/./lib/googlecloudsdk/calliope/cli.py", line 385, in Execute
post_run_hooks=self.__post_run_hooks, kwargs=kwargs)
File "/home/honeybooboo/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 "/home/honeybooboo/google-cloud-sdk/./lib/googlecloudsdk/calliope/backend.py", line 928, in Run
result = command_instance.Run(args)
File "/home/honeybooboo/google-cloud-sdk/lib/googlecloudsdk/appengine/app_commands/setup_managed_vms.py", line 39, in Run
args.image_version)
File "/home/honeybooboo/google-cloud-sdk/./lib/googlecloudsdk/appengine/lib/images/pull.py", line 54, in PullBaseDockerImages
util.PullSpecifiedImages(docker_client, image_names, version, bucket)
File "/home/honeybooboo/google-cloud-sdk/./lib/googlecloudsdk/appengine/lib/images/util.py", line 232, in PullSpecifiedImages
'Error pulling {image}: {e}'.format(image=image_name, e=e))
googlecloudsdk.appengine.lib.images.util.DockerPullError: Error pulling google/appengine-go: 404 Client Error: Not Found ("No such id: localhost:49156/google/appengine-go")
My docker version
Client version: 1.3.0
Client API version: 1.15
Go version (client): go1.3.3
Git commit (client): c78088f
OS/Arch (client): linux/amd64
Server version: 1.3.0
Server API version: 1.15
Go version (server): go1.3.3
Git commit (server): c78088f
My Gcloud version
Google Cloud SDK 0.9.37
app 2014.11.18
app-engine-go-linux-x86_64 1.9.15
app-engine-java 1.9.15a
app-engine-managed-vms 2014.11.03
app-engine-python 1.9.15a
app-engine-python-extras 1.9.6
bq 2.0.18
bq-nix 2.0.18
compute 2014.11.25
core 2014.11.25
core-nix 2014.10.20
dns 2014.11.06
gae-go 2014.11.25
gae-go-nix 2014.09.10
gae-python 2014.05.06
gcutil 1.16.5
gcutil-nix 1.16.5
gsutil 4.6
gsutil-nix 4.6
preview 2014.11.18
preview-extensions-linux-x86_64 4.1
sql 2014.11.18
Sorry that you're having problems. We're aware of this issue and it is already fixed in the next SDK release (coming out in a week). As a temporary workaround please try to run
gcloud --verbosity debug preview app setup-managed-vms
(and choose Go in the list of options)
several times (until success) to get the base image for go runtime.
Another options is to try pulling the base go image (google/appengine-go) from containers-prod
bucket using google/docker-registry https://registry.hub.docker.com/u/google/docker-registry/
Pull the google/docker-registry
docker pull google/docker-registry
Get your credentials
gcloud auth print-refresh-token
Store your refresh token and your bucket (containers prod in a registry-params.env file)
cat registry-params.env
GCP_OAUTH2_REFRESH_TOKEN=your-refresh-token
GCS_BUCKET=containers-prod
Run registry
docker run -d --env-file=registry-params.env -p 5000:5000 google/docker-registry
Pull the image
docker pull localhost:5000/google/appengine-go
Retag the image
docker tag localhost:5000/google/appengine-go google/appengine-go
Remove old tag containing registry name
docker rmi localhost:5000/google/appengine-go
Check your image is in there. You'll see something like
docker images | grep google
You'll see something like
google/appengine-go latest 35ef8e2a9c5e 13 days ago 206 MB
Don't forget to stop your registry container
docker ps
docker stop <CONTAINER ID>

Glide/Gaelyk/Groovy: Error deploying to Google App Engine: Can’t enter oauth2 token

As part of the deployment process of a Glide project (http://glide-gae.appspot.com/docs/intro step 3 of 2nd section) you need to authenticate using oauth2. My browser popped up with the token as expected but the process didn’t wait for me to copy the code in, it just carried on with the following error...
22:30:12.713 [DEBUG] [org.gradle.launcher.daemon.server.DaemonStateCoordinator] Daemon is busy, sleeping until state changes.
22:30:12.733 [INFO] [org.gradle.launcher.daemon.server.exec.LogToClient] About to start relaying all logs to the client via the connection.
22:30:12.734 [INFO] [org.gradle.launcher.daemon.server.exec.LogToClient] The client will now receive all logging from the daemon (pid: 12557). The daemon log file: /.gradle/daemon/1.8/daemon-12557.out.log
22:30:12.739 [DEBUG] [org.gradle.launcher.daemon.server.SynchronizedDispatchConnection] thread 14: received class org.gradle.launcher.daemon.protocol.CloseInput
22:30:12.740 [DEBUG] [org.gradle.launcher.daemon.server.DefaultDaemonConnection] Received IO message from client: CloseInput[id=069864b2-2948-4a9d-abea-0705274136a1.2]
22:30:12.741 [INFO] [org.gradle.launcher.daemon.server.exec.ForwardClientInput] Closing daemon's stdin at end of input.
22:30:12.742 [INFO] [org.gradle.launcher.daemon.server.exec.ForwardClientInput] The daemon will no longer process any standard input.
22:30:12.747 [INFO] [org.gradle.launcher.daemon.server.exec.ExecuteBuild] Executing build with daemon context: DefaultDaemonContext[uid=3901cff0-8d50-41b6-9459-e31f7b78f1e3,javaHome=/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home,daemonRegistryDir=.gradle/daemon,pid=12557,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=256m,-Xmx512m,-Dfile.encoding=UTF-8]
Please enter code: Encountered a problem: No line found
Please see the logs [/var/folders/c8/vx2jf50j68x1z3_pysy6kxjm0000gp/T/appcfg2389447403250678065.log] for further information.
Daemon vm is shutting down... The daemon has exited normally or was terminated in response to a user interrupt.
----- End of the daemon log -----
org.gradle.tooling.GradleConnectionException: Could not execute build using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.8-bin.zip'.
What can I do to be able to deploy my application? How can I force the process to wait for me to enter the code?
If that's (glide deploy) not working for you, the easiest option is to export the app as a standard gradle project and then execute the gaeUpdate task.
glide -a somedir/yourapp -o where/you/want/to/export/app export
Note that the export is command at the end, -o tell the location where it should be exported.
Then from the exported project run: gradle gaeUpdate
A work around is to manually set your credentials in the GAE build.gradle file.
Update the following file:
/glide/install/generated/app-name/build.gradle
appcfg {
email = ‘email-address'
password = ‘password'
app {
id = ‘app-id'
}
}
This means that the values from the __glide.groovy file are ignored, but at least you can get the application deployed

Resources