thunderhub icon indicating copy to clipboard operation
thunderhub copied to clipboard

Thunderhub cannot connect to node in another namespace

Open krtk6160 opened this issue 4 years ago • 8 comments

Describe the problem/bug When specifying an account for a node that is not in the same namespace as thunderhub, there's an error stating 'Unable to connect to node'

Your environment

  • Version of ThunderHub: v0.12.7
  • Deployment method: Using official docker image in a Kubernetes deployment

To Reproduce Steps to reproduce the behavior:

  1. Deploy lnd to namespace A, with a service named lnd
  2. Deploy thunderhub to namespace B, with an account with serverUrl: lnd.A:10009
  3. Try logging into the account

Expected behavior I would expect thunderhub to connect to services of any namespace, and be able to manage multiple LNDs across the entire cluster.

Actual behavior Thunderhub only works with LND deployed to the same namespace as itself.

Additional context Using different serverUrl like lnd.A.svc.cluster.local:10009 also does not work. Specifying the IP address of the LND pod from the other namespace also does not work.

krtk6160 avatar Mar 17 '21 20:03 krtk6160

Hey! It should work, can you try adding the gRPC port to the url? like serverUrl: lnd.A:10009

apotdevin avatar Mar 19 '21 19:03 apotdevin

Hey! It should work, can you try adding the gRPC port to the url? like serverUrl: lnd.A:10009

Sorry, I didn't mention that I had actually put the port. It still does not work.

krtk6160 avatar Mar 19 '21 20:03 krtk6160

I'm also trying to connect from a Docker environment to another bare metal server and it's just not working.

DocBrown101 avatar Jun 02 '21 06:06 DocBrown101

I always get only this error message: 2021-06-02 15:39:03 error [THUB]: Unable to connect to this node: [ 503, 'FailedToConnectToDaemon', [length]: 2 ]

DocBrown101 avatar Jun 02 '21 15:06 DocBrown101

I have found the solution for this. In the lnd.conf the parameter tlsextradomain must be set.

It was well described here: https://raw.githubusercontent.com/alexbosworth/ln-service/master/README.md

If you are interacting with your node remotely, make sure to set (in [Application Options])

tlsextradomain=YOURDOMAIN

DocBrown101 avatar Jun 03 '21 20:06 DocBrown101

Thank you @DocBrown101

I had the same problem and fixed it by adding to my lnd.conf

tlsextradomain=lnd

where lnd is my docker network. Then I deleted my tls.cert and tls.key, and restarted my lnd node.

aureleoules avatar Aug 07 '21 23:08 aureleoules

rpclisten=0.0.0.0:10009 also should be added to lnd.conf. ref: https://github.com/lightninglabs/lightning-terminal/blob/master/doc/config-lnd-remote.md

soonoo avatar Aug 14 '21 21:08 soonoo

where lnd is my docker network.

Thanks for the hints 😆

I had to use my container name, docker network (name) was not working

thespielplatz avatar Feb 16 '23 13:02 thespielplatz