GRPC with PHP Dns Issue - (DNS resolution failed)

393 views
Skip to first unread message

Arjun Me

unread,
May 29, 2020, 4:44:33 PM5/29/20
to grpc.io
Hi,

I am using windows 10 and I have installed Ubuntu in the Hyper-v. I have setup the GRPC with php and it was working fine. But When I tried to connect to the remote server. I am getting this error.

Request:

client.getDatesById( {
    nests
: '21',
    topics
: '82312',
    products
: ['186599']
}, printReply)



Error:  { Error: 14 UNAVAILABLE: DNS resolution failed
    at
Object.exports.createStatusError (/usr/lib/node_modules/grpcc/node_modules/grpc/src/common.js:91:15)
    at
Object.onReceiveStatus (/usr/lib/node_modules/grpcc/node_modules/grpc/src/client_interceptors.js:1209:28)
    at
InterceptingListener._callNext (/usr/lib/node_modules/grpcc/node_modules/grpc/src/client_interceptors.js:568:42)
    at
InterceptingListener.onReceiveStatus (/usr/lib/node_modules/grpcc/node_modules/grpc/src/client_interceptors.js:618:8)
    at callback
(/usr/lib/node_modules/grpcc/node_modules/grpc/src/client_interceptors.js:847:24) code: 14, metadata: {}, details: 'DNS resolution failed' }

FYI: I am a beginner to GRPC and this DNS resolution issue is blocking me to move forward.

Also I found out in some blogs, they have asked to add this "GRPC_DNS_RESOLVER=native". I don't where I need to add this. Also I like to know whether this solve the issue.

Could you please help me in fix this issue

Stanley Cheung

unread,
May 29, 2020, 6:26:10 PM5/29/20
to Arjun Me, grpc.io
You mention PHP as a client, but the errors are from Node. Was your client written in Node? Where does PHP come in?

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/0efbdb17-c7eb-424b-9587-3ef7cd0667e6%40googlegroups.com.

Arjun

unread,
May 30, 2020, 1:53:43 AM5/30/20
to Stanley Cheung, grpc.io
Hi Stanley,

Actually php is the client. I got the same issue in php. So I have tried with grpcc gui to post the request to the server to confirm that there is no problem with my php code.

Arjun Me

unread,
May 30, 2020, 2:12:16 PM5/30/20
to grpc.io
Now I am using the GRPcc tool and its also giving the same error (GRPC SERVER: https://service-grpc.com:8090)

grpcc --proto our-api.proto --address https://service-grpc.com:8090

Stanley Cheung

unread,
May 30, 2020, 4:13:59 PM5/30/20
to Arjun Me, grpc.io
What is this service-grpc.com?

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.

Arjun

unread,
May 30, 2020, 4:16:10 PM5/30/20
to Stanley Cheung, grpc.io
Hi,

This is a grpc service hosted with https and self signed certificate( it’s not a real url and my real url is similarly like this)
Reply all
Reply to author
Forward
0 new messages