Author

Topic: bitcoin-cli Method not found (Read 162 times)

newbie
Activity: 16
Merit: 1
December 15, 2019, 05:42:59 AM
#1
Hello.

I am trying to use bitcoin-cli to get data from blockchain. I changed my datadir to another drive, and deleted all files from the default datadir location (in my case %appdata%/Bitcoin). I am running bitcoind with txindex option and with datadir parameter. I created new bitcoin.conf, where I wrote datadir, rpcuser and rpcpassword parameters. Bitcoind runs just fine and it reads the correct config file.

However when I try to run
Code:
bitcoin-cli getinfo

I get

Quote
error: Authorization failed: Incorrect rpcuser or rpcpassword
even though I run bitcoin-cli with parameters -rpcuser and -rpcpassword with the same values that I wrote into the configuration file. I even add the parameter -conf with the path to the configuration file and it still does not help.

What am I doing wrong?

Edit:

Figured that out - I typed wrong path when running bitcoin-cli with the parameter -conf

Now the problem is, that it writes
Quote
error code: -32601
error message:
Method not found

I am still trying to run

Code:
bitcoin-cli getinfo

Edit #2:

Nevermind, just discovered, that getinfo was removed from the RPC API, and that commands are case sensitive, so GetBlock is not found, but getblock works just fine. Thread can be deleted. Smiley
Jump to: