lightningnetwork / lnd

Lightning Network Daemon ⚡️
MIT License
7.69k stars 2.08k forks source link

lnd getting stuck #4059

Closed anonproject closed 4 years ago

anonproject commented 4 years ago

For some reason lnd refused to accept new blocks from bitcoind. The problem has been solved after restart of lnd: https://github.com/lightninglabs/loop/issues/166

bitcoind v0.18.1 lnd v0.9.1beta ElectrumX 1.14.0 Ubuntu v18.4.04 LTS

It was suggested to me that the problem might be with ElectrumX so that it conflicts with lnd. Well, it would be strange to say the least. I am dropping the configs of ElectrumX and lnd.

lnd.conf

[Bitcoind]

; The host that your local bitcoind daemon is listening on. By default, this
; setting is assumed to be localhost with the default port for the current
; network.
bitcoind.rpchost=127.0.0.1:19832

; Username for RPC connections to bitcoind. By default, lnd will attempt to
; automatically obtain the credentials, so this likely won't need to be set
; (other than for a remote bitcoind instance).
bitcoind.rpcuser=bitcoin

; Password for RPC connections to bitcoind. By default, lnd will attempt to
; automatically obtain the credentials, so this likely won't need to be set
; (other than for a remote bitcoind instance).
bitcoind.rpcpass=xxxyyyzzz

; ZMQ socket which sends rawblock and rawtx notifications from bitcoind. By
; default, lnd will attempt to automatically obtain this information, so this
; likely won't need to be set (other than for a remote bitcoind instance).
bitcoind.zmqpubrawblock=tcp://127.0.0.1:28332
bitcoind.zmqpubrawtx=tcp://127.0.0.1:28333

electrumx.conf

# default /etc/electrumx.conf for systemd

# REQUIRED
DB_DIRECTORY = /var/hdd/electrumx/
# Bitcoin Node RPC Credentials
#DAEMON_URL = http://username:password@hostname:port/
DAEMON_URL = http://bitcoin:xxxyyyyzzz@127.0.0.1:19832/

COIN = BitcoinSegwit

# See http://electrumx.readthedocs.io/en/latest/environment.html for
# information about other configuration settings you probably want to consider.

DB_ENGINE=rocksdb

SSL_CERTFILE=/etc/electrumx/server.crt
SSL_KEYFILE=/etc/electrumx/server.key
#TCP_PORT=50001
#SSL_PORT=50002
# Listen on all interfaces:
HOST=

TOR_PROXY_HOST=127.0.0.1
TOR_PROXY_PORT=9051

SERVICES=ws://127.0.0.1:50001,rpc://127.0.0.1:8000,tcp://127.0.0.1:50011

UPD bitcoin.conf:

daemon=1
txindex=1
debuglogfile=/var/log/bitcoind/bitcoind.log
shrinkdebuglog=1
rpcauth=bitcoin:xxxyyyzzz
rpcallowip=127.0.0.1
rpcbind=127.0.0.1:19832

proxy=127.0.0.1:9051
bind=127.0.0.1
listenonion=1
torcontrol=127.0.0.1:19051

onlynet=onion
dnsseed=0
dns=0

banscore=50
bantime=172800

peerbloomfilters=1

UPD2 another section of lnd.conf:

[tor]
; The port that Tor's exposed SOCKS5 proxy is listening on. Using Tor allows
; outbound-only connections (listening will be disabled) -- NOTE port must be
; between 1024 and 65535
tor.socks=9051

; The DNS server as IP:PORT that Tor will use for SRV queries - NOTE must have
; TCP resolution enabled. The current active DNS server for Testnet listening is
; nodes.lightning.directory
; tor.dns=nodes.lightning.directory
tor.dns=lseed.bitcoinstats.com

; Enable Tor stream isolation by randomizing user credentials for each
; connection. With this mode active, each connection will use a new circuit.
; This means that multiple applications (other than lnd) using Tor won't be mixed
; in with lnd's traffic.
tor.streamisolation=true

tor.active=true
tor.v3=true
tor.control=127.0.0.1:19051
Roasbeef commented 4 years ago

Not much we can do with this information, but if ElectrumX is using a lot of RPC threads, then it's possible that it overrides some in-flight lnd RPC requests. If you're running with the default settings for the number of RPC threads, then we don't recommend running more than one application connected to bitcoind.

As we can't reproduce given the current information, closing this for now.