Error initializing block database. Do you want to rebuild the block database now?

1

I'm trying to set up a test network consisting of 3 nodes, each with different bitcoin.conf. I've constructed the directory and the .conf-files similar to what is the state of the art in qa/pull-tester/. Within the terminal inside the node-A-directory I commanded: ...

bitcoind -conf="/home/me/.bitcoin/regtest/testnetwork/A/bitcoin.conf"

...and got back this error:

'Error initializing block database. Do you want to rebuild the block database now?'

My bitcoin.conf has following content:

regtest=1
rpcuser=rt //adopted from .conf-files in qa/pull-tester/
rpcpassword=rt //adopted from .conf-files in qa/pull-tester/
port=11111 //arbitrary free port
rpcport=21111 //arbitrary free port

Could someone please help with my intended network setup or at least say what I'm doing wrong?

PS: I'm going to paste my logfile in a comment below.

Aliakbar Ahmadi

Posted 2015-03-02T16:18:42.023

Reputation: 1 335

logfile: http://pastebin.com/aq4XpBNG

Aliakbar Ahmadi 2015-03-02T16:21:29.357

Are you using different datadir's? Does the problem only occur when you run multiple instances?Nick ODell 2015-03-02T17:10:07.340

Actually the error is given at trying to start the first node - in my case node A. I solved the problem by adding -regtest, -daemon and -datadir="path to node directory" to my previous command ... but after trying to getbalance another error appeared saying "couldn't connect to server."Aliakbar Ahmadi 2015-03-02T17:11:51.173

Are you providing the same -conf option to bitcoin-cli?Nick ODell 2015-03-02T19:03:25.000

No I just do: 'bitcoin-cli regtest getbalance' ... Do I need to give -conf as parameter for every and each API command? Or did I just misunderstand your question?Aliakbar Ahmadi 2015-03-02T21:13:23.380

Any ideas someone?Aliakbar Ahmadi 2015-03-03T20:23:52.720

Answers

0

As the question is already answered in the comments and there anothere question arouse about how to send API commands independently to the server from each node.

As Nick ODell gave a correct hint, in fact you need to prefix each API command like "getbalance" with "bitcoin-cli -conf="!

Thanks to Nick ODell!

Aliakbar Ahmadi

Posted 2015-03-02T16:18:42.023

Reputation: 1 335