Categories
Bitcoin Cryptocurrency Mastering Development

My lightning node is unreachable and lightning-rpc’: Connection refused

I’m trying to use c-lightning on my raspberry.
When start the lightning daemon I get two errors:
the first one is:

2020-06-05T17:02:08.784Z DEBUG connectd: Failed to connect 10 socket: Network is unreachable

My .lightning/config is:

alias=LIGHTNING_NODE_ROCK
rgb=DDFF06
addr=:9735
log-level=debug
network=testnet
bitcoin-cli=/usr/local/bin/bitcoin-cli
bitcoin-datadir=/home/bitcoin/.bitcoin
log-prefix=raspi-lightning
ignore-fee-limits=true
fee-base=10
bitcoin-rpcuser=user
bitcoin-rpcpassword=userpass
bitcoin-rpcconnect=127.0.0.1
bitcoin-rpcport=18332

my bitcoin.conf is:

testnet=1
[test]
rpcuser=user
rpcpassword=userpass
rpcport=18332
rpcconnect=127.0.0.1

telnet works on my public ip and 9735

I tried to connect to someone like:

bitcoin@raspberrypi:~ $ ln-cli connect 03ad4870c7a9dd0b429958cf9659b1330afbe33df8207cd1c882798cdad1dfb039@5.95.80.47:9737
{
   "code": 401,
   "message": "5.95.80.47:9737: Connection establishment: Connection timed out. "
}

the second problem is:

2020-06-05T17:02:08.864Z UNUSUAL plugin-bcli: Could not connect to 'lightning-rpc': Connection refused
2020-06-05T17:02:08.865Z INFO plugin-bcli: bitcoin-cli initialized and connected to bitcoind.

My Info is:

bitcoin@raspberrypi:/mnt/hdd/bitcoin $ ln-cli getinfo  
{
   "id": "0310e9f97def619a7ee02b321cf2fad4f67b59f2c6bd12456dc8d6d8be125e1b14",
   "alias": "LIGHTNING_NODE_ROCK",
   "color": "ddff06",
   "num_peers": 0,
   "num_pending_channels": 0,
   "num_active_channels": 0,
   "num_inactive_channels": 0,
   "address": [],
   "binding": [
      {
         "type": "ipv6",
         "address": "::",
         "port": 9735
      },
      {
         "type": "ipv4",
         "address": "0.0.0.0",
         "port": 9735
      }
   ],
   "version": "v0.8.2-198-g0f568e1",
   "blockheight": 1747789,
   "network": "testnet",
   "msatoshi_fees_collected": 0,
   "fees_collected_msat": "0msat",
   "lightning-dir": "/home/bitcoin/.lightning/testnet"
}

My testnet is fully sync and I’m able to use rpc calls form my bitcoin-cli

bitcoin@raspberrypi:/mnt/hdd/bitcoin $ bitcoin-cli echo hello world
[
  "hello",
  "world"
]

I don’t have any firewall

Leave a Reply

Your email address will not be published. Required fields are marked *