ElementsProject / lightning

Core Lightning — Lightning Network implementation focusing on spec compliance and performance
Other
2.87k stars 906 forks source link

"Ran out of routes to try after 1 attempt: see paystatus" in local testnet setup #3463

Closed s-tikhomirov closed 4 years ago

s-tikhomirov commented 4 years ago

Issue and Steps to Reproduce

I have a setup of 4 testnet LN nodes on localhost. I denote them as M - A - B - C. They have opened channels in this topology. However, I can't send a payment from M to C.

Note: I aliased the corresponding lightning-cli call as lna and the node ID as LNAT for node A, and analogously for B, C, and M.

getroute indicates that the route for 1 satoshi exists:

$ lnm getroute $LNCT 1000 1
{
   "route": [
      {
         "id": "024c2d485bab58bfde4578937bb16160f87cb91868fe2fefc238ea53455e4d7244",
         "channel": "1664146x201x0",
         "direction": 1,
         "msatoshi": 1002,
         "amount_msat": "1002msat",
         "delay": 21,
         "style": "tlv"
      },
      {
         "id": "02f67d5b7185ac67172807fc8f9d6b000305e93793332ed5a2087478a69909371e",
         "channel": "1664152x145x0",
         "direction": 0,
         "msatoshi": 1001,
         "amount_msat": "1001msat",
         "delay": 15,
         "style": "tlv"
      },
      {
         "id": "03e1bfbd3d70dc71c9baf64d7ad569de5b32d3f9b591699af7fce04ae2f03fa598",
         "channel": "1664152x146x0",
         "direction": 0,
         "msatoshi": 1000,
         "amount_msat": "1000msat",
         "delay": 9,
         "style": "tlv"
      }
   ]
}

However, when I generate an invoce at C and try to pay it from M, I get:

{
   "code": 210,
   "message": "Ran out of routes to try after 1 attempt: see paystatus"
}

The logs from all 4 nodes are attached:

logA-1.log logB-1.log logC-1.txt logM-1.txt

getinfo output

{
   "id": "026e7cb4237b4042db75a991af29c2d7704780c8e7fbebe5fdbad8f38e958dfba5",
   "alias": "clightningM",
   "color": "026e7c",
   "num_peers": 1,
   "num_pending_channels": 0,
   "num_active_channels": 1,
   "num_inactive_channels": 0,
   "address": [],
   "binding": [
      {
         "type": "ipv4",
         "address": "127.0.0.1",
         "port": 9737
      }
   ],
   "version": "v0.8.0-40-g899f5de",
   "blockheight": 1664240,
   "network": "testnet",
   "msatoshi_fees_collected": 0,
   "fees_collected_msat": "0msat",
   "lightning-dir": "/home/sergei/.lightning/testnet",
   "warning_lightningd_sync": "Still loading latest blocks from bitcoind."
}
s-tikhomirov commented 4 years ago

Sorry for creating this: the reason was my mistake. When setting up one of the channels, I messed up sats and msats and sent 30 sats to the other end instead of 30k sats. The result was insufficient capacity at that hop.

cdecker commented 4 years ago

No worries :wink: