<p>The node does not need to sync fully in order for RPC to start responding to queries. </p>

<p>What happens is Bitcoin Core starts up in "warm up" mode. During warm up RPC is unavailable because the system is being setup. This is when wallets, the network your local UTXO information, setting the block index and verifying your local blocks take place. (I suspect you may have confused the "Verifying blocks..." message with sync'ing.). In warmup mode RPC port 8333 is open but it'll return a JSON error for every query. The open port signals to inbound connecting peers that there's a node there, but not yet able to respond to queries.</p>

<p>After this warmup routine is done (takes a few minutes), the node will be up and syncing from the network. During the sync, even if it takes weeks, the RPC server is up. Obviously it will not be able to respond to queries for blocks it hasn't retrieved and verified yet.</p>

<blockquote>
  <p>Is this a known issue/bug? Will it be fixed soon?</p>
</blockquote>

<p>Not a bug. It's part of how Bitcoin Core starts up.</p>

<blockquote>
  <p>Should I be using some other API call to check if Bitcoin Core is running and "can talk to me"?</p>
</blockquote>

<p><a href="https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)#Controlling_Bitcoin_Core" rel="nofollow noreferrer">Try the help command</a>. If it returns, it means the RPC server is up.</p>

<blockquote>
  <p>Is there a separate API call I could use to determine whether Bitcoin Core is "all ready for action" (fully synced)?</p>
</blockquote>

<p>You can try using <code>getblockcount</code> to see what the last synced block height is. It's fully synced if the height is same as network height. Again you don't need this to use RPC, but I included this to answer your question.</p>

<p>Try <code>getrpcinfo</code> to check on the RPC server status.</p>

<p>Check other API methods <a href="https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list" rel="nofollow noreferrer">here</a>.</p>

CC BY-SA 4.0
2019-10-29T02:37:38.967Z
2019-10-29T03:36:56.297Z
2019-10-29T03:36:56.297Z
Jose Fonseca
<p>At least this appears to be the case, because the function I have created to determine whether Bitcoin Core is "working" does the most minimal/simple API call I could find, which was "uptime", to see if my system can still communicate with Bitcoin Core (on the same computer) or if something has broken.</p>

<p>Since the blockchain has grown to an insane size, I was forced to move my Bitcoin "datadir" from a SSD disk to a mechanical one (due to running out of space on the former). Around the same time, I also configured Bitcoin Core to always use Tor for all connections. The combination of these two things caused the unexpected issue that my "is everything OK still?" script fails for Bitcoin Core when I start the computer after a night's sleep, because Bitcoin Core takes longer than before to get ready. Sometimes it can take like half an hour.</p>

<p>(This same thing also affects my polls for checking the current balance, which at least is understandable because Bitcoin Core probably doesn't want to report an outdated figure if the new data about to be fetched changes the balance.)</p>

<p>All it says in the manual is this: <a href="https://bitcoincore.org/en/doc/0.18.0/rpc/control/uptime/" rel="nofollow noreferrer">https://bitcoincore.org/en/doc/0.18.0/rpc/control/uptime/</a></p>

<p>(For some reason, there's no API docs for 0.18.1... the latest version is 0.18.)</p>

<p>My questions:</p>

<ol>
<li>Is this a known issue/bug? Will it be fixed soon?</li>
<li>Should I be using some other API call to check if Bitcoin Core is running and "can talk to me"?</li>
<li>Is there a separate API call I could use to determine whether Bitcoin Core is "all ready for action" (fully synced)?</li>
</ol>

CC BY-SA 4.0
2019-10-29T10:40:23.367Z
If bitcoin doing the startup, so the node is updating synchronize with the network the server is not running because it is in the startup. An example if you running the game server and it is establishing a connection with the network you can not game.
vincenzopalazzo
<bitcoin-core><windows>
Why does the "uptime" RPC API call fail if Bitcoin Core is running but has not synced fully?
HardcoreBitcoinUser
# Why does the "uptime" RPC API call fail if Bitcoin Core is running but has not synced fully?

(Asked by: username_0 on 2019-10-29)

At least this appears to be the case, because the function I have created to determine whether Bitcoin Core is "working" does the most minimal/simple API call I could find, which was "uptime", to see if my system can still communicate with Bitcoin Core (on the same computer) or if something has broken.

Since the blockchain has grown to an insane size, I was forced to move my Bitcoin "datadir" from a SSD disk to a mechanical one (due to running out of space on the former). Around the same time, I also configured Bitcoin Core to always use Tor for all connections. The combination of these two things caused the unexpected issue that my "is everything OK still?" script fails for Bitcoin Core when I start the computer after a night's sleep, because Bitcoin Core takes longer than before to get ready. Sometimes it can take like half an hour.

(This same thing also affects my polls for checking the current balance, which at least is understandable because Bitcoin Core probably doesn't want to report an outdated figure if the new data about to be fetched changes the balance.)

All it says in the manual is this: <https://bitcoincore.org/en/doc/0.18.0/rpc/control/uptime/>

(For some reason, there's no API docs for 0.18.1... the latest version is 0.18.)

My questions:

1. Is this a known issue/bug? Will it be fixed soon?
2. Should I be using some other API call to check if Bitcoin Core is running and "can talk to me"?
3. Is there a separate API call I could use to determine whether Bitcoin Core is "all ready for action" (fully synced)?

**Tags:** bitcoin-core, windows

> **Comments:**
> **username_1**: If bitcoin doing the startup, so the node is updating synchronize with the network the server is not running because it is in the startup. An example if you running the game server and it is establishing a connection with the network you can not game.  

---

## 1 answers

### Answer by username_2 on 2019-10-29. Score: 1

The node does not need to sync fully in order for RPC to start responding to queries.

What happens is Bitcoin Core starts up in "warm up" mode. During warm up RPC is unavailable because the system is being setup. This is when wallets, the network your local UTXO information, setting the block index and verifying your local blocks take place. (I suspect you may have confused the "Verifying blocks..." message with sync'ing.). In warmup mode RPC port 8333 is open but it'll return a JSON error for every query. The open port signals to inbound connecting peers that there's a node there, but not yet able to respond to queries.

After this warmup routine is done (takes a few minutes), the node will be up and syncing from the network. During the sync, even if it takes weeks, the RPC server is up. Obviously it will not be able to respond to queries for blocks it hasn't retrieved and verified yet.

> Is this a known issue/bug? Will it be fixed soon?

Not a bug. It's part of how Bitcoin Core starts up.

> Should I be using some other API call to check if Bitcoin Core is running and "can talk to me"?

[Try the help command](https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)#Controlling_Bitcoin_Core). If it returns, it means the RPC server is up.

> Is there a separate API call I could use to determine whether Bitcoin Core is "all ready for action" (fully synced)?

You can try using `getblockcount` to see what the last synced block height is. It's fully synced if the height is same as network height. Again you don't need this to use RPC, but I included this to answer your question.

Try `getrpcinfo` to check on the RPC server status.

Check other API methods [here](https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list).


---

