After installing bitcoin on CentOS/AWS, an error occurs when connecting with cli.
$ bitcoind -daemon -conf=/.bitcoin/bitcoin.conf
Bitcoin server starting
$ bitcoin-cli getbalance
error: Authorization failed: Incorrect rpcuser or rpcpassword
The following is bitcoin.conf.
mainnet = 1
txindex = 1
server = 1
rest = 1
rpcuser = a
rpcpassword = a
rpcport = 8332
-conf=/.bitcoin/bitcoin.conf
is unusual as it suggests you're keeping the.bitcoin
outside your/home
folder. If that's a mistake, it would explain why bitcoin-cli can't find the credentials - the conf file you're specifying doesn't exist. Are you sure you sure you don't mean-conf=/home/<user>/.bitcoin/bitcoin.conf
?/.bitcoin/bitcoin.conf
which is not the same as~/.bitcoin/bitcoin.conf
. The first says start in the root of your file system, the second - with a tilde '~' - says to start in your home folder.