<p>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.</p>

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

<p>Thanks to Nick ODell! </p>

CC BY-SA 3.0
2015-03-07T19:59:00.670Z
2015-03-07T19:59:00.670Z
Aliakbar Ahmadi
<p>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: ...</p>

<pre><code>bitcoind -conf="/home/me/.bitcoin/regtest/testnetwork/A/bitcoin.conf"
</code></pre>

<p>...and got back this error:</p>

<p><strong>'<em>Error initializing block database. Do you want to rebuild the block database now?</em>'</strong></p>

<p>My bitcoin.conf has following content:</p>

<pre><code>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
</code></pre>

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

<p>PS: I'm going to paste my logfile in a comment below.</p>

CC BY-SA 3.0
2015-03-02T16:21:29.357Z
logfile: http://pastebin.com/aq4XpBNG
Aliakbar Ahmadi
CC BY-SA 3.0
2015-03-02T17:10:07.340Z
Are you using different datadir's? Does the problem only occur when you run multiple instances?
Nick ODell
CC BY-SA 3.0
2015-03-02T17:11:51.173Z
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
CC BY-SA 3.0
2015-03-02T19:03:25.000Z
Are you providing the same -conf option to `bitcoin-cli`?
Nick ODell
CC BY-SA 3.0
2015-03-02T21:13:23.380Z
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
CC BY-SA 3.0
2015-03-03T20:23:52.720Z
Any ideas someone?
Aliakbar Ahmadi
<bitcoind><database><bitcoin.conf><regtest>
Error initializing block database. Do you want to rebuild the block database now?
Aliakbar Ahmadi
# Error initializing block database. Do you want to rebuild the block database now?

(Asked by: username_0 on 2015-03-02)

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.

**Tags:** bitcoind, database, bitcoin.conf, regtest

> **Comments:**
> **username_0**: logfile: http://pastebin.com/aq4XpBNG  
> **username_1**: Are you using different datadir's? Does the problem only occur when you run multiple instances?  
> **username_0**: 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."  
> **username_1**: Are you providing the same -conf option to `bitcoin-cli`?  
> **username_0**: 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?  
> **username_0**: Any ideas someone?  

---

## 1 answers

### Answer by username_0 on 2015-03-07. Score: 0 | Accepted answer

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 username_1 username_1 gave a correct hint, in fact you need to prefix each API command like "getbalance" with "bitcoin-cli -conf="!

Thanks to username_1 username_1!


---

