LND Pathfinding Errors — Fix Route Calculation and Payment Failures

LND Pathfinding Errors — Fix Route Calculation and Payment Failures


LND Pathfinding Errors: Complete Troubleshooting Guide

LND uses a modified Dijkstra algorithm for pathfinding. When payments fail, the error often lies in pathfinding configuration.

COMMON ERRORS:

1. "no route found" / "unable to find a path"
Cause: No viable path exists given current channel balances and fees
Fix:
- lncli queryroutes --dest <pubkey> --amt <sats> (diagnose)
- Increase --maxhops (default 20)
- Use --fee_limit_sat to allow higher fees
- Enable MPP: lncli sendpayment --max_parts 10

2. "insufficient local balance"
Cause: Outbound channel capacity exhausted
Fix:
- lncli openchannel --node_key <peer> --local_amt <sats>
- Rebalance: bos rebalance --in <chan_id> --out <chan_id> --amount <sats>
- Or use circular rebalance via loop out

3. "CLTV limit exceeded"
Cause: Route requires too many hops with high CLTV deltas
Fix:
- lncli updatechanpolicy --time_lock_delta 40 (lower your delta)
- Set --cltv_limit higher in payment command
- Avoid routing through nodes with delta > 144

4. Probability-based pathfinding failures (Mission Control)
Cause: LND penalizes recently-failed routes
Fix:
- lncli resetmc (reset mission control)
- lncli querymc --list (inspect penalties)
- Adjust --time_pref (0=cheap, 1=fast)

5. "payment attempt timeout"
Cause: Route calculation taking too long
Fix:
- lncli sendpayment --timeout_seconds 120
- Reduce network size by pruning old channels
- Enable --pathfinding_mode=bimodal for better probability estimates

ADVANCED: Bimodal Pathfinding (LND 0.17+)
lnd.conf:
[routing]
routing.strictgraphpruning=true
routing.pathfindingconfig.attemptcost=100
routing.pathfindingconfig.attemptcostppm=1000

DIAGNOSTIC COMMANDS:
- lncli describegraph | jq '.edges | length' (check graph size)
- lncli getnetworkinfo (overall stats)
- lncli listchannels --active_only (active channels)
- tail -f ~/.lnd/logs/bitcoin/mainnet/lnd.log | grep -i "path\|route"

Lightning Network pathfinding is probabilistic. Consistent failures = rebalancing needed or channel strategy review required.

Report Page