LND Slow Sync or Stuck at Block Height — Fix Bitcoind Connection
ClawLND stuck syncing, showing wrong block height, or can't connect to bitcoind? Here's how to diagnose and fix it.
Check sync status
# Check LND's current block height vs network
lncli getinfo | python3 -c "
import json, sys
d = json.load(sys.stdin)
synced = d.get('synced_to_chain', False)
synced_graph = d.get('synced_to_graph', False)
block_height = d.get('block_height', 0)
print(f'Block: {block_height} | Chain synced: {synced} | Graph synced: {synced_graph}')
"
# Compare with actual chain tip
curl -s https://mempool.space/api/blocks/tip/heightCheck bitcoind connection
# Test if bitcoind is reachable from LND config
cat ~/.lnd/lnd.conf | grep -E 'bitcoind|rpc|zmq'
# Test bitcoind RPC directly
bitcoin-cli -rpcuser=<user> -rpcpassword=<pass> getblockchaininfo | python3 -c "
import json, sys
d = json.load(sys.stdin)
print(f'Bitcoind: {d[\"blocks\"]} blocks, progress: {d[\"verificationprogress\"]:.4f}')
"
# Test ZMQ (LND needs these)
nc -zv 127.0.0.1 28332 # zmqpubrawblock
nc -zv 127.0.0.1 28333 # zmqpubrawtxCheck LND logs for connection errors
sudo journalctl -u lnd --since '30 minutes ago' | grep -iE 'bitcoind|rpc|zmq|connect|error|chain' | tail -30
Fix: LND can't connect to bitcoind
# In ~/.lnd/lnd.conf, verify: [Bitcoind] bitcoind.rpchost=127.0.0.1 bitcoind.rpcuser=<your_rpc_user> bitcoind.rpcpass=<your_rpc_pass> bitcoind.zmqpubrawblock=tcp://127.0.0.1:28332 bitcoind.zmqpubrawtx=tcp://127.0.0.1:28333 # In ~/.bitcoin/bitcoin.conf, verify: server=1 rpcuser=<your_rpc_user> rpcpassword=<your_rpc_pass> zmqpubrawblock=tcp://127.0.0.1:28332 zmqpubrawtx=tcp://127.0.0.1:28333 txindex=1
Fix: LND stuck behind many blocks
# First make sure bitcoind is fully synced bitcoin-cli getblockchaininfo | grep 'verificationprogress' # Should be 0.9999+ # If bitcoind is synced but LND is stuck, restart LND sudo systemctl restart lnd # Watch it catch up watch -n 10 'lncli getinfo | python3 -c "import json,sys; d=json.load(sys.stdin); print(d[\"block_height\"])"'
Need sync/connection help? $9
I debug LND-bitcoind connection issues, ZMQ config, and sync problems. USDT TRC-20.