4

We had working solution for Cloud Endpoints on standard AppEngine, but recently we switched to Managed VMs https://cloud.google.com/appengine/docs/java/managed-vms/

Everything seems to work the same, except Cloud Endpoints.

I have the same results for production Managed VMs and local docker dev environment.

Some suspicious lines from gcloud preview app run output:

INFO: default: "POST /_ah/spi/BackendService.getApiConfigs HTTP/1.1" 404 29
INFO: default: "GET /_ah/api/discovery/v1/apis/admin/v1/rest?fields=servicePath%2Cresources%2Cparameters%2Cmethods&pp=0 HTTP/1.1" 500 60

I can't find out if Google Cloud Endpoints are supported on Managed VMs at all? And if they are supported what should I do to fix this issue?

  • Did you install the latest Cloud SDK? https://cloud.google.com/sdk/ – Bardia D. Nov 13 '14 at 16:16
  • @BardiaD. Yes of course. Downloaded it yesterday, version 0.9.35 OSX – Alexander Urmuzov Nov 13 '14 at 17:52
  • Perhaps try one of these? http://stackoverflow.com/questions/15047744/gae-cloud-endpoints-api-not-updating-after-deploy http://stackoverflow.com/questions/17706437/cannot-access-api-explorer-on-localhost – Bardia D. Nov 14 '14 at 16:27
  • @BardiaD. I believe it is something else. Regarding to first question, I can see this lines "API configuration update serving" on production after deploy. Regarding to second question, I vae 404 instead of 200 on /_ah/spi/BackendService.getApiConfigs and java instead of python. – Alexander Urmuzov Nov 17 '14 at 10:01
  • Can you please include your configuration file? (web.xml) – Nick Jan 02 '15 at 19:46

3 Answers3

0

getApiConfigs returning 404 is a sign that something is going wrong with the request to /_ah/spi/* - no handler is found. You should have defined a handler in your web.xml for this route when setting up your endpoints project. For this reason, the GET to the discovery doc path is failing with 500, since it internally calls the first path.

Nick
  • 3,581
  • 1
  • 14
  • 36
0

Issue has been resolved by itself. I migrated to jax-rs while cloud endpoints were failing. Recently I tried to switch back cloud endpoints worked fine. Maybe it's related to appengine version, I'm nut sure. There were several version updates while I was on jax-rs.

0

Cloud Endpoints are not supported on Managed VMs. You should migrate away from that combination, if you want to avoid problems in the future.

dyeray
  • 1,056
  • 6
  • 17
  • You're actually wrong. They are working fine on managed VMs for quite a while for us. As I mentioned the issue resolved itself after some time – Alexander Urmuzov Feb 11 '16 at 14:03
  • I believed that they may stop working in the future. You can see here http://stackoverflow.com/questions/33697803/google-app-engine-managed-vm-cloud-endpoints#comment58397451_33697803 a confirmation by a googler that they are not supported, but it looks they will in the future... – dyeray Feb 12 '16 at 07:43