Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: nerviosus on September 13, 2019, 07:25:17 AM



Title: Error with rpcuser and password while trying to run node.
Post by: nerviosus on September 13, 2019, 07:25:17 AM
I am trying to set up a node on my raspberry pi following this tutorial (https://stadicus.github.io/RaspiBolt/raspibolt_30_bitcoin.html) and almost at the end it gives me an error.
Whenever I try to run 'bitcoin-cli getblockchaininfo', 'bitcoin-cli getblockcount', 'bitcoin'cli getnetworkinfo', etc... It tells me 'Authorization failed: Incorrect rpcuser or rpcpassword'
So I go to the bitcoin.conf file and my rpcuser and rpcpassword is already set and ready to go.

Can somebody help me with this issue?
Thanks.


Title: Re: Error with rpcuser and password while trying to run node.
Post by: AdolfinWolf on September 13, 2019, 07:39:38 AM
...Authorize with:

Code:
rpcuser=raspibolt
rpcpassword=PASSWORD_[B]
As defined in: https://stadicus.github.io/RaspiBolt/raspibolt_30_bitcoin.html#configuration

What am i missing

Or do it like this? https://bitcoin.stackexchange.com/questions/35454/bitcoin-cli-fails-with-auth-error
Ex https://bitcoin.stackexchange.com/a/74109


Title: Re: Error with rpcuser and password while trying to run node.
Post by: nerviosus on September 13, 2019, 07:44:15 AM
That's what I have in my config file:
rpcuser:[the name of my node]
rpcpassword:[a new password I specifically set up for this]

How can be incorrect when there's nothing else to compare it to?


Title: Re: Error with rpcuser and password while trying to run node.
Post by: AdolfinWolf on September 13, 2019, 07:52:36 AM
That's what I have in my config file:
rpcuser:[the name of my node]
rpcpassword:[a new password I specifically set up for this]

How can be incorrect when there's nothing else to compare it to?

You need to pass those arguments in the command line to authorize



Edit

Or does it automatically authenticate like mocca suggested? SE might be outdated. In that case, disregard my posts and see moccas suggestions.

Read a bit more online and i don’t think calling -rpcuser & pass (rpcauth) is depreciated? Might be bad practice though, (&nd useless, i’m not awake yet.)


Title: Re: Error with rpcuser and password while trying to run node.
Post by: nerviosus on September 13, 2019, 07:53:57 AM
Not in the command line, I have to write them down in the file bitcoin.conf


Title: Re: Error with rpcuser and password while trying to run node.
Post by: mocacinno on September 13, 2019, 08:03:35 AM
if you run bitcoin-cli as the same user that's running bitcoind, and the config file is in the home ~/.bitcoin of that exact user, bitcoin-cli will also parse bitcoin.conf and automatically authenticate.

My first guesses would be:
- is the same user running bitcoind and bitcoin-cli?
- is there something else wrong with your configuration (is your daemon listening for connections?)
- maybe there's something wrong with the owner or permission of your bitcoin.conf?