0

I have two seperate bitcoin nodes running v23. Both have identical datadir paths. Only difference is that disablewallet=0 in one bitcoin.conf, disablewallet=1 is in the other.

When I start both bitcoind on both with: bitcoind --daemon -datadir-My/nonstandard/path/to/Bitcoin/datadir on one, I am able to call bitcoin-cli with: bitcoin-cli -getinfo

However, the other does not accept the configuration and the above command outputs the error:

Could not locate RPC credentials. No authentication cookie could be found, and RPC password is not set. See -rpcpassword and -stdinrpcpass. Configuration file: (/Your/default/path/to/Bitcoin/bitcoin.conf)

but this works when specifying the -datadir when making the call.

This post suggests it is necessary to specify -datadir, but as I am able to make the call without it, I can't understand what is making it happen/preventing it from happening.

On both nodes, my bitcoin.conf is identical with the exception of one being built with wallet:

# [core]
# [wallet] 
# do not load the wallet and disable wallet RPC calls
disablewallet=0):

and the other,

# [wallet] 
# load the wallet and enable wallet RPC calls
disablewallet=1):


# [core]
# blockchain data
blocksdir=/Path/to/Bitcoin
maxorphantx=200
maxmempool=100
datadir=/Path/to/Bitcoin
dbcache=3000
prune=<N>

# [debug]
debug=mempool
debug=rpc
shrinkdebuglog=1

# [relay]
permitbaremultisig=0

# [network]
listen=0
maxuploadtarget=1000
peerbloomfilters=1
txindex=1
blockfilterindex=1

# [core]
coinstatsindex=1

# [rpc]
server=1
rpcport=8332
rpcallowip=127.0.0.1
rpcallowip=127.0.0.1/24
rpcconnect=127.0.0.1
# Location of the RPC auth cookie
rpccookiefile=/Path/to/Bitcoin/.cookie

# [wallet]
disablewallet=0

# [zeromq]
# Enable publishing of block hashes to localhost:28332
zmqpubrawblock=tcp://127.0.0.1:28332
# Enable publishing of tx hashes to localhost:28333
zmqpubrawtx=tcp://127.0.0.1:28333

I have no alias in bash/zsh on either node. I have also tried using double-quotes around the datadit path at runtime, but I cannot get both nodes to accept the command bitcoin-cli -getinfo

Is this due to the wallet enabled/disabled? What other reason could be for this difference in requirement when calling bitcoin-cli?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.