0

I am really sorry, please teach. Please tell me the procedure for installing bitcoin full node in CUI on CentOS. Currently I installed using the following procedure, but I got an error in RPC authentication.

1. $ sudo yum install wget

2. $ sudo wget https://bitcoin.org/bin/bitcoin-core-0.17.1/bitcoin-0.17.1-x86_64-linux-gnu.tar.gz

3. $ sudo wget https://bitcoin.org/bin/bitcoin-core-0.17.1/SHA256SUMS.asc

4. $ sudo wget https://bitcoin.org/laanwj-releases.asc

5. $ sudo gpg --import laanwj-releases.asc

6. $ sudo tar -zxvf bitcoin-0.17.1-x86_64-linux-gnu.tar.gz

7. $ sudo install -m 0755 -o USER_NAME -g root -t /usr/local/bin bitcoin-0.17.1/bin/*

8. $ mkdir ~/.bitcoin

9. $ vi ~/.bitcoin/bitcoin.conf

  1. Enter the following with vi and save.
mainnet = 1
txindex = 1
server = 1
rest = 1
rpcuser = a
rpcpassword = a
rpcport = 8332

11. $ cd /DATA_DIR

12. $ sudo mkdir bitcoin

13. $ sudo chmod -R 777 bitcoin/

14. $ bitcoind -daemon -datadir=/DATA_DIR/bitcoin -conf=/.bitcoin/bitcoin.conf

Bitcoin server starting

15. $ bitcoin-cli getbalance

After this, the following URL error will occur. error: Authorization failed: Incorrect rpcuser or rpcpassword

error: Authorization failed: Incorrect rpcuser or rpcpassword

Which procedure is wrong and how do I fix it? I am really sorry, please teach.

0

In your bitcoin.conf, remove the spaces before and after the equals (=) sign. I believe the conf file parser does not handle spaces well.

Also, your command has -conf=/.bitcoin/bitcoin.conf, but your conf file is at ~/.bitcoin/bitcoin.conf so it is pointing to the wrong location.

  • As you say, I deleted the space before and after = and corrected the path specification when starting bitcoind, and RPC worked correctly. Thank you!  bitcoind -daemon -datadir=/DATA_DIR/bitcoin -conf=/home/USER_DIR/.bitcoin/bitcoin.conf – user93369 Apr 2 at 6:51

Your Answer

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

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