英文:
Setting up GRPC service in AWS ecs
问题
我尝试使用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
英文:
I tried setting up the GRPC server with ALB, I have done all the setup here, and my target groups as healthy But when I hit the service with the GRPC client it fails . below is the GRPC client log
[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
答案1
得分: 0
问题是https监听器中使用的证书有误,所以我采取了以下措施使其正常工作:
- 将我的域名服务器迁移到了R53。
- 在ACM中创建了公共证书。
- 在https监听器中使用了该证书。
英文:
the issue was certificate used in the https listener was wrong, so did following to make it work
- moved my nameserver to r53
- created public certificate in acm
- used certificate in the https listener
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论