Bookshelf Tutorial Issues

129 views
Skip to first unread message

Shakeel Mahate

unread,
Oct 20, 2015, 10:56:14 AM10/20/15
to google-appengine-go
I am following the cloud.google.com/go tutorials for the Helloworld and the Bookshelf app. The very first deployment of the bookshelf app resulted in an error while updating the module, the very last step before the VM is made active.

The error is about Repeated map keys for _gopath/src/golang.org/x/oauth2/google/google_test.go.

Here is the error message

Updating module [default]...failed.

ERROR: (gcloud.preview.app.deploy) Error Response: [400] Invalid JSON payload received. Unknown name "_gopath/src/golang.org/x/oauth2/google/google_test.go" at 'version.deployment.files[192]': Repeated map key: '_gopath/src/golang.org/x/oauth2/google/google_test.go' is already set.

Details: [

  [

    {

      "@type": "type.googleapis.com/google.rpc.BadRequest",

      "fieldViolations": [

        {

          "description": "Invalid JSON payload received. Unknown name \"_gopath/src/golang.org/x/oauth2/google/google_test.go\" at 'version.deployment.files[192]': Repeated map key: '_gopath/src/golang.org/x/oauth2/google/google_test.go' is already set.",

          "field": "version.deployment.files[192]"

        }

      ]

    }

  ]

]


Deleted [https://www.googleapis.com/compute/v1/projects/iar-apps/zones/us-central1-f/instances/gae-builder-vm-20151019t230930].

aedeploy: Error: unable to run "gcloud preview app deploy app.yaml --promote": exit status 1


I tried repeating the aedeploy step many times and always resulted in the same error.


So I deleted all of the content of gs://staging.myprojectid.appspot.com and retried the aedeploy, it failed again, but the next attempt was successful. So I have the bookshelf app now deployed and running on appspot.com


Here is the output of aedeploy when it was successful


opying files to Google Cloud Storage...

Synchronizing files to [gs://staging.iar-apps.appspot.com/].

Updating module [default].../Deleted [https://www.googleapis.com/compute/v1/projects/iar-apps/zones/us-central1-f/instances/gae-builder-vm-20151019t225002].

Updating module [default]...done.

Deployed module [default] to [https://iar-apps.appspot.com]


But then when I tried to redeploy it again using the aedeploy command "aedeploy gcloud preview app deploy app.yaml --promote", I get the same error about the repeated map key.


I am able to run the bookshelf app locally on my machine.


I tried the aedeploy with --promote and --set-default options, but I get the same error.


My go version is go1.5.1 darwin/amd64


Anybody else seen this issue? Any pointers on how to proceed?


Shakeel


Glenn Lewis

unread,
Oct 20, 2015, 11:47:12 AM10/20/15
to Shakeel Mahate, google-appengine-go
The appears to be a known problem that the team is working on.  I'll update this thread when I get more information.
-- Glenn

--
You received this message because you are subscribed to the Google Groups "google-appengine-go" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengin...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Shakeel Mahate

unread,
Oct 20, 2015, 11:54:58 AM10/20/15
to google-appengine-go
Thanks Glenn, is there an issue list where I can follow it? Is there a work around?  I wish I knew about this problem before spending hours on it, sigh

Glenn Lewis

unread,
Oct 20, 2015, 1:18:11 PM10/20/15
to Shakeel Mahate, google-appengine-go
There is no public link that I know of where you can follow this issue and no known workarounds at present.  Sorry for the problems.
-- Glenn

Shakeel Mahate

unread,
Oct 20, 2015, 5:08:54 PM10/20/15
to google-appengine-go, shakeel...@gmail.com
Would packaging the bookshelf app on the local machine and then deploying it work, instead of using aedeploy? Is the issue with just aedeploy or something else?

The Bookshelf Tutorial has the following steps to build and deploy the binary and startup the VM, https://cloud.google.com/go/getting-started/run-on-compute-engine Is it worth spending the time or should I just wait?
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine-go+unsub...@googlegroups.com.

Glenn Lewis

unread,
Oct 20, 2015, 7:15:29 PM10/20/15
to Shakeel Mahate, google-appengine-go
Being worth the time to experiment is up to you.
The issue is not with aedeploy... the issue is with the back-end deployment mechanism.  Hopefully we will have a resolution soon.
-- Glenn

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

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "google-appengine-go" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengin...@googlegroups.com.

Glenn Lewis

unread,
Oct 20, 2015, 7:17:18 PM10/20/15
to Shakeel Mahate, google-appengine-go
Update: the deployment team is asking for a small test case that demonstrates and reproduces the problem.
Do you have a small test case with instructions on how to reproduce the error that I can give to the deployment team?
Thanks.
-- Glenn

Chris Broadfoot

unread,
Oct 20, 2015, 7:38:05 PM10/20/15
to Glenn Lewis, Shakeel Mahate, google-appengine-go
One workaround. Use the old deployment method:

$ gcloud config set app/use_appengine_api false

Chris Broadfoot

unread,
Oct 20, 2015, 7:44:14 PM10/20/15
to Glenn Lewis, Shakeel Mahate, google-appengine-go
Also - I just tried deploying the bookshelf app, and it works. 

Shakeel Mahate

unread,
Oct 20, 2015, 11:01:54 PM10/20/15
to google-appengine-go, gml...@google.com, shakeel...@gmail.com
I was following the steps in the tutorial, nothing unusual in what I did, the same go get code and aedeploy. I know it worked once for me, but it fails consistently. Let me know if I should send some files over
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine-go+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "google-appengine-go" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine-go+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "google-appengine-go" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine-go+unsub...@googlegroups.com.

Shakeel Mahate

unread,
Oct 20, 2015, 11:43:13 PM10/20/15
to google-appengine-go, gml...@google.com, shakeel...@gmail.com
Once I update the gcloud config what should be my next step? aedploy again or something else.

I am also confused about aedeploy preview app deploy app.yaml --set-default command, when it worked for the helloworld and bookshelf app, the Cloud Console Home page shows that I have two Compute Engine instances and zero App Engine instances.

The gcloud preview app command documentation seems to imply it is for configuring appengine.

The cloud.google.com/go tutorial seems to imply that I am running a managed VM instance.

It's a bit muddy, what exactly is happening, are we using the google appengine to deploy a VM instance, or is the golang appengine instance a VM instance.

I am returning new to GAE after an absence of 3 years or more, a lot has changed since then, I guess.
 
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine-go+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "google-appengine-go" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine-go+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "google-appengine-go" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine-go+unsub...@googlegroups.com.

Glenn Lewis

unread,
Oct 21, 2015, 1:12:51 PM10/21/15
to Shakeel Mahate, google-appengine-go
Yes, it can be a bit confusing.

For Go on App Engine apps, there are currently two options... "classic" apps and Managed VM apps ("vm: true" in your app.yaml file).
For "classic" Go App Engine apps, you will want to download and use the stand-alone Go App Engine SDK and focus your attention on the documentation that says "App Engine": https://cloud.google.com/appengine/docs/go/
For "Managed VM" Go apps, you will want to download and use the Cloud SDK and focus your attention on the documentation that says "Managed VMs": https://cloud.google.com/appengine/docs/go/managed-vms/
For Google Compute Engine (VMs), you will want to also use the Cloud SDK and check out documentation for GCE: https://cloud.google.com/go/getting-started/run-on-compute-engine

aedeploy is used to deploy Managed VM Go apps to production in combination with the "gcloud" command from the Cloud SDK.
More information about aedeploy can be found here: https://cloud.google.com/appengine/docs/managed-vms/sdk#deploy

For every instance of a Managed VM app, you will actually be running a VM instance, so it will show up in both locations ("App Engine" and "Compute Engine") in your Cloud Console.

So, for example, here I have a bunch of different versions of Managed VM apps in my Cloud Console:


​And if I then look under the "Compute Engine / VM Instances" section, I see the following VMs are actually running right now:

​If I delete one of the App Engine "Versions" (all of which are [in this case] "Managed VM" apps), then it will also blow away the corresponding VM Instance on Compute Engine.

I hope this helps clear up some of the confusion.  If not, please feel free to ask more questions.
-- Glenn


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

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "google-appengine-go" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengin...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "google-appengine-go" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengin...@googlegroups.com.

Shakeel Mahate

unread,
Oct 21, 2015, 3:14:08 PM10/21/15
to Glenn Lewis, google-appengine-go
Glenn thanks a lot for explaining the differences between the various runtimes for Go Apps on the Google Cloud infrastructure. 

I can see on my Developer's console, the two tutorial VM instances, one for helloworld and one for bookshelf (which I was able to deploy only once so far). And I can see the two versions in the App Engine mapped to the two managed VMs.

Both the VMs are running and both are serving traffic, I was trying to figure out what happens to the previous deployed version when I deployed the bookshelf app.

I think your explanation should be somehow included in the tutorial, specifically about the previous versions of deployed apps.

The pub-sub section of the bookshelf tutorial creates a new module and I was wondering how the module maps to the default module, the https://cloud.google.com/appengine/docs/go/modules/#the_default_module documentation shows how that works. 

Now I have to figure out how the Managed VMs differ from the Google Compute Engine VMs

Let me know when the issues with aedeploy or deployment in general are sorted out. Thanks for all your help.
 

Chris Broadfoot

unread,
Oct 22, 2015, 5:25:30 PM10/22/15
to Shakeel Mahate, Glenn Lewis, google-appengine-go
The reason I couldn't reproduce this bug was that it was an intermittent failure. This should be fixed now. Please reply here again if you still experience that error.

On the confusion around what's displayed in the developer console: I completely agree. I'll be passing on this feedback to the App Engine and Developer Console teams.

Shakeel Mahate

unread,
Oct 22, 2015, 10:36:06 PM10/22/15
to Chris Broadfoot, Glenn Lewis, google-appengine-go
Hi Chris,

Any more information on the root cause of the problem? Right now my project is in limbo state, the cloudservices.gserviceaccount.com keeps on deleting VMs and creating VMs.

I will try to deploy the bookshelf tutorial in a different project. I just have to figure out how gcloud init works with multiple projects.

it looks every step has its own hurdles :-(

Shakeel

Reply all
Reply to author
Forward
0 new messages