在 AWS ecs 中设置 GRPC 服务

我尝试使用 ALB 设置 GRPC 服务器,我已经完成了所有设置,并且我的目标群体是健康的但是当我使用 GRPC 客户端访问服务时它失败了。下面是 GRPC 客户端日志


[ec2-user@ greeter_client]$ GRPC_GO_LOG_SEVERITY_LEVEL=info 

GREETER_ENDPOINT=testgrpc-<>.us-west-1.elb.amazonaws.com:443 INSECURE=1  go 

run main.go

INFO: 2022/05/08 20:43:46 [core] parsed scheme: ""

INFO: 2022/05/08 20:43:46 [core] scheme "" not registered, fallback to default scheme

INFO: 2022/05/08 20:43:46 [core] ccResolverWrapper: sending update to cc:{[{testgrpc-<>.us-west-1.elb.amazonaws.com:443  <nil> 0 <nil>}] <nil> <nil>}

INFO: 2022/05/08 20:43:46 [core] ClientConn switching balancer to "pick_first"

INFO: 2022/05/08 20:43:46 [core] Channel switches to new LB policy "pick_first"

INFO: 2022/05/08 20:43:46 [core] Subchannel Connectivity change to CONNECTING

INFO: 2022/05/08 20:43:46 [core] blockingPicker: the picked transport is not ready, loop back to repick

INFO: 2022/05/08 20:43:46 [core] Subchannel picks a new address "testgrpc-<>.us-west-1.elb.amazonaws.com:443" to connect

INFO: 2022/05/08 20:43:46 [core] Channel Connectivity change to CONNECTING

INFO: 2022/05/08 20:43:46 [core] Subchannel Connectivity change to TRANSIENT_FAILURE

INFO: 2022/05/08 20:43:46 [core] Channel Connectivity change to TRANSIENT_FAILURE

2022/05/08 20:43:46 could not greet: rpc error: code = Unavailable desc = connection closed

http://img1.mukewang.com/6397e6120001b1a406530170.jpg

http://img1.mukewang.com/6397e6180001240306510069.jpg

慕森王
浏览 147回答 1
1回答

人到中年有点甜

问题是 https 侦听器中使用的证书是错误的,所以遵循以下使其工作将我的名称服务器移至 r53在 acm 中创建公共证书在 https 侦听器中使用的证书
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Go