3
1
I run it like the below.
bitcoind -datadir=/Users/varunvb/Downloads -conf=/Users/varunvb/Downloads/bitcoin.conf -daemon
When I run (Using the user name and password as in the config file)
bitcoin-cli -rpcuser=<USER> -rpcpassword=<PWD> getinfo
I get
error: incorrect rpcuser or rpcpassword (authorization failed)
I see the below in the debug log
ThreadRPCServer incorrect password attempt from 127.0.0.1
My bitcoin.conf file looks like this:
-e
rpcuser=<USER>
rpcpassword=<PWD>
What are the contents of
bitcoin.conf? Is there anotherbitcoin-coreinstance running at the same time on the same machine? – George Kimionis – 2015-01-12T16:38:58.763Thanks David for replying! The content inside config file is as below -e rpcuser=<USER> rpcpassword=<PWD> that's it. And no there're no other instances running apart from bitcoind i showed in the question – Ani – 2015-01-12T16:59:22.090
Remove that
– George Kimionis – 2015-01-12T17:04:39.987-ebeforerpcuser. Please consult this sample configuration.bitcoin-cli can read rpcuser and rpcpassword out of your config file. Just pass
-conf=/Users/varunvb/Downloads/bitcoin.confto bitcoin-cli. – Nick ODell – 2015-01-12T17:13:05.963@NickODell has a point. Just call
bitcoin-cli -conf=/Users/varunvb/Downloads/bitcoin.conf -datadir=/Users/varunvb/Downloads getinfoand that should be it. – George Kimionis – 2015-01-12T17:43:27.247@GeorgeKimionis removing -e form the config worked! Thanks! – Ani – 2015-01-12T18:45:54.923
@NickODell I supply the directory as a command line parameter and it works fine. Thanks! – Ani – 2015-01-12T18:46:10.400