GRPC Ver 1.22.0 DNS 解析失败

Posted

技术标签:

【中文标题】GRPC Ver 1.22.0 DNS 解析失败【英文标题】:GRPC Ver 1.22.0 DNS resolution failed 【发布时间】:2020-05-21 02:08:41 【问题描述】:

当我通过代理(也是 PAC)为 Google Speech Client 创建通道时,DNS 解析失败。此问题仅发生在我的客户端,但不会发生在我的公司代理中。您能否就这个问题提出建议,以及我的客户需要哪些信息才能做到这一点?

我的环境信息如下。

C#/net462 gRPC 1.22.0,Google.cloud.speech.v1 Windows 10

我的代码如下。

var cred = GoogleAuthentication.GetServiceAccountCredential(GoogleSpeech.SpeechClient.DefaultScopes);
ChannelCredentials channelCredentials = cred.ToChannelCredentials();
Channel channel = new Channel(GoogleSpeech.SpeechClient.DefaultEndpoint.Host,GoogleSpeech.SpeechClient.DefaultEndpoint.Port, channelCredentials);
GoogleSpeechClient = GoogleSpeech.SpeechClient.Create(channel);

这是我的 grpc 调试日志。

I0205 11:22:45.653978 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\transport\chttp2\client\secure\secure_channel_create.cc:198: grpc_secure_channel_create(creds=00000204FCF267F0, 目标=speech.googleapis.com:443,参数=00000204A2666570, 保留=0000000000000000) I0205 11:22:45.653978 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\client_channel.cc:1184: chand=00000204FDDCC020:为通道堆栈创建 client_channel 00000204FDDCBFA0 I0205 11:22:45.653978 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\client_channel.cc:1087: 钱德=00000204FDDCC020:更新:状态=空闲选择器=00000204A2666770 I0205 11:22:45.653978 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\client_channel.cc:1259: 钱德=00000204FDDCC020:创建解析_lb_policy=000002049E1046E0 I0205 11:22:45.655974 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\surface\metadata_array.cc:29: grpc_metadata_array_init(array=00000204A2666690) I0205 11:22:45.655974 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\surface\call.cc:1922: grpc_call_start_batch(调用=000002049E2DB960,操作=00000009C19FD620, nops=2,标签=00000204A2557130,保留=0000000000000000)I0205 11:22:45.655974 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\surface\call.cc:1526: ops[0]: SEND_INITIAL_METADATA 键=x-goog-api-client 值=67 6c 2d 64 6f 74 6e 65 74 2f 34 2e 36 2e 32 20 67 63 63 6c 2f 31 2e 32 2e 30 20 67 61 70 69 63 2f 31 2e 32 2e 30 20 67 61 78 2f 32 2e 39 2e 30 20 67 72 70 63 2f 31 2e 32 32 2e 30 'gl-dotnet/4.6.2 gccl/1.2.0 gapic/1.2.0 gax/2.9.0 grpc/1.22.0' I0205 11:22:45.655974 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\surface\call.cc:1526: 操作 [1]:RECV_STATUS_ON_CLIENT 元数据=00000204A2557190 状态=00000204A25571A8 详细信息=00000204A25571B0 I0205 11:22:45.655974 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\client_channel.cc:3499: chand=00000204FDDCC020 calld=000002049E2DC310: LB 拾取返回队列 (connected_subchannel=0000000000000000, error="无错误") I0205 11:22:45.655974 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\client_channel.cc:3373: chand=00000204FDDCC020 calld=000002049E2DC310:添加到排队的选择 列表 I0205 11:22:45.655974 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolving_lb_policy.cc:283: resolve_lb=000002049E1046E0:开始名称解析 I0205 11:22:45.655974 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\client_channel.cc:1087: chand=00000204FDDCC020:更新:状态=CONNECTING 选择器=00000204A2666AF0 D0205 11:22:45.655974 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\native\dns_resolver.cc:242: 开始解决。 I0205 11:22:45.655974 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\client_channel.cc:3499: chand=00000204FDDCC020 calld=000002049E2DC310: LB 拾取返回队列 (connected_subchannel=0000000000000000, error="无错误") I0205 11:22:45.655974 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\surface\call.cc:1922: grpc_call_start_batch(调用=000002049E2DB960,操作=00000009C19FD680, nops=1,标签=00000204A2557200,保留=0000000000000000)I0205 11:22:45.655974 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\surface\call.cc:1526: 操作[0]:RECV_INITIAL_METADATA ptr=00000204A2557238 I0205 11:22:45.657332 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\surface\call.cc:1922: grpc_call_start_batch(调用=000002049E2DB960,操作=00000009C19FDD20, nops=1,标签=00000204A2556EC0,保留=0000000000000000)I0205 11:22:45.657332 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\surface\call.cc:1526: 操作 [0]: SEND_MESSAGE ptr=00000204FDDE43D0 I0205 11:22:45.677333 2218856014768 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\native\dns_resolver.cc:185: dns 解析失败(将重试): “创建”:“@1580869365.677000000”,“描述”:“操作系统 错误","文件":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\iomgr\resolve_address_windows.cc","file_line":96,"os_error":"否 这样的主机是已知的。\r\n","syscall":"getaddrinfo","wsa_error":11001 I0205 11:22:45.677333 2218856014768 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolving_lb_policy.cc:299: resolve_lb=000002049E1046E0:解析器瞬时故障: "created":"@1580869365.677000000","description":"DNS 解析 失败","文件":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\native\dns_resolver.cc","file_line":190,"grpc_status": 14,"referenced_errors":["created":"@1580869365.677000000","description":"OS 错误","文件":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\iomgr\resolve_address_windows.cc","file_line":96,"os_error":"否 这样的主机是已知的。\r\n","syscall":"getaddrinfo","wsa_error":11001] I0205 11:22:45.677333 2218856014768 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\client_channel.cc:1087: chand=00000204FDDCC020:更新:状态=TRANSIENT_FAILURE 选择器=00000204FAC0CC20 D0205 11:22:45.677333 2218856014768 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\native\dns_resolver.cc:202: 在 1000 毫秒内重试 I0205 11:22:45.677333 2218856014768 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\client_channel.cc:3499: chand=00000204FDDCC020 calld=000002049E2DC310: LB 拾取返回 TRANSIENT_FAILURE (connected_subchannel=0000000000000000, 错误=“创建”:“@1580869365.677000000”,“描述”:“解析器 短暂的 失败","文件":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolving_lb_policy.cc","file_line":307,"referenced_errors":["created": "@1580869365.677000000","描述":"DNS 解决 失败","文件":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\native\dns_resolver.cc","file_line":190,"grpc_status": 14,"referenced_errors":["created":"@1580869365.677000000","description":"OS 错误","文件":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\iomgr\resolve_address_windows.cc","file_line":96,"os_error":"否 这样的主机是 已知。\r\n","syscall":"getaddrinfo","wsa_error":11001]]) I0205 11:22:45.677333 2218856014768 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\client_channel.cc:3361: chand=00000204FDDCC020 calld=000002049E2DC310:从队列中移除 选择列表 I0205 11:22:45.677333 2218856014768 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\client_channel.cc:3308: chand=00000204FDDCC020 calld=000002049E2DC310: 挑选失败 子频道: error="created":"@1580869365.677000000","description":"选择失败 子频道","文件":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\client_channel.cc","file_line":3528,"referenced_errors":["created": "@1580869365.677000000","description":"解析器 短暂的 失败","文件":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolving_lb_policy.cc","file_line":307,"referenced_errors":["created": "@1580869365.677000000","描述":"DNS 解决 失败","文件":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\native\dns_resolver.cc","file_line":190,"grpc_status": 14,"referenced_errors":["created":"@1580869365.677000000","description":"OS 错误","文件":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\iomgr\resolve_address_windows.cc","file_line":96,"os_error":"否 这样的主机是 已知。\r\n","syscall":"getaddrinfo","wsa_error":11001]]] I0205 11:22:45.677333 2218856014768 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\surface\completion_queue.cc:688: cq_end_op_for_next(cq=000002049E247C30, 标签=00000204A2557130, 错误=“无错误”,完成=00007FFDD8C1E1A0,完成_arg=000002049E2DC7F0, 存储=000002049E2DC840) I0205 11:22:45.677333 2218856014768 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\surface\completion_queue.cc:688: cq_end_op_for_next(cq=000002049E247C30, 标签=00000204A2556EC0, error="created":"@1580869365.677000000","description":"选择失败 子频道","文件":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\client_channel.cc","file_line":3528,"referenced_errors":["created": "@1580869365.677000000","description":"解析器 短暂的 失败","文件":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolving_lb_policy.cc","file_line":307,"referenced_errors":["created": "@1580869365.677000000","描述":"DNS 解决 失败","文件":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\native\dns_resolver.cc","file_line":190,"grpc_status": 14,"referenced_errors":["created":"@1580869365.677000000","description":"OS 错误","文件":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\iomgr\resolve_address_windows.cc","file_line":96,"os_error":"否 这样的主机是 已知。\r\n","syscall":"getaddrinfo","wsa_error":11001]]], 完成=00007FFDD8C1E1A0,完成参数=000002049E2DC9B0, 存储=000002049E2DCA00) I0205 11:22:45.677333 2218856014768 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\surface\completion_queue.cc:688: cq_end_op_for_next(cq=000002049E247C30, 标签=00000204A2557200, error="created":"@1580869365.677000000","description":"选择失败 子频道","文件":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\client_channel.cc","file_line":3528,"referenced_errors":["created": "@1580869365.677000000","description":"解析器 短暂的 失败","文件":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolving_lb_policy.cc","file_line":307,"referenced_errors":["created": "@1580869365.677000000","描述":"DNS 解决 失败","文件":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\native\dns_resolver.cc","file_line":190,"grpc_status": 14,"referenced_errors":["created":"@1580869365.677000000","description":"OS 错误","文件":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\iomgr\resolve_address_windows.cc","file_line":96,"os_error":"否 这样的主机是 已知。\r\n","syscall":"getaddrinfo","wsa_error":11001]]], 完成=00007FFDD8C1E1A0,完成参数=000002049E2DC8D0, 存储=000002049E2DC920) I0205 11:22:45.677333 2218856014768 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\client_channel.cc:3337: chand=00000204FDDCC020 calld=000002049E2DC310:取消排队拣货: error="created":"@1580869365.677000000","description":"选择失败 子频道","文件":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\client_channel.cc","file_line":3528,"referenced_errors":["created": "@1580869365.677000000","description":"解析器 短暂的 失败","文件":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolving_lb_policy.cc","file_line":307,"referenced_errors":["created": "@1580869365.677000000","描述":"DNS 解决 失败","文件":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\native\dns_resolver.cc","file_line":190,"grpc_status": 14,"referenced_errors":["created":"@1580869365.677000000","description":"OS 错误","文件":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\iomgr\resolve_address_windows.cc","file_line":96,"os_error":"否 这样的主机是 已知。\r\n","syscall":"getaddrinfo","wsa_error":11001]]] self=00000204FDD77F90 calld->pick_canceller=0000000000000000 I0205 11:22:45.677333 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\surface\completion_queue.cc:1063: RETURN_EVENT[000002049E247C30]: OP_COMPLETE: tag:00000204A2557130 OK I0205 11:22:45.677333 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\surface\completion_queue.cc:963: grpc_completion_queue_next(cq=000002049E247C30, 截止日期=gpr_timespec tv_sec: 9223372036854775807, tv_nsec: 0, clock_type: 1 , 保留=0000000000000000) I0205 11:22:45.677333 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\surface\completion_queue.cc:1063:RETURN_EVENT[000002049E247C30]:OP_COMPLETE:标签:00000204A2556EC0 错误 I0205 11:22:45.677333 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\surface\completion_queue.cc:963: grpc_completion_queue_next(cq=000002049E247C30, 截止日期=gpr_timespec tv_sec: 9223372036854775807, tv_nsec: 0, clock_type: 1 , 保留=0000000000000000) I0205 11:22:45.677333 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\surface\completion_queue.cc:1063:RETURN_EVENT[000002049E247C30]:OP_COMPLETE:标签:00000204A2557200 错误 I0205 11:22:45.678195 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\surface\completion_queue.cc:963: grpc_completion_queue_next(cq=000002049E247C30, 截止日期=gpr_timespec tv_sec: 9223372036854775807, tv_nsec: 0, clock_type: 1 , 保留=0000000000000000) D0205 11:22:45.698018 2218855401520 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\native\dns_resolver.cc:242: 开始解决。 I0205 11:22:45.698018 2218856014768 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\native\dns_resolver.cc:185: dns 解析失败(将重试): “创建”:“@1580869365.698000000”,“描述”:“操作系统 错误","文件":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\iomgr\resolve_address_windows.cc","file_line":96,"os_error":"否 这样的主机是已知的。\r\n","syscall":"getaddrinfo","wsa_error":11001 I0205 11:22:45.698018 2218856014768 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolving_lb_policy.cc:299: resolve_lb=00000204A258E6E0:解析器瞬时故障: "created":"@1580869365.698000000","description":"DNS 解析 失败","文件":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\native\dns_resolver.cc","file_line":190,"grpc_status": 14,"referenced_errors":["created":"@1580869365.698000000","description":"OS 错误","文件":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\iomgr\resolve_address_windows.cc","file_line":96,"os_error":"否 这样的主机是已知的。\r\n","syscall":"getaddrinfo","wsa_error":11001] I0205 11:22:45.698987 2218856014768 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\client_channel.cc:1087: chand=00000204FDCDBE0:更新:状态=TRANSIENT_FAILURE 选择器=000002049E1EE100 D0205 11:22:45.698987 2218856014768 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\native\dns_resolver.cc:202: 在 142172 毫秒内重试 I0205 11:22:45.782621 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\surface\call.cc:1922: grpc_call_start_batch(调用=000002049E2DB960,操作=00000009C05FE160, nops=1,标签=00000204A2557130,保留=0000000000000000)I0205 11:22:45.782621 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\surface\call.cc:1526: 操作 [0]:RECV_MESSAGE ptr=00000204A2557180 I0205 11:22:45.782621 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\surface\completion_queue.cc:688: cq_end_op_for_next(cq=000002049E247C30, 标签=00000204A2557130, error="created":"@1580869365.677000000","description":"选择失败 子频道","文件":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\client_channel.cc","file_line":3528,"referenced_errors":["created": "@1580869365.677000000","description":"解析器 短暂的 失败","文件":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolving_lb_policy.cc","file_line":307,"referenced_errors":["created": "@1580869365.677000000","描述":"DNS 解决 失败","文件":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\native\dns_resolver.cc","file_line":190,"grpc_status": 14,"referenced_errors":["created":"@1580869365.677000000","description":"OS 错误","文件":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\iomgr\resolve_address_windows.cc","file_line":96,"os_error":"否 这样的主机是 已知。\r\n","syscall":"getaddrinfo","wsa_error":11001]]], 完成=00007FFDD8C1E1A0,完成参数=000002049E2DCA90, 存储=000002049E2DCAE0) I0205 11:22:45.782621 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\surface\completion_queue.cc:1063:RETURN_EVENT[000002049E247C30]:OP_COMPLETE:标签:00000204A2557130 错误 I0205 11:22:45.782621 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\surface\completion_queue.cc:963: grpc_completion_queue_next(cq=000002049E247C30, 截止日期=gpr_timespec tv_sec: 9223372036854775807, tv_nsec: 0, clock_type: 1 , 保留=0000000000000000) I0205 11:22:45.783619 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\surface\call.cc:573: grpc_call_unref(c=000002049E2DB960) I0205 11:22:46.370273 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\security\credentials\credentials.cc:43: grpc_channel_credentials_release(creds=00000204FCF267F0) I0205 11:22:46.370273 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\security\credentials\credentials.cc:43: grpc_channel_credentials_release(creds=000002049E368640) D0205 11:22:46.676327 2218857935696 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\native\dns_resolver.cc:242: 开始解决。 I0205 11:22:46.677361 2218856014768 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\native\dns_resolver.cc:185: dns 解析失败(将重试): “创建”:“@1580869366.677000000”,“描述”:“操作系统 错误","文件":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\iomgr\resolve_address_windows.cc","file_line":96,"os_error":"否 这样的主机是已知的。\r\n","syscall":"getaddrinfo","wsa_error":11001 I0205 11:22:46.677361 2218856014768 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolving_lb_policy.cc:299: resolve_lb=000002049E1046E0:解析器瞬时故障: "created":"@1580869366.677000000","description":"DNS 解析 失败","文件":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\native\dns_resolver.cc","file_line":190,"grpc_status": 14,"referenced_errors":["created":"@1580869366.677000000","description":"OS 错误","文件":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\iomgr\resolve_address_windows.cc","file_line":96,"os_error":"否 这样的主机是已知的。\r\n","syscall":"getaddrinfo","wsa_error":11001] I0205 11:22:46.677361 2218856014768 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\client_channel.cc:1087: chand=00000204FDDCC020:更新:状态=TRANSIENT_FAILURE 选择器=000002049E0947E0 D0205 11:22:46.677361 2218856014768 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\native\dns_resolver.cc:202: 在 1616 毫秒内重试 D0205 11:22:48.293939 2218855401520 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\native\dns_resolver.cc:242: 开始解决。 I0205 11:22:48.294441 2218856014768 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\native\dns_resolver.cc:185: dns 解析失败(将重试): “创建”:“@1580869368.294000000”,“描述”:“操作系统 错误","文件":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\iomgr\resolve_address_windows.cc","file_line":96,"os_error":"否 这样的主机是已知的。\r\n","syscall":"getaddrinfo","wsa_error":11001 I0205 11:22:48.294441 2218856014768 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolving_lb_policy.cc:299: resolve_lb=000002049E1046E0:解析器瞬时故障: "created":"@1580869368.294000000","description":"DNS 解析 失败","文件":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\native\dns_resolver.cc","file_line":190,"grpc_status": 14,"referenced_errors":["created":"@1580869368.294000000","description":"OS 错误","文件":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\iomgr\resolve_address_windows.cc","file_line":96,"os_error":"否 这样的主机是已知的。\r\n","syscall":"getaddrinfo","wsa_error":11001] I0205 11:22:48.294441 2218856014768 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\client_channel.cc:1087: chand=00000204FDDCC020:更新:状态=TRANSIENT_FAILURE 选择器=000002049E094E60 D0205 11:22:48.294441 2218856014768 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\native\dns_resolver.cc:202: 在 2336 毫秒内重试 D0205 11:22:50.629492 2218857935696 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\native\dns_resolver.cc:242: 开始解决。 I0205 11:22:50.653821 2218856014768 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\native\dns_resolver.cc:185: dns 解析失败(将重试): “创建”:“@1580869370.653000000”,“描述”:“操作系统 错误","文件":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\iomgr\resolve_address_windows.cc","file_line":96,"os_error":"否 这样的主机是已知的。\r\n","syscall":"getaddrinfo","wsa_error":11001 I0205 11:22:50.653821 2218856014768 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolving_lb_policy.cc:299: resolve_lb=000002049E1046E0:解析器瞬时故障: "created":"@1580869370.654000000","description":"DNS 解析 失败","文件":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\native\dns_resolver.cc","file_line":190,"grpc_status": 14,"referenced_errors":["created":"@1580869370.653000000","description":"OS 错误","文件":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\iomgr\resolve_address_windows.cc","file_line":96,"os_error":"否 这样的主机是已知的。\r\n","syscall":"getaddrinfo","wsa_error":11001] I0205 11:22:50.653821 2218856014768 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\client_channel.cc:1087: chand=00000204FDDCC020:更新:状态=TRANSIENT_FAILURE 选择器=000002049E0948C0 D0205 11:22:50.653821 221885601

【问题讨论】:

这是一个网络问题,只需在客户端网络的命令行中尝试 ping speech.googleapis.com 即可显示问题(GoogleSpeech.SpeechClient.DefaultEndpointspeech.googleapis.com:443)。与 I.T. 预约那里的人,请他解决这个问题。 【参考方案1】:

GRPC Ver 1.19 中已存在此问题,建议的解决方法是将GRPC_DNS_RESOLVER 环境变量设置为native

// Do it early
Environment.SetEnvironmentVariable("GRPC_DNS_RESOLVER", "native");

【讨论】:

这个GRPC日志是把DNS_RESOLVER改成Native后的结果。 @ammoe 哪个日志?你有没有尝试过原生的东西? (基于此:github.com/grpc/grpc/blob/master/doc/environment_variables.md 另一个可能的选项是ares

以上是关于GRPC Ver 1.22.0 DNS 解析失败的主要内容,如果未能解决你的问题,请参考以下文章

路由器显示“DNS根域名解析失败”怎么修复?

如何在 ubuntu 中配置 DNS?为啥显示域名解析暂时失败?

DNS解析失败 DNS服务出现故障自救方法

nginx启动忽略dns解析

验证DNS解析失败:解决办法之一

coredns源码分析