how do i proceed with this error?

6 replies 322 views
hawk_guruMember
Posts: 3 · Reputation: 133
#1Aug 23, 2019, 05:24 AM
so i set up a user and password, but I'm hitting this error message. bitcoin-cli migratewallet error: Could not locate RPC credentials. No authentication cookie could be found, and RPC password is not set. See -rpcpassword and -stdinrpcpass. Configuration file: (/home/ca/.bitcoin/bitcoin.conf) anyone know how to fix this?
2 Reply Quote Share
Posts: 54 · Reputation: 222
#2Aug 23, 2019, 07:26 AM
You meant rpc username and password? Because if so, those should be provided along with the bitcoin-cli command with --rpcuser and --rpcpassword args. You may also utilize the cookie file if you prefer not to use rpc username and password, To do that, don't set any of those in your bitcoin.conf file, just set server=1 without rpcuser and rpcpassword. But the datadir should be provided in the command if it's not the default.
3 Reply Quote Share
hawk_guruMember
Posts: 3 · Reputation: 133
#3Aug 23, 2019, 07:58 AM
bitcoin-cli -rpcuser=user -rpcpassword=mypassword  getblockchaininfo error get: Authorization failed: Incorrect rpcuser or rpcpassword but the user and password is correct.
4 Reply Quote Share
Posts: 54 · Reputation: 222
#4Aug 23, 2019, 01:26 PM
Hmm, try to double-check your bitcoin.conf file in /home/ca/.bitcoin/bitcoin.conf if it's really the case. Or have you restarted your node after changing the settings in your config file? Because if not, you must restart it for the new settings to apply. If you're having trouble with rpc user and password, try to use the ".cookie file" method.
4 Reply Quote Share
hawk_guruMember
Posts: 3 · Reputation: 133
#5Aug 25, 2019, 10:48 PM
i have tried to restart the bitcoin core, but nothing changed.  my 8332 port: JSONRPC server handles only POST requests I use Bitcoin Core version v30.0.0 on fedora is anyone else have the same problem.
3 Reply Quote Share
Posts: 54 · Reputation: 222
#6Aug 26, 2019, 01:57 AM
I'm only able to reproduce it by setting a random rpcpassword arg in the command while not using rpcpassword in the config file. Or by actually using mismatched credentials. Check your debug.log file for the applied configs, look for the currently applied rpcuser and rpcpassword or if it's actually applied. The lowest-most lines containing "Config file arg" should be the working config from your bitcoin.conf file.
0 Reply Quote Share
Posts: 2 · Reputation: 121
#7Aug 28, 2019, 04:26 AM
Make sure bitcoin-cli is pointing to the right datadir otherwise it won’t see your setting. Your datadir is:  /home/ca/.bitcoin
4 Reply Quote Share

Related topics