'Security handshake failed: {"description":"Handshake read failed"}

What version of gRPC and what language are you using?

@grpc/grpc-js - 1.5.10

What operating system (Linux, Windows,...) and version?

  • server running in a docker container on azure cloud

What did you do?

I have created a grpc server with SSL. It is a test server, where I use self signed certificates for server. The connection between server and client works fine. But I enabled the debug and trace (tcp, http) logs on the server. I keep getting handshake failed error.

I0427 12:07:40.319067700      18 tcp_server_custom.cc:224]   SERVER_CONNECT: 0x7f06409cf3a0 accepted connection: ipv4:10.92.0.9:52824
I0427 12:07:40.319239300      18 tcp_custom.cc:353]          Creating TCP endpoint 0x7f0640c78430
I0427 12:07:40.319432800      18 tcp_custom.cc:174]          TCP:0x7f0640c78430 read_allocation_done: "No Error"
I0427 12:07:40.319503900      18 tcp_custom.cc:191]          Initiating read on 0x7f0640c78430: error="No Error"
I0427 12:07:40.331081600      18 tcp_custom.cc:127]          TCP:0x7f0640afea60 call_cb 0x7f0641ed57e0 0x7f0640848b90:0x7f0641ed5610
I0427 12:07:40.331206000      18 tcp_custom.cc:131]          read: error={"created":"@1651061260.331064200","description":"EOF","file":"../deps/grpc/src/core/lib/iomgr/tcp_uv.cc","file_line":106}
D0427 12:07:40.331327300      18 security_handshaker.cc:176] Security handshake failed: {"created":"@1651061260.331311100","description":"Handshake read failed","file":"../deps/grpc/src/core/lib/security/transport/security_handshaker.cc","file_line":357,"referenced_errors":[{"created":"@1651061260.331064200","description":"EOF","file":"../deps/grpc/src/core/lib/iomgr/tcp_uv.cc","file_line":106}]}
I0427 12:07:40.331412400      18 tcp_custom.cc:287]          TCP 0x7f0640afea60 shutdown why={"created":"@1651061260.331311100","description":"Handshake read failed","file":"../deps/grpc/src/core/lib/security/transport/security_handshaker.cc","file_line":357,"referenced_errors":[{"created":"@1651061260.331064200","description":"EOF","file":"../deps/grpc/src/core/lib/iomgr/tcp_uv.cc","file_line":106}]}
D0427 12:07:40.331443800      18 chttp2_server.cc:122]       Handshaking failed: {"created":"@1651061260.331311100","description":"Handshake read failed","file":"../deps/grpc/src/core/lib/security/transport/security_handshaker.cc","file_line":357,"referenced_errors":[{"created":"@1651061260.331064200","description":"EOF","file":"../deps/grpc/src/core/lib/iomgr/tcp_uv.cc","file_line":106}]}
 
### Anything else we should know about your project / environment?
I have an envoy proxy also running for the grpc server to make grpc-web requests.
Node version: node:14-alpine



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source