Docker connectivity issue with gRPC

521 views Asked by At

I am on Windows 10 Pro working with Docker for Windows. I am trying to put together a simple nodejs client server based on the gRPC greeter example for NodeJS. I end up with this error.

console.log('Greeting:', response.getMessage());

TypeError: Cannot read property 'getMessage' of undefined at Object.callback (/usr/src/app/static_codegen/greeter_client.js:51:38 at /usr/src/app/node_modules/grpc/src/node/src/client.js:420:14

I installed hping3 in the container in the role of the client and it can connect to the localhost port 50051 of the container in the role as the server.

root@8aca5f26c64f:/usr/src/app# hping3 localhost -p 50051
HPING localhost (lo 127.0.0.1): NO FLAGS are set, 40 headers + 0 data bytes
len=40 ip=127.0.0.1 ttl=64 DF id=906 sport=50051 flags=RA seq=0 win=0 rtt=9.9 ms
len=40 ip=127.0.0.1 ttl=64 DF id=934 sport=50051 flags=RA seq=1 win=0 rtt=9.8 ms
len=40 ip=127.0.0.1 ttl=64 DF id=985 sport=50051 flags=RA seq=2 win=0 rtt=9.7 ms
len=40 ip=127.0.0.1 ttl=64 DF id=1068 sport=50051 flags=RA seq=3 win=0 rtt=9.6 ms
len=40 ip=127.0.0.1 ttl=64 DF id=1094 sport=50051 flags=RA seq=4 win=0 rtt=9.6 ms

I am also using the node container used in the grpc-docker-library.

Can anyone point me to some tips on how to troubleshoot this further please?

Scott

0

There are 0 answers