AnswerBun.com

Bitcoind could not locate RPC credentials but rpcuser and password are set

Bitcoin Asked by Nicklessguy on August 29, 2020

I installed bitoind and synced it. But when i’m trying to connect from my php website i getting:
Unable to connect to http://user:[email protected]:18332/.
Also when i’m trying to see password through command

bitcoin-cli -stdinrpcpass getblockchaininfo

it returns

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

My bitcoin.conf file is setted and works nice

rpcuser=USER
rpcpassword=PASS
testnet=0
daemon=1
rpcport=18332
rpcallowip=*
server=1
datadir=/blockchain/.bitcoin
txindex=1

One Answer

I found I had to copy the contents of ~/.bitcoin/bitcoin.conf into /etc/bitcoin/bitcoin.conf because that's what's being used when bitcoind starts on boot up. I put my user and password in that file, rebooted, and bitcoin-cli worked again.

Also try adding

bitcoin-cli -stdinrpcpass getblockchaininfo -rpcuser user -rpcpassword password

Answered by MikeHelland on August 29, 2020

Add your own answers!

Related Questions

Plain text for the Bitcoin symbol

5  Asked on February 18, 2021 by frdsbend

     

Candle decimal places

1  Asked on February 15, 2021 by matheus

   

How to fix Bitcoin QT loading issue

1  Asked on February 11, 2021 by t-erry

   

What is a ‘Satoshi’?

5  Asked on January 16, 2021 by nmat

       

Old wallet from old phone

1  Asked on January 8, 2021 by r4c00n

 

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir