Setup
@grpc/grpc-js
based client- GRPC C++ based server
What is happening?
An exception is thrown by GRPC stating:
Error 13: INTERNAL: Received RST_STREAM with code 5
The error is very ambiguios and I could not find any info online regarding it.
Probable cause and solution
For me the problem was related to GRPC and its environment variables. Look at the first two ENV variable rows here: https://grpc.github.io/grpc/cpp/md_doc_environment_variables.html
As stated:
grpc_proxy
,https_proxy
,http_proxy
The URI of the proxy to use for
HTTP CONNECT support. These variables are checked in order, and the
first one that has a value is used.
no_grpc_proxy
,no_proxy
A comma separated list of hostnames to connect
to without using a proxy even if a proxy is set. These variables are
checked in order, and the first one that has a value is used.
During examination of the logs of the application, it has been discovered that HTTPS_PROXY
and HTTP_PROXY
variables were causing the GRPC connection to fail with the said cryptic error.
Solution: Unset the offending variables in the process before initiating a GRPC connection.