This page presents troubleshooting techniques when the Extensible Service Proxy (ESP) is deployed on a Compute Engine virtual machine (VM).
Viewing logs on the VM instance
You can troubleshoot problems by looking at the Endpoints Runtime log on the VM instance.
To view the log:
- Use - sshto connect to your virtual machine:- gcloud config set project YOUR_PROJECT_ID gcloud compute ssh INSTANCE_NAME - Replace - YOUR_PROJECT_IDand- INSTANCE_NAMEwith your Google Cloud project ID and virtual machine instance name, respectively.
- View the - nginxerror log:- If you are running endpoints-runtime on a raw VM: - tail -f /var/log/nginx/error.log- If you are running - endpoints-runtimewithin Docker:- docker ps docker logs CONTAINER_NAME - Replace - CONTAINER_NAMEwith the name of your container.
Displaying ESP status
To display ESP status:
- Use - sshto connect to your your virtual machine:- gcloud config set project YOUR_PROJECT_ID gcloud compute ssh INSTANCE_NAME - Replace - YOUR_PROJECT_IDand- INSTANCE_NAMEwith your Google Cloud project ID and virtual machine instance name, respectively.
- Retrieve the name of the ESP container (typically the container name is - esp):- docker ps
- Get a bash shell in the container: - docker exec -it ESP_CONTAINER_NAME /bin/bash - Replace - ESP_CONTAINER_NAMEwith the name of the ESP container from the previous step.
- Install - curl.
- Enter the following: - curl http://localhost:8090/endpoints_status
Getting the service configuration ID
If you set rollout_strategy to managed when you started ESP, and you need to find the configuration ID that an instance of ESP is using, near the end of the output from the curl http://localhost:8090/endpoints_status command, the output is similar to the following:
 "serviceConfigRollouts": { "rolloutId": "2017-08-09r27", "percentages": { "2017-08-09r26": "100" } } The value in the rolloutId is the service configuration ID that ESP is using. This configuration ID should match the latest deployed configuration. You can view the deployment history on the Endpoints > Services page in the Google Cloud console and view changes made to the service configuration. See Comparing configuration files.