<p>This would be normal if you just started your bitcoind service and it is still verifying downloaded blocks.</p>

<p>It can be a result that bitcoind did not had time enough to write changes to disk last time it was used or that it downloaded blocks but didn't prozess them jet.</p>

<p>Just let bitcoind run a bit longer and try the command again.</p>

<p>Here is a similar answer that goes a bit into more detail:
<a href="https://bitcoin.stackexchange.com/questions/41524/what-does-activating-best-chain-mean">What does &quot;Activating Best Chain&quot; mean?</a></p>

CC BY-SA 3.0
2016-07-22T13:14:52.987Z
2016-07-22T13:14:52.987Z
2017-04-13T12:47:33.660Z
onefox
<p>Error -28 is defined as <code>RPC_IN_WARMUP</code>, see <a href="https://github.com/bitcoin/bitcoin/blob/master/src/rpc/protocol.h">https://github.com/bitcoin/bitcoin/blob/master/src/rpc/protocol.h</a>.</p>

<p>The <code>bitcoind</code> server has just started and is still processing its stored blockchain data to figure out what it has.  It can take several minutes.  <code>Activating best chain</code> is one stage of this, where the daemon looks at the blocks it knows so far and determines which fork is the best chain.   So it cannot yet tell you the number of blocks (in the best chain), because it doesn't yet know what the best chain is.</p>

<p>If you try the call again in a few minutes, it should succeed.</p>

CC BY-SA 3.0
2016-07-22T16:57:04.663Z
Seems like a patch making the bitcoin-cli error message print that text would be helpful. =)
Conspicuous Compiler
CC BY-SA 4.0
2021-01-10T18:53:45.663Z
You can follow progress by tailing the debug log: `tail -f debug.log`
pors
CC BY-SA 3.0
2016-07-22T13:12:47.833Z
2016-07-22T13:12:47.833Z
Nate Eldredge
<p>The following CLI command:</p>

<pre><code>$ bitcoin-cli getblockcount
</code></pre>

<p>Gives the following error message:</p>

<pre><code>error code: -28
error message:
Activating best chain...
</code></pre>

<p>Any idea what is <strong><code>error code: -28</code></strong>?</p>

<bitcoind><error><bitcoin-cli>
Bitcoind error -28
Adam Matan
# Bitcoind error -28

(Asked by: username_0 on 2016-07-22)

The following CLI command:

```
$ bitcoin-cli getblockcount

```

Gives the following error message:

```
error code: -28
error message:
Activating best chain...

```

Any idea what is **`error code: -28`**?

**Tags:** bitcoind, error, bitcoin-cli


---

## 2 answers

### Answer by username_2 on 2016-07-22. Score: 10 | Accepted answer

Error -28 is defined as `RPC_IN_WARMUP`, see <https://github.com/bitcoin/bitcoin/blob/master/src/rpc/protocol.h>.

The `bitcoind` server has just started and is still processing its stored blockchain data to figure out what it has. It can take several minutes. `Activating best chain` is one stage of this, where the daemon looks at the blocks it knows so far and determines which fork is the best chain. So it cannot yet tell you the number of blocks (in the best chain), because it doesn't yet know what the best chain is.

If you try the call again in a few minutes, it should succeed.

> **Comments:**
> **username_3**: Seems like a patch making the bitcoin-cli error message print that text would be helpful. =)  
> **username_4**: You can follow progress by tailing the debug log: `tail -f debug.log`  

---

### Answer by username_1 on 2016-07-22. Score: 4

This would be normal if you just started your bitcoind service and it is still verifying downloaded blocks.

It can be a result that bitcoind did not had time enough to write changes to disk last time it was used or that it downloaded blocks but didn't prozess them jet.

Just let bitcoind run a bit longer and try the command again.

Here is a similar answer that goes a bit into more detail:
[What does "Activating Best Chain" mean?](https://bitcoin.stackexchange.com/questions/41524/what-does-activating-best-chain-mean)


---

