If you don't get a successful response from a request to your Cloud Endpoints Frameworks API, you can use Cloud Logging in the Google Cloud console to help troubleshoot.
Viewing logs
-
In the Google Cloud console, go to the Logging> Logs Explorerpage.
-
From the project drop-down list at the top of the page, select the Google Cloud project in which you created your API.
-
Select GAE Applicationand All logs.
-
Adjust the time range until you see a row that shows an error.
-
Click Expand Allto see the entire log for the error.
The following section provides troubleshooting information for specific error messages. If you are unable to fix the issue, copy one of the log entries that shows the error and paste it in a text file. Include the log in any communication that you have with Google.
503 Service Unavailable
App Engine might take a few minutes to respond successfully to requests. If you
send a request and get a 503
error, wait a few minutes and try the
request again. If you still don't get a successful response, check the
Cloud Logging logs. The following are some error messages that you might
see in the Cloud Logging logs.
YOUR_PROJECT_ID
.appspot.com
found or
permission denied. If this is a new Endpoints service, make sure you've
deployed the service config using gcloud.app.yaml
file. This error can happen when you haven't deployed
the OpenAPI document for your API by using gcloud endpoints services
deploy
, or the Service Management API isn't enabled. When you deploy
the OpenAPI document for your API, the gcloud
command
automatically enables the following: - Service Management API
(
servicemanagement.googleapis.com) - Cloud APIs (
cloudapis.googleapis.com)
YOUR_PROJECT_ID
.appspot.com
was found, but
no service config was found for version SERVICE_CONFIG_ID
.ENDPOINTS_SERVICE_VERSION
in your app.yaml
file.
To fix this error: - Get the service configuration ID .
- Edit your
app.yamlfile and setENDPOINTS_SERVICE_VERSIONto the service configuration ID. - Redeploy your app:
gcloud app deploy
404 Not Found
If you recently migrated to Endpoints Frameworks version 2, and you
get the 404 Not Found
error message, see the following sections to
troubleshoot the issue:
Issues with the example Invoke-WebRequest
In some versions of Windows PowerShell, the example Invoke-WebRequest
in the tutorials
fails. We have also received a
report that the response contained a list of unsigned bytes that had to be
converted to characters. If the example Invoke-WebRequest
didn't return the
expected result, try sending the request using another application. Following
are a few suggestions:
- Start Cloud Shell , and follow the Linux steps in the tutorial that you were using to send the request.
-
Use a third-party application such as the Chrome browser extension Postman (offered by
www.getpostman.com). When creating the request in Postman:- Select
POSTas the HTTP verb. - For the header, select the key
content-typeand the valueapplication/json. - For the body, enter:
{"message":"hello world"} -
Enter the URL for the sample application. For example:
https://example-project-12345.appspot.com/_ah/api/echo/v1/echo
- Select
-
Download and install
curl, which you run in the Command prompt. Because Windows doesn't handle double quotation marks nested inside single quotation marks, you have to change the--dataoption in the example, as follows:--data "{\"message\":\"hello world\"}"
What's next
-
Get started using the Logs Explorer .
-
Learn how to route logs .
-
Use filters for advanced filtering, such as getting all requests with a latency greater than 300 milliseconds.

