Fail to authorize in multichain-cli after change the datadir.

0 votes
I created my first test chain and it worked fine. But I found the data is located in my home folder which has limited disk space. so I stopped the multichaind and removed the existing data folder, then updated the multichain.conf in ~/.multichain/multichain.conf to setup the new datadir. Then I created the new chain with same name, edited the params in the new location and started the multichaind in daemon mode.

Everything looks fine except:

I tried to access my chain throgh multichain-cli but keeps getting the authorization fail error.

What is the default rpcusername and password and how can I change it? The password seems secured.

I did found the multichain.conf in the datadir and it shows

================================================

rpcuser=multichainrpc
rpcpassword=4neAQb2V9Q6ZVYkMPBFcGg5ZUKMP1ub6BH4qDD21cJQk

================================================

My operation and response are

================================================

# multichain-cli -datadir='/main/multichain' GooCoinTest

MultiChain Core RPC client build 1.0 alpha 22 protocol 10005

Interactive mode

GooCoinTest: help
{"method":"help","params":[],"id":1,"chain_name":"GooCoinTest"}

error: incorrect rpcuser or rpcpassword (authorization failed)

================================================
asked Aug 3, 2016 by Ken

1 Answer

0 votes
The problem is with the way you are starting multichaind. It is currently impossible to setup data directory using ~/.multichain/multichain.conf. You can put all other parameters in multichain.conf in the datadir, but, of course, you cannot specify datadir itself there.

We will fix this in the next version. Meanwhile the workaround is to specify -datadir parameter explicitly when starting multichaind:

multichaind GooCoinTest -datadir='/main/multichain' -daemon
answered Aug 8, 2016 by Michael
...