GoogleCloudPlatform / GoogleCloudPlatform/python-docs-samples

gRPC on GKE tutorial: Python client (bookstore_client.py) cannot connect to the API backend in latest version of grc.io/endpointsv2/python-grpc-bookstore-server

未关闭
#4,124 15 条评论 0 个 reaction 已指派 1 人 已指派给 @nareddyt 在 GitHub 查看
api: container priority: p3 type: bug
主要语言
Jupyter Notebook
星标
8.1k
派生
6.7k
平均合并
4 天 2 小时
30 天内合并 PR
16

描述

## In which file did you encounter the issue?

https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/endpoints/bookstore-grpc/bookstore_server.py

### Did you change the file? If so, how?

Overrode the PORT env variable to set it to 8000. Changed https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/endpoints/kubernetes/grpc-bookstore.yaml

> image: gcr.io/process-mining-gke/bookstore-grpc-server:latest
> env:
> - name: PORT
> value: "8000"

## Describe the issue

This issue is with gRPC on GKE tutorial : https://cloud.google.com/endpoints/docs/grpc/get-started-kubernetes-engine

The python client (bookstore_client.py) can no longer connect to the API backend as the latest docker image build of the API backend (grc.io/endpointsv2/python-grpc-bookstore-server) ends up listening on the port specified by the PORT variable while the proxy (esp) forwards request to port 8000 as specified in the Kubernetes manifest file .

This is likely due to the changes made in https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/endpoints/bookstore-grpc/bookstore_server.py to make it work in Cloud Run which requires that the server listen on the port specified by the PORT environment.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。