简体   繁体   English

grpc k8s 听“冒号太多”

[英]grpc k8s listen giving “too many colons”

In my Go GRPC Server, I am calling net.Listen("tcp", "9901") and I get the following error running in k8s: level=fatal msg="Listen Failed: listen tcp: address tcp://10.101.156.95:9901: too many colons in address In my Go GRPC Server, I am calling net.Listen("tcp", "9901") and I get the following error running in k8s: level=fatal msg="Listen Failed: listen tcp: address tcp://10.101. 156.95:9901:地址中的冒号太多

I am not sure how the address is being filled in other than k8s magic.除了 k8s 魔术之外,我不确定地址是如何填写的。 It is the loadbalancer IP for the pod though.它是 Pod 的负载均衡器 IP。

I can not figure where the too many colons are coming from.我不知道太多冒号是从哪里来的。

When using in k8s the address/port should be left "", not the port you would use if running standalone.在 k8s 中使用时,地址/端口应保留为“”,而不是独立运行时使用的端口。 Doing that solved that problem.这样做解决了这个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM