lnd: Unable to use lncli and tor
Background
We are unable to use lncli
on this node. It isn’t connecting to 127.0.0.1, instead, it is connecting to 36.37.242.94. Similarly, lnd is unable to connect to Tor when it is activated. The lnd-tor error also references 36.37.242.94:9051 instead of the expected 127.0.0.1:9051.
We tried to delete all the tor data and restart the containers, but the error persists. That makes me suspect this ip address (36.37.242.94) is being stored in one of the lnd databases.
The RPC endpoints are still working from other services we have on the node.
Your environment
- Lnd 0.7.0.
- Linux casa-node-apollo 4.14.70-v7+ #2 SMP Wed Sep 19 07:49:26 UTC 2018 armv7l GNU/Linux)
- Bitcoind 0.18.0.
- Running on a raspberry pi 3 b+ in docker containers.
- Tor version 0.3.5.8.
Steps to reproduce
On this device, any lncli call results in an error. Lnd will run with Tor off. Lnd will crash if Tor is active.
Expected behaviour
lncli commands should succeed.
Actual behaviour
bash-4.4# lncli getinfo
[lncli] rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp 36.37.242.94:10009: i/o timeout"
Tor error is something similar, but I don’t have it on me. Can find it if it helps.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 29 (9 by maintainers)
@cedracine glad you were able to resolve the issue! thanks for the help @stridentbean 🎉
Network router settings was the problem. Enabling the use of 1.1.1.1 and 8.8.8.8 in the “PPPoE Advanced Settings” solved it. LN is now stable and channels connected. Thanks for the great support to everyone. Cedric
rpcserver=127.0.0.1:10009
will only getlncli
to work, but it doesn’t solve the tor issue. We are going to trytor.control=127.0.0.1:9051
. My working theory is that the default tor control (localhost) is being updated to an ip address other than 127.0.0.1 AND localhost isn’t being updated to the other ip address in other places in lnd.Could possibly be related to the use of NAT traversal?
It’s easy enough for us (Casa) to hard code in
rpcserver=127.0.0.1:10009
to ourlnd.conf
or our startup script. It’s just really strange that it is needed and really just for this one node. We have a large fleet of nodes and haven’t seen this issue before.lnd.conf
for Casa Nodes are as followsOur
start_lnd.sh
is more complicated, but still no reference to--rpcserver
lncli
doesn’t have any persistent storage so idt this is a database issue.@wpaulino’s idea makes the most sense at this point. Is localhost being overridden in
etc/hosts
? FWIW that IP belongs to Metfone, a Cambodian ISP.