Deploying to flexible environment failure when accessing the docker image on us.gcr.io

3,285 views
Skip to first unread message

John Del Rosario

unread,
Aug 22, 2016, 10:36:11 PM8/22/16
to google-cloud-sdk
I'm exploring migrating our existing AppEngine app to Flexible Environment, but I'm running into issues deploying. 

The build process for the image is successful, and I can even browse the images in my project's Container Registry page (https://console.cloud.google.com/kubernetes/images/tags/appengine).

But the `deploy` command fails with the following message:

ERROR: (gcloud.app.deploy) Error Response: [3] Docker image us.gcr.io/my-project/appengine/flexibletest.20160822t162239:latest was either not found, or you do not have access to it.

So it seems I'm able to build and upload the images, browse them in the console UI, but I can't deploy?

Here's the complete output of the `deploy` command:
$ gcloud app deploy appengine/app.flexibletest.yaml --project=my-project
WARNING: The "module" parameter in application .yaml files is deprecated. Please use the "service" parameter instead.
You are about to deploy the following services:
 - my-project/flexibletest/20160822t162239 (from [/Users/john/Projects/my-project/appengine/app.flexibletest.yaml])

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

WARNING: We couldn't validate that your project is ready to deploy to App Engine Flexible Environment. If deployment fails, please try again.
Beginning deployment of service [flexibletest]...
WARNING: Deployment of App Engine Flexible Environment apps is currently in Beta
Building and pushing image for service [flexibletest]
Started cloud build [204fca53-083b-4484-80f3-b07a1f9444a9].
-------------------------------------- REMOTE BUILD OUTPUT ---------------------------------------
starting build "204fca53-083b-4484-80f3-b07a1f9444a9"

FETCHSOURCE
Downloading file:///tmp/source-archive.tgz:                      2.71 MiB/2.71 MiB
BUILD
Already have image (with digest): gcr.io/cloud-builders/docker
Sending build context to Docker daemon 10.06 MB
 ---> 41ee68b79e5f
Step 2 : ADD . /app/
 ---> 698042776bc1
Removing intermediate container 37b8f15bb236
Step 3 : RUN if [ -s requirements.txt ]; then pip install -r requirements.txt; fi
 ---> Running in 659bdca2190f

# ... installing python requirements ... #

 ---> 082585474ebc
Removing intermediate container 659bdca2190f
Successfully built 082585474ebc
PUSH
The push refers to a repository [us.gcr.io/my-project/appengine/flexibletest.20160822t162239] (len: 1)
082585474ebc: Preparing
082585474ebc: Pushing
082585474ebc: Pushed
698042776bc1: Preparing
698042776bc1: Pushing
698042776bc1: Pushed
41ee68b79e5f: Image already exists
160faa480f99: Image already exists
54af9b849c12: Image already exists
f7665061ea9b: Image already exists
f0ce2cd4c34e: Image already exists
1f36ec60b168: Image already exists
dba2cb21847e: Image already exists
0b438adde2bd: Image already exists
3ebe7e1dbd81: Image already exists
85da8a999491: Image already exists
6386685d47d6: Image already exists
33ef92ed9b42: Image already exists
d294b4850b25: Image already exists
096d9403d234: Image already exists
latest: digest: sha256:909bcac323b93f6df5d0a892208cbc79a0db37fc9f13eaf4cb9980755d0aa80f size: 52458
DONE
--------------------------------------------------------------------------------------------------

# ... removed ignored files warning ... #

File upload done.
Updating service [flexibletest]...failed.
ERROR: (gcloud.app.deploy) Error Response: [3] Docker image us.gcr.io/my-project/appengine/flexibletest.20160822t162239:latest was either not found, or you do not have access to it.

Justin Beckwith

unread,
Aug 23, 2016, 12:26:59 AM8/23/16
to John Del Rosario, Señor Luis Daniel Ballesteros, Mark Pellegrini, google-cloud-sdk
Greetings!  I've added a few engineers from our team who may be able to help out here.  We're taking a look.  

--
You received this message because you are subscribed to the Google Groups "google-cloud-sdk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sdk+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/google-cloud-sdk.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sdk/ee019e56-b5ee-431e-9b9d-d643ebbd9c6b%40googlegroups.com.



--

Justin Beckwith | Google Cloud Platform | @justinbeckwith | http://jbeckwith.com

周世恩

unread,
Aug 28, 2016, 8:43:24 PM8/28/16
to google-cloud-sdk, jo...@collabspot.com, lbal...@google.com, mark...@google.com
I found the problem.

I have a project which was created in 2012. There is no App Engine Default Service Account in service account list of my project so that I got the error ERROR: (gcloud.app.deploy) Error Response: [3] Docker image ... was either not found, or you do not have access to it. Are there any solutions to add App Engine Default Service Account back?
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-s...@googlegroups.com.

John Del Rosario

unread,
Aug 29, 2016, 7:39:59 AM8/29/16
to google-cloud-sdk, jo...@collabspot.com, lbal...@google.com, mark...@google.com
Interesting. Our project is pretty old as well, created around ~2012.

Justin Beckwith

unread,
Aug 29, 2016, 12:59:49 PM8/29/16
to John Del Rosario, google-cloud-sdk, Señor Luis Daniel Ballesteros, Mark Pellegrini
Alright, so this isn't pretty, but I have a fix for you :)  There's a `repair` endpoint in the App Engine Admin API that resolves these kinds of issues.  You can read about it here:


You can actually enter your project name in the appId field, click 'execute', and it will re-add the service account.  We obviously want to make this a little prettier, but hopefully that helps. 

Let us know if it works for you!

To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sdk+unsubscribe@googlegroups.com.

John Del Rosario

unread,
Sep 9, 2016, 1:21:30 PM9/9/16
to google-cloud-sdk, jo...@collabspot.com, lbal...@google.com, mark...@google.com
Hi,

Our project now has the App Engine Default Service Account, but when deploying I'm still getting the same error about the Docker image being unavailable or having no access to it.

@周世恩 is it working for you?

Fawad Niazi

unread,
Sep 16, 2016, 1:00:32 PM9/16/16
to google-cloud-sdk, jo...@collabspot.com, lbal...@google.com, mark...@google.com
Hi,

I'm Having the same issue, any update on this is much appreciated.

Señor Luis Daniel Ballesteros

unread,
Sep 20, 2016, 1:19:30 PM9/20/16
to Fawad Niazi, google-cloud-sdk, John Del Rosario, Mark Pellegrini
Could you verify that your Docker image is in v2 format?  This might cause us to be unable to use your image during deployment.

FAQ

I can help you debug this issue if you privately mail me your project id.

Tristan Shephard

unread,
Oct 12, 2016, 9:32:18 PM10/12/16
to google-cloud-sdk, fawad...@gmail.com, jo...@collabspot.com, mark...@google.com

I'm hitting the same issue, except my error message reads "was either not found, or is not in Docker V2 format." (which I believe is an update in the new SDK - I'm on version 127.)

According to my container registry the image is present and in V2 format, so I'm at a bit of a loss. I've deployed the same service successfully on a separate project.

Best,
Tristan

Igor Khrol

unread,
Oct 17, 2016, 3:31:28 PM10/17/16
to google-cloud-sdk, fawad...@gmail.com, jo...@collabspot.com, mark...@google.com
I have the same issues. http://stackoverflow.com/questions/40008503/error-deploying-gae-flex-service
What is strange that I'm able to deploy the application to some projects but not to other.

`gcloud app deploy ./src/main/appengine/app.yaml` gives me different results depending what google project is selected in `gcloud init`.
Reply all
Reply to author
Forward
0 new messages