Nikolay Babanov
Nikolay Babanov

Reputation: 421

Cryptic gRPC error: Received RST_STREAM with code 5

Setup

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.

Upvotes: 0

Views: 271

Answers (1)

Nikolay Babanov
Nikolay Babanov

Reputation: 421

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:

Utilize the grpc.enable_http_proxy client channel argument with a value of 0.

Upvotes: 0

Related Questions