Troubleshooting Endpoints Configuration Deployment

This section describes some errors that you might encounter when you deploy your Endpoints configuration and how to troubleshoot them. After each step, run the gcloud endpoints services deploy command again to see if the error is resolved.

Cannot convert to service config

ERROR: unknown location: http: In path template '[PATH]': unexpected end of input '/'.'

This error is displayed when one or more paths in your OpenAPI document includes a trailing slash ('/') character. To fix this issue, remove the trailing slash from all paths. For example, the following snippet in an OpenAPI document results in this error:

paths:
  "/echo/":
    post:
      description: "Echo back a given message."

To fix this, remove the trailing slash from `/echo/`:

paths:
  "/echo":
    post:
      description: "Echo back a given message."

Not allowed to get project settings

ERROR: (gcloud.endpoints.services.deploy) PERMISSION_DENIED:
Not allowed to get project settings for project YOUR_PROJECT_ID

  1. Authenticate with Cloud SDK again to confirm that you authenticated with an account that has permission to access the project displayed in the error message:
    gcloud auth login
    

    A new browser tab opens and you are prompted to choose an account.

  2. Confirm that the project ID displayed in the error message corresponds to the GCP project that you intend to deploy the Endpoints configuration to:
    gcloud projects list
    
  3. Confirm that Cloud SDK has the correct project ID set as the current project:
    gcloud config set project [YOUR_PROJECT_ID]
    

Caller does not have permission

ERROR: (gcloud.endpoints.services.deploy) PERMISSION_DENIED:
Caller does not have permission 'servicemanagement.services.create' on project YOUR_PROJECT_ID

You must have the Editor or Owner role to deploy the Endpoints configuration. To check your permissions:

  1. Open the IAM page in the GCP Console.

    Open the IAM page

  2. Click Select a project.

    If you do not see the project that you want to deploy the Endpoints configuration to, then you are not a member of the project. You will have to have a project member with the Owner role grant you access to the project.

    If you see the project that you want to deploy Endpoints configuration to, select it, and click Open.

  3. Find your name in the Members list and confirm that you have either the Editor or Owner role.

    If you have some other role, you will have to have a project member with the Owner role change your role.

Ownership for domain name cannot be verified

ERROR: (gcloud.endpoints.services.deploy) PERMISSION_DENIED:
Ownership for domain name 'YOUR_DOMAIN_NAME' on project YOUR_PROJECT_ID cannot be verified

  • If you have a custom domain (for example, my-company.com) configured in the host field of your OpenAPI document, you must verify the domain name before you can deploy your OpenAPI document.
  • If you are using the cloud.goog domain, confirm that the value for the host field is in the following format, and that the project ID is correct:
    API_NAME.endpoints.YOUR_PROJECT_ID.cloud.goog
    
  • If you are using the appspot.com domain (supported for App Engine only), confirm that the host field is in the following format, and that the project ID is correct:
    YOUR_PROJECT_ID.appspot.com
    

Troubleshooting other errors

If you received an error not listed above, or if the above information did not solve your problem, run the gcloud command again with the flag to display debug information:

gcloud --verbosity=debug endpoints services deploy openapi.yaml
Was this page helpful? Let us know how we did:

Send feedback about...

Cloud Endpoints with OpenAPI