When I run this command

bitcoind -testnet -printtoconsole -rpcuser=123456 -rpcpassword=123456

After bitcoind is up. I run this on the same Ubuntu 17.10

bitcoin-cli -testnet -rpcuser=123456 -rpcpassword=123456 getbalance

I get this result: error: incorrect rpcuser or rpcpassword (authorization failed) The second day I tried exactly the same way. I get the correct result. It is really weird.

I try to put these two lines in /home/user/.bitcoin/bitcoin.conf


And I run this command

bitcoind -testnet -printtoconsole -conf=/home/gogogo237/.bitcoin/bitcoin.conf

And this

bitcoin-cli -testnet -rpcuser=123456 -rpcpassword=1234564 getbalance

notice that I intentionally changed -rpcpassword to a wrong password. But I still can get a correct result. This is really unpredictable and obviously a mistake. Anyone can explain this error? Thanks!

  • interesting, but for sure not the default behavious. I am normally on OpenSuSE. I have self compiled and downloaded full clients. Please provide some more info: did you use bitcoin core from website? Self compiled? apt-get? Did you check download files (hash)? I think I have a fresh Ubuntu virtual machine, where I could try to install the one you where using... Sep 12, 2017 at 17:26
  • Self compiled from the newest source code. Sep 13, 2017 at 7:04
  • similiar discussion here, as bitcoin15 is not yet released: bitcointalk.org/index.php?topic=2172765.0. You downloaded from github.com/bitcoin/bitcoin? Sep 13, 2017 at 14:48
  • just downloaded from github, and couldn't compile, cause autoconf throws already some errors. And for sure ./configure as well. Damn, wanting to help, and now need help myself ... Sep 13, 2017 at 18:04
  • To avoid others doing same error (RTFM correctly, not in a rush): autogen.sh, not autoconf !! Now it's compiling. Update to follow. Sep 13, 2017 at 18:35

2 Answers 2


re-compiled on an Ubuntu system, fresh from github.com:

$ uname -a
Linux ubuntu-ae 4.10.0-19-generic

$ bitcoind -version
Bitcoin Core Daemon version v0.15.99.0-g96ac26e5662

$ bitcoind -testnet -printtoconsole -rpcuser=123456 -rpcpassword=123456

$ bitcoin-cli -testnet -rpcuser=123456 -rpcpassword=123456 getaccountaddress "myaccount"

$ bitcoin-cli -testnet -rpcuser=123456 -rpcpassword=123456 getbalance

and with wrong password:

$ bitcoin-cli -testnet -rpcuser=123456 -rpcpassword=1234564 getbalance
error: incorrect rpcuser or rpcpassword (authorization failed)

so s.th. is wrong with the sources? Or with Ubuntu setup. What kernel do you have (uname -a) ?

  • just compiled the newest version. Here is my command $ bitcoind -testnet -printtoconsole -rpcuser=123456 -rpcpassword=123456 bitcoin-cli -testnet getbalance It just work! Wierd. Sep 22, 2017 at 2:57

In case you changed your /etc/systemd/system/bitcoind.service make sure you run

 sudo systemctl stop bitcoind
 sudo systemctl daemon-reload
 sudo systemctl start bitcoind

to apply the changes.

The error from the question could (and did in my case) arise because I did not use daemon-reload to load the new config.

  • While this advice may be useful, the question doesn't ask anything about systemd or with changing systemd service files.
    – Ava Chow
    Nov 15, 2020 at 23:20
  • The error from the question could (and did in my case) arise because I did not use daemon-reload to load the new config. Since this solved my problem - which was the same as OPs - I thought it would be a good thing to know.
    – bomben
    Nov 16, 2020 at 15:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.