我正在尝试使用 gRPC 与 TLS 证书建立加密连接。由于连接不安全,一切正常,我也尝试使用 Go 编写的客户端,它也能正常工作。但是使用 Python 我收到以下错误:
grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "failed to connect to all addresses"
debug_error_string = "{"created":"@1565190346.229323178","description":"Failed to pick subchannel","file":"src/core/ext/filters/client_channel/client_channel.cc","file_line":3528,"referenced_errors":
[{"created":"@1565190346.229314131","description":"failed to connect to all addresses","file":"src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc","file_line":399,"grpc_status":14}]}"
Run Code Online (Sandbox Code Playgroud)
这是我客户的代码:
grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "failed to connect to all addresses"
debug_error_string = "{"created":"@1565190346.229323178","description":"Failed to pick subchannel","file":"src/core/ext/filters/client_channel/client_channel.cc","file_line":3528,"referenced_errors":
[{"created":"@1565190346.229314131","description":"failed to connect to all addresses","file":"src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc","file_line":399,"grpc_status":14}]}"
Run Code Online (Sandbox Code Playgroud)
有什么建议?
更新
这是带有GRPC_TRACE和GRPC_VERBOSITY环境变量的输出。
credentials = grpc.ssl_channel_credentials() …Run Code Online (Sandbox Code Playgroud) 在阅读了 Dave Cheney关于 Go 地图的博客文章后,我仍然有一些不清楚的地方。
域名注册地址:
在挖掘运行时包后,我发现底层地图结构如下:
// A header for a Go map.
type hmap struct {
// Note: the format of the hmap is also encoded in cmd/compile/internal/gc/reflect.go.
// Make sure this stays in sync with the compiler's definition.
count int // # live cells == size of map. Must be first (used by len() builtin)
flags uint8
B uint8 // log_2 of # of buckets (can hold up to loadFactor * …Run Code Online (Sandbox Code Playgroud)