question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Receiving RST_STREAM with error code 2 while using grpc secure channel

See original GitHub issue

Problem description

We are using grpc to communicate between services. For production deployment, we switched to server authentication. We have a bi-directional streaming grpc service - which expects audio chunks in streaming fashion & sends transcripts as responses in a streaming manner. After getting the final response, we get this error: 13 INTERNAL: Received RST_STREAM with error code 2 Wasn’t getting this error in case of insecure channel/no authentication. Furthermore, can’t find any error on the server side.

Reproduction steps

Will try to include a repo soon.

Environment

  • OS name, version and architecture: Linux Ubuntu 18.04.2 LTS x86-64
  • Node version: v10.19.0
  • Package name and version: “@grpc/grpc-js”: “1.1.0”, “grpc”: “1.24.4”

Additional context

Using AWS grpc load balancer for server. Server code is implemented in python. Had written a small piece of code to check if this error is encountered in the case of a python client, and we observed that this error is not seen there.

Nodejs client code for initializing the grpc client:

const ssl_creds = grpc.credentials.createSsl();
let client = new zapr_speech_proto.Speech(this.server_address, ssl_creds);

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:16 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Kupstascommented, Apr 28, 2021

@riyashah17 Our balancer is cutting stream when data is not being sent for more than 1 min. Maybe you have the same problem

0reactions
krypticJinklecommented, Nov 10, 2022

add keep-alive parameters with appropriate values

Read more comments on GitHub >

github_iconTop Results From Across the Web

Receiving RST_STREAM with error code 2 while using grpc ...
We are using grpc to communicate between services. For production deployment, we switched to server authentication. We have a bi-directional ...
Read more >
Performance best practices with gRPC - Microsoft Learn
A gRPC channel uses a single HTTP/2 connection, and concurrent calls are multiplexed on that connection. When the number of active calls ...
Read more >
gRPC over HTTP2
When an application or runtime error occurs during an RPC a Status and Status-Message are delivered in Trailers. In some cases it is...
Read more >
Basics tutorial | Python - gRPC
Define a service in a .proto file. Generate server and client code using the protocol buffer compiler. Use the Python gRPC API to...
Read more >
Client — grpclib documentation
Client . A single Channel represents a single connection to the server. Because gRPC is based on HTTP/2, there is no need...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found