【发布时间】:2020-09-18 07:52:45
【问题描述】:
我正在使用通过 HTTPS 和自签名证书托管的 GRPC 服务。当我使用如下语法连接时:
const client = new productService('https://grpc-server-xxx.com:9090',
grpc.credentials.createInsecure())
我收到这样的错误
{ Error: 14 UNAVAILABLE: DNS resolution failed
at Object.exports.createStatusError (C:\grpc\node_modules\grpc\src\common.js:91:15)
at Object.onReceiveStatus (C:\grpc\node_modules\grpc\src\client_interceptors.js:1209:28)
at InterceptingListener._callNext (C:\grpc\node_modules\grpc\src\client_interceptors.js:568:42)
at InterceptingListener.onReceiveStatus (C:\grpc\node_modules\grpc\src\client_interceptors.js:618:8) at callback (C:\grpc\node_modules\grpc\src\client_interceptors.js:847:24)code: 14,metadata: Metadata { _internal_repr: {}, flags: 0 },details: 'DNS resolution failed'
谁能帮我解决这个问题。
注意: 我的操作系统是 Windows 10, nodejs——v10.16.0, GRPC
【问题讨论】:
标签: node.js grpc grpc-java grpc-go grpc-node