-
Notifications
You must be signed in to change notification settings - Fork 653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Express App crashing citing "Stream Removed" #708
Comments
Currently, I am not sure what the root cause of that problem might be. One thing that might help is to try using the |
The other thing that may help is that this error is a nested one. We won't print nested errors unless some traces and/or verbosity is activated. Try running this with the |
Unfortunately, it's happening to us every few hours on our production, we are still trying to tackle it, it's not crashing the app since we handling it well but the requests that running on the same time are getting failed (since no API call succeed) |
I am also experiencing a similar error when running a Hyperledger Fabric application. I am not sure if they are related. Error: (node:7789) UnhandledPromiseRejectionWarning: Error: 2 UNKNOWN: Stream removed |
I have the same question, there has any resolution |
Same here, only on production env :( |
@Xuhao Adding a retry would solve this problem when request level error happen |
Me too. This error sometimes occurs. |
@murgatroid99 @nicolasnoble I can consistently reproduce this.
Whenever I Is there a clean way of handling this? I'm trying to build fault tolerance to my gRPC calls but I simply can't catch this error to handle it! |
In our end, we found out that we haven't meshed our services. Try to look on LinkerD or Istio. If it's a matter of routing on http2 it can be resolved that way. |
@idangozlan Thanks, but this is from simple local testing; I'm just trying to connect to an RPC server on localhost, start listening on a stream, and then kill the RPC server. |
@paambaati A line in the middle of your error message says: Can you share a simple code snippet that reproduces this problem? |
We have this Our production is run on k8s cluster, and access grpc service via service name(dns resolver is CoreDNS). Before we set service host to After we change service host by ENV variables(inject by k8s) to Our test env is quite simple, services run in docker container expose by different port. access each other by So is this a network problem? |
@murgatroid99 I have a repro script at paambaati/node-liftbridge@d516570 Steps to reproduce
Steps 1 and 2 set up the local gRPC server. |
I think you're missing a step because Also, there are a couple of ways of simplifying that test code, that might also be useful in general. There is no need to construct a generic |
@murgatroid99 Oops, I’d linked the wrong repo; I’ve now got edited my last comment with the correct repo.
Fair enough, I’ll keep that in mind. Thanks for the tips! The bug-repro script was partially copied from the library I’m building; it tries to connect to multiple servers in the cluster and use the connection that succeeds first (and keep the others in a pool for continually fetching metadata), so that’s why I explicitly connect first and then use that channel.
Didn’t know this, I’ll use that! |
OK, I got it working, and I got the expected output: a |
@murgatroid99 You got the Can you think of what might be wrong in my setup? |
What version of Node are you using? It shouldn't make a difference, but it's the only difference in setup I can think of. |
@murgatroid99 I’m on Node 12.9.1 and macOS Mojave. |
Mac might be the difference. I'm testing this on Linux (specifically Debian). |
@murgatroid99 Are there more logs/traces I can provide? This is a blocker and I'd love to help fix this. |
I'm sorry, but I honestly have no idea what could make errors bypass the error listener like that. And it might not be a grpc-specific problem. |
On docker swarm, I changed |
we are having the same issue only in production
We tried everything. We are running on kubernetes in gke. And its somehow a network error between kubernetes pods/services i think. Some kube-proxy problem or the way internal cluster persistent connections are handled we honestly dont know. ill try to replicate the cluster and get some internal network adapter logs but this will take a while. Its pretty random else and we can not stack trace it further thoorugh the app. Its Node.js apps connecting a bidirectional grpc stream. |
I guess this problem happen beacause env setting |
I also get this error when the gRPC server throws Error 13, Internal error.
The issue is that there seems to be no way to catch the error in the application. |
@jwulf Yup. I am getting the same error too when using zeebe-node |
I am getting a similar error on and off while making calls to the gRPC go server. RPC calls are failing which is causing data inconsistency. I have a setup a node client running on lambda which connects to go gRPC server.
I have kept keepalive setting for node-client as: And go server as: Please suggest any workaround for this. Maybe catching this error and calling the rpc again. I have checked every possible article out there. No possible solution yet. Please help. |
Sometime we got same error on EKS with grpc-node.
|
Yes, you can catch deep errors in the listener, using an interceptor. |
I experienced the same issue with the EKS cluster using AWS NLB. I tried to play with keepalive timeouts in gRPC options on both sides. I solved the issue by creating a secure gRPC server on the app side. |
Just to add to the chorus, we also observe |
The application exit happens when there is no listener on the
Streaming calls extend |
It looks like it can emit I was removing the |
These errors may be happening or due to the secure connection |
Apologies in advance if this is on my end, struck out at StackOverflow and another resource using this package similarly.
I saw similar issues posted here in my search that were upstream resolutions.
Problem description
Express App crashing citing "Stream Removed"
Reproduction steps
grpc installed via npm for use in express app, application works fine in short-timeframe testing but eventually crashes in production tests.
Environment
Additional context
Usage context:
The text was updated successfully, but these errors were encountered: