gRPC Endpoints for Compute Engine with ESP

95 views
Skip to first unread message

Di Lu

unread,
May 26, 2021, 4:11:38 AM5/26/21
to Google Cloud Endpoints
Hi,

I'm following the instructions in https://cloud.google.com/endpoints/docs/grpc/get-started-compute-engine-docker to set up a gRPC endpoint in a compute engine instance.

I did the steps and tried to use the following command to verify the endpoints
python bookstore_client.py --host bookstore.endpoints.stork-product.cloud.goog --port 8080

but I got the following errors:
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "DNS resolution failed for service: bookstore.endpoints.stork-product.cloud.goog:8080"

Below are the running dockers in compute engine instance: 

sudo docker ps -a
CONTAINER ID   IMAGE                                               COMMAND                  CREATED          STATUS          PORTS                                                           NAMES
4142cb17bcae   gcr.io/endpoints-release/endpoints-runtime:1        "/usr/sbin/start_esp…"   14 seconds ago   Up 13 seconds   8080/tcp, 8090/tcp, 0.0.0.0:8080->9000/tcp, :::8080->9000/tcp   esp
aca994028b1b   gcr.io/endpointsv2/python-grpc-bookstore-server:1   "python /bookstore/b…"   4 minutes ago    Up 4 minutes    8000/tcp, 8080/tcp     

Does anyone know what I missed? and is there any other way to verify the gRPC endpoints?

Any comment is appreciated.

Thanks,
Di


Teju Nareddy

unread,
May 26, 2021, 11:27:14 AM5/26/21
to Google Cloud Endpoints
This tutorial does not setup DNS, so you cannot make a call to `bookstore.endpoints.stork-product.cloud.goog`. You need to use the IP address of the GCE instance instead.

python bookstore_client.py --host SERVER_IP --port 80

This should work. If it does, you can then setup DNS for the host using this guide: https://cloud.google.com/endpoints/docs/grpc/cloud-goog-dns-configure
Reply all
Reply to author
Forward
0 new messages