Getting GRPC_ERROR When using docker container to realize grpc cpp server,

364 views
Skip to first unread message

sathya M

unread,
Jul 22, 2020, 8:24:56 AM7/22/20
to grpc.io
docker run -it  --net=host --name nzs-port7 dnbapp-nzs:1.0 /bin/bash
E0722 08:49:44.118516158      12 server_chttp2.cc:40]        {"created":"@1595407784.118446502","description":"Name or service not known","errno":-2,"file":"
/root/sathya-207-mdev/nz-svc/third_party/grpc_src/src/core/lib/iomgr/resolve_address_posix.cc","file_line":108,"os_error":"Name or service not known","syscall":"getaddrinfo","target_address":"/bin/bash"}

When i run the same image manually inside docker its working fine as expected,
Can u give me an idea/clue about RC ?
/etc/resolv.conf, and everything is fine as expected

Lidi Zheng

unread,
Jul 22, 2020, 1:33:14 PM7/22/20
to grpc.io
You could try to resolve the same address in the container. The error complains about failed name resolution.

sathya M

unread,
Jul 22, 2020, 1:43:10 PM7/22/20
to Lidi Zheng, grpc.io
As you said yes I understood the error, but what should be the possible reason for this behavior, since the same image can able to run  manually inside same container ..
In grpc code failure is exactly for getaddrinfo 
 To give some idea about my project 
1. I am using grpc cpp as server which is compiled in centos bionic version , all required grpc libraries and its dependencies are statically linked ...
2. Building docker image from debian buster,  and entry point as the compiled output of step 1
3. I tried Grpc server listening is localhost:50053 
Some random ip:50053
All the three cases I'm getting same error.
4. /etc/resolved.conf is also proper...
5. I'm using docker run -it --net=host , in order to use host networking ip...am I missing something?

--
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/fe66933e-c15c-4f29-982c-7c07ccda544cn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages