Lightning: Can't connect to (mainnet) bitcoin-cli

Created on 21 Jan 2018  路  4Comments  路  Source: ElementsProject/lightning

When I try to start lightningd (pulled latest version from repo) on Ubuntu 16.04.3 I get the following error:

bitcoin-cli exited with code 1: error: couldn't connect to server: unknown (code -1)
(make sure server is running and you are connecting to the correct RPC port)

lightningd(13730): bitcoin-cli exited with code 1: error: couldn't connect to server: unknown (code -1)
(make sure server is running and you are connecting to the correct RPC port)

bitcoind is running and bitcoin-cli is working working fine via shell. Do I need to tell lightningd that I use the mainnet?

Most helpful comment

@ldn2017:

mkdir -p $HOME/.lightning/bitcoin
./lightningd/lightningd --network=bitcoin --lightning-dir=$HOME/.lightning/bitcoin --alias i-want-to-lose-money

All 4 comments

By default lightningd will attempt to use testnet, yes.

Is there an quick way to change this?

@ldn2017:

mkdir -p $HOME/.lightning/bitcoin
./lightningd/lightningd --network=bitcoin --lightning-dir=$HOME/.lightning/bitcoin --alias i-want-to-lose-money

Closing for now.

Was this page helpful?
0 / 5 - 0 ratings