<p>Are you doing that remotely? if so please make sure that your port is open.</p>

<pre><code>sudo ufw allow 8333
</code></pre>

<p>Also can you provide us with the last a few lines of debug.log file. </p>

CC BY-SA 3.0
2017-11-21T04:20:05.107Z
2017-11-21T04:20:05.107Z
Tailer
<p>When I give the following command I get an error after a LONG lag (maybe 15-20 minutes):</p>

<pre><code>~: bitcoin-cli getblockchaininfo
error: couldn't connect to server
</code></pre>

<p>Why?</p>

<bitcoin-core>
Getting a "couldn't connect to server" error on getblockchaininfo
Harry Pillsbury
# Getting a "couldn't connect to server" error on getblockchaininfo

(Asked by: username_0 on 2017-11-21)

When I give the following command I get an error after a LONG lag (maybe 15-20 minutes):
~: bitcoin-cli getblockchaininfo
error: couldn't connect to server

Why?

**Tags:** bitcoin-core


---

## 1 answers

### Answer by username_1 on 2017-11-21. Score: -1

Are you doing that remotely? if so please make sure that your port is open.
sudo ufw allow 8333

Also can you provide us with the last a few lines of debug.log file.


---

