Issues with RPC Credentials in Bitcoin Core

6 replies 46 views
token51Newbie
Posts: 3 · Reputation: 32
#1Jun 11, 2017, 06:55 PM
I set up my user and password but I keep getting this error. bitcoin-cli migratewallet error: Could not locate RPC credentials. No authentication cookie could be found, and RPC password is not set. Check -rpcpassword and -stdinrpcpass. Configuration file: (/home/ca/.bitcoin/bitcoin.conf)
4 Reply Quote Share
0xChadNewbie
Posts: 513 · Reputation: 3
#2Jun 11, 2017, 10:45 PM
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
token51Newbie
Posts: 3 · Reputation: 32
#3Jun 12, 2017, 03:04 PM
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
0xChadNewbie
Posts: 513 · Reputation: 3
#4Jun 12, 2017, 07:36 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
token51Newbie
Posts: 3 · Reputation: 32
#5Jun 12, 2017, 10:43 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
0xChadNewbie
Posts: 513 · Reputation: 3
#6Jun 12, 2017, 11:13 PM
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
farm_byteMember
Posts: 1 · Reputation: 106
#7Jun 13, 2017, 04:59 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