Troubleshooting overview

This page provides general troubleshooting information and provides links to other pages for additional information.

Errors when deploying the Cloud Endpoints configuration

If you got an error message from the gcloud endpoints services deploy command, see Troubleshooting Endpoints configuration deployment for information on troubleshooting the error.

Errors when deploying your API backend

The deployment of your API and the Extensible Service Proxy (ESP) to a Google Cloud Platform (GCP) backend is platform dependent. See the following troubleshooting guides for more information:

Response errors

When you send a request to your API and receive an error response, see Troubleshooting response errors for information on troubleshooting the error.

Checking required services

At a minimum, Endpoints and ESP require the following services:

  • Service Management API (servicemanagement.googleapis.com)
  • Service Control API (servicecontrol.googleapis.com)
  • Google Cloud Endpoints (endpoints.googleapis.com)
  • Stackdriver Logging (logging.googleapis.com)

But these services might also have dependencies.

With the exception of the services required to host your API on GCP, after you create a GCP project and deploy your Endpoints configuration by using the gcloud endpoints services deploy command, all the services that Endpoints and ESP require are enabled.

You can use the following procedure to get a list of the required services. See the gcloud reference for more information on the following commands.

To get a list of the required services:

  1. Create a test project, replacing PROJECT_ID with a unique project ID. (Project IDs must start with a lowercase letter and can have lowercase ASCII letters, digits or hyphens. Project IDs must be between 6 and 30 characters.)

    gcloud projects create PROJECT_ID
  2. Set the default project to the one you just created.

    gcloud config set project PROJECT_ID
  3. Save a copy of the openapi.yaml file from the getting-started sample to your local machine.

  4. Open the openapi.yaml file, and in the host field, replace the text with the Endpoints service name, which should be in the following format.

    host: "echo-api.endpoints.YOUR_PROJECT_ID.cloud.goog"
  5. Save the openapi.yaml file.

  6. In the directory where you saved the openapi.yaml file, deploy the Endpoints configuration.

    gcloud endpoints services deploy openapi.yaml
  7. Get a list of all the enabled services.

    gcloud services list
  8. After you copy the list of required services, delete the test project.

    gcloud projects delete PROJECT_ID
  9. Compare the list of enabled services from the test project to the ones that are enabled in your project.

Checking debug information

Running the gcloud command-line tool with debug verbosity helps with debugging.

gcloud --verbosity=debug COMMAND

This command makes the gcloud command-line tool print a verbose log of the error. Depending on the command being run, the output can include request and response information from the server.

Enabling a service

You can check whether a service is enabled using gcloud.

gcloud services list

To display configuration for a particular service, use the following command:

gcloud endpoints services describe SERVICE_NAME

Proxy OAuth fails yet requests pass

Make sure there is a security section that has your OAuth definition in your OpenAPI document. An example specification file is available in the Getting started sample on GitHub.

What's next

Was this page helpful? Let us know how we did:

Send feedback about...

Cloud Endpoints with OpenAPI
Need help? Visit our support page.