Bitcoin

Bitcoin Core – CLN configuration file not recognized option

I’m trying to connect CLN to a running Bitcoin Core node, but I’m getting a message that my configuration file contains unrecognized options. I thought the problem was that the Bitcoin node’s data directory was on a USB drive with a space in the directory name.

my cln.conf The file is structured as follows:

bitcoin-rpcconnect=127.0.0.1
bitcoin-rpcport=8332
bitcoin-rpcuser=btcuser
bitcoin-rpcpassword=btcpw
bitcoin-cli=/home/myuser/bitcoin-core/bitcoin-cli
bitcoin-datadir=/media/myuser/Seagate\ Expansion\ Drive/bitcoin/

network=bitcoin

proxy=127.0.0.1:9050
addr=statictor:127.0.0.1:9051
bind-addr=127.0.0.1:9735
always-use-proxy=true
tor-service-password=torpw

When I try to run CLN, I get the following error:

$ lightningd --conf=../cln.conf 

lightning-cli exited with code 3: lightning-cli: -datadir=/media/myuser/Seagate\\ Expansion\\ Drive/bitcoin/: unrecognized option


Make sure you have bitcoind running and that bitcoin-cli is able to connect to bitcoind.

You can verify that your Bitcoin Core installation is ready for use by running:

    $ lightning-cli -datadir=/media/myuser/Seagate\\ Expansion\\ Drive/bitcoin/ -rpcconnect=127.0.0.1 -rpcport=8332 -rpcuser=... -stdinrpcpass echo 'hello world'
The Bitcoin backend died.

The Bitcoin backend is not dead. You can still access the node using bitcoin-cli.

$ ./bitcoin-cli --rpcconnect=127.0.0.1 --rpcport=8332 --rpcuser=btcuser --rpcpassword=btcpw getbestblockhash
00000000000000000002b050f0ab9cb9f0f7c5ed4e4fc59f02debe724c571690

So I tried to annotate it. bitcoin-datadir line in the configuration file. Then I get the following error:

$ lightningd --conf=./cln.conf 

lightning-cli exited with code 3: lightning-cli: -rpcconnect=127.0.0.1: unrecognized option


Make sure you have bitcoind running and that bitcoin-cli is able to connect to bitcoind.

You can verify that your Bitcoin Core installation is ready for use by running:

    $ lightning-cli -rpcconnect=127.0.0.1 -rpcport=8332 -rpcuser=... -stdinrpcpass echo 'hello world'
The Bitcoin backend died.

These settings are all in the documentation. Why do you say it is unrecognizable?

Related Articles

Back to top button