Skip to content
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

Error: 2 UNKNOWN: Stream removed #49

Closed
Janaka-Steph opened this issue Jul 31, 2019 · 12 comments
Closed

Error: 2 UNKNOWN: Stream removed #49

Janaka-Steph opened this issue Jul 31, 2019 · 12 comments

Comments

@Janaka-Steph
Copy link

Hello,

Version used: 0.6.0-beta.3

I have an issue with SubscribeInvoices. After 10 to 15 minutes, the connection ends with Error: 2 UNKNOWN: Stream removed.
I found a similar issue here grpc/grpc-node#708

Someone on the LND slack has suggested to increase connection_idle, connection_age and the keepalive settings for the grpc channel.
The parameters should be added here https://github.com/RadarTech/lnrpc/blob/master/lib/lightning.js#L49
The grpc documentation: https://grpc.github.io/grpc/cpp/group__grpc__arg__keys.html

Currently I get around the issue with a setInterval monitoring and retrying connection upon error. But I would be interested to have your opinion about the issue and suggested fix.
Maybe allowing the end-user of lnrpc to set those parameters in the createLnRpc options object would be nice. What do you think?

Thank you

@cavanmflynn
Copy link
Contributor

Sorry for the delay, @Janaka-Steph. I'm attempting to reproduce now. If I can, I'd be more than happy to add a couple grpc args to fix the issue. Will update soon.

@cavanmflynn
Copy link
Contributor

I can't reproduce against LND v0.7.0-beta. I kept the subscribeInvoices stream open for an hour w/ no messages without error. Can you reproduce in v0.7.0-beta or higher, @Janaka-Steph ?

@Janaka-Steph
Copy link
Author

To update lnrpc to v0.7.0-beta I have to use the npm run update-proto command?

@Janaka-Steph
Copy link
Author

@cavanmflynn
Copy link
Contributor

@Janaka-Steph Nope, you'll just need to update the version in your package.json.

^0.7.0-beta.0 if you're using LND v0.7.0-beta OR ^0.7.1-beta if you're using LND v0.7.1-beta

@Janaka-Steph
Copy link
Author

Hello! So I have updated lnrpc to v0.7.1-beta. I still have the error in prod on digital ocean, but can't reproduce on local.. So maybe there is something else than lnrpc.
I don't know if you want to dive further, we can also close the issue and someone may reopen it later.

@panoti
Copy link

panoti commented Sep 17, 2019

I think this error come from grpc.

@Janaka-Steph
Copy link
Author

By pinging LND every 5 minutes (with GetInfo) I get rid of the errors 2 UNKNOWN: Stream removed and 14 UNAVAILABLE. My guess is that my nginx configuration is the issue, need more investigation.

@jake-unl
Copy link

Hi Janaka-Steph,

Did you get anywhere with this error? Was it indeed coming from grpc?

J

@Janaka-Steph
Copy link
Author

Hello @jake-unl,

No I have never been able to fix it and I still don't know the cause.
I recently moved to the ln-service library. I still ping the node because I still loose the connection after some minutes, but ln-service is more stable, even if I don't ping, my app will still be able to work properly and reconnect by himself. I am sorry if I am not clear enough, it's hard to explain like that.

@parkergordonio
Copy link

parkergordonio commented Aug 20, 2020

This is because the proxy or gRPC server is expecting traffic over TLS/SSL btw @jake-unl @Janaka-Steph

@Janaka-Steph
Copy link
Author

Oh wow, this issue caused me so much trouble, thank you @parkergordonio !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants