Closed EthnTuttle closed 1 year ago
I tried adding --bitcoin-cli
to the start
function for cln
pub async fn start(process_mgr: &ProcessManager, cln_dir: &Path) -> Result<ProcessHandle> {
let gateway_extension_path = cmd!("which", "gateway-cln-extension")
.out_string()
.await
.context("gateway-cln-extension not on path")?;
let bitcoin_cli_extension_path = cmd!("which", "bitcoin-cli")
.out_string()
.await
.context("bitcoin-cli not on path")?;
let cmd = cmd!(
"lightningd",
"--dev-fast-gossip",
"--dev-bitcoind-poll=1",
format!("--lightning-dir={}", utf8(cln_dir)),
"--plugin={gateway_extension_path}",
"--bitcoin-cli={bitcoin_cli_extension_path}"
);
process_mgr.spawn_daemon("lightningd", cmd).await
}
Which commit are you on? Also, did you try manually running a bitcoin-cli
command? What did the bitcoind
log say?
On master
branch as of last night.
I even nuked the repository and ran just build
to make sure I was current. Same error occurred this morning.
└─(07:01:40 on master)──> nix develop ──(Fri,Aug04)─┘
warning: ignoring untrusted substituter 'https://fedimint.cachix.org', you are not a trusted user.
Run `man nix.conf` for more information on the `substituters` configuration option.
warning: ignoring untrusted substituter 'https://fedimint.cachix.org', you are not a trusted user.
Run `man nix.conf` for more information on the `substituters` configuration option.
⚠️ ulimit too small. Run 'ulimit -Sn 1024' to avoid problems running tests
💡 Run 'just' for a list of available 'just ...' helper recipes
mbp:fedimint ethantuttle$ which bitcoin-cli
/nix/store/6n48iipig86gb9c12dz8szmhngb3hc8q-bitcoind-25.0/bin/bitcoin-cli
mbp:fedimint ethantuttle$ lsof -i | rg 'bitcoind|fedimintd|lightningd|lnd|cln|gatewayd' | awk '{print $2}' | xargs kill -9^C
mbp:fedimint ethantuttle$ bitcoin-cli -regtest -rpcuser=bitcoin -rpcpassword=bitcoin echo 'hello world'
************************
EXCEPTION: St13runtime_error
Invalid combination of -regtest, -signet, -testnet and -chain. Can use at most one.
bitcoin in AppInitRPC()
mbp:fedimint ethantuttle$ bitcoin-cli -rpcuser=bitcoin -rpcpassword=bitcoin echo 'hello world'
error: timeout on transient error: Could not connect to the server 127.0.0.1:38332 (error code 1 - "EOF reached")
Make sure the bitcoind server is running and that you are connecting to the correct RPC port.
mbp:fedimint ethantuttle$ lsof -i | rg bitcoind
bitcoind 54703 ethantuttle 9u IPv6 0x384f1dfb25c0df21 0t0 TCP localhost:18443 (LISTEN)
bitcoind 54703 ethantuttle 10u IPv4 0x384f1e04becebd49 0t0 TCP localhost:18443 (LISTEN)
bitcoind 54703 ethantuttle 22u IPv4 0x384f1e04bede3fa9 0t0 TCP localhost:38332 (LISTEN)
bitcoind 54703 ethantuttle 25u IPv4 0x384f1e04bf3e5369 0t0 TCP localhost:38333 (LISTEN)
bitcoind 54703 ethantuttle 36u IPv6 0x384f1dfb25c0f721 0t0 TCP *:18444 (LISTEN)
bitcoind 54703 ethantuttle 37u IPv4 0x384f1e04bee03499 0t0 TCP localhost:18445 (LISTEN)
bitcoind 54703 ethantuttle 38u IPv4 0x384f1e04bedcde79 0t0 TCP *:18444 (LISTEN)
bitcoind 54703 ethantuttle 39u IPv4 0x384f1e04bef71c19 0t0 TCP localhost:18444->localhost:53932 (ESTABLISHED)
bitcoind 54703 ethantuttle 43u IPv4 0x384f1e04bf35b499 0t0 TCP localhost:38332->localhost:53941 (ESTABLISHED)
bitcoind 54703 ethantuttle 44u IPv4 0x384f1e04bede9369 0t0 TCP localhost:18443->localhost:53950 (ESTABLISHED)
bitcoind 54703 ethantuttle 45u IPv4 0x384f1e04bee15e79 0t0 TCP localhost:38333->localhost:53943 (ESTABLISHED)
mbp:fedimint ethantuttle$
Just pulled current master and rebuilt. Same error in the mprocs.
mbp:fedimint ethantuttle$ bitcoin-cli getblockchaininfo
************************
EXCEPTION: St13runtime_error
Invalid combination of -regtest, -signet, -testnet and -chain. Can use at most one.
bitcoin in AppInitRPC()
in the user
shell, bitcoin-cli is non-fucntional.
trying nix-store --gc
then nix develop
.
trying
nix-store --gc
thennix develop
.
did not work
mbp:fedimint ethantuttle$ bitcoin-cli getblockchaininfo ************************ EXCEPTION: St13runtime_error Invalid combination of -regtest, -signet, -testnet and -chain. Can use at most one. bitcoin in AppInitRPC()
in the
user
shell, bitcoin-cli is non-fucntional.
My best guess: your user has a local bitcoin.conf
, which specifies a network and bitcoin-cli
isn't intelligent enough to notice that the CLI option should override any config that might be there? A fix might be setting the work dir for the CLI as we supposedly do for bitcoind
(there should be some bitcoin folder in the temporary directory created by devimint).
@EthnTuttle: Is there a bitcoin.conf
in ~/Library/Application Support/Bitcoin/
?
This solved it. Thank you.
I’ll dig around for a place to document this. Open to suggestions.
Sent from Proton Mail for iOS
On Mon, Aug 7, 2023 at 11:25, Justin Moon @.***(mailto:On Mon, Aug 7, 2023 at 11:25, Justin Moon < wrote:
@.***(https://github.com/EthnTuttle): Is there a bitcoin.conf in ~/Library/Application Support/Bitcoin/?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
Reopening and assigning to myself to document somewhere.
I tried delaying the start of the CLN to rule out race conditions and had the same error. I reverted to a commit prior to the recent Devimint change, same error. I restarted my machine, same error.