<p>This is an odd one. I am running bitcoind 0.9.1 on Ubuntu 14.04 and have this behaviour:</p>

<p>Doesn't work:</p>

<pre><code>$ bitcoind getinfo
error: couldn't connect to server
</code></pre>

<p>(timeout after 30s)</p>

<p>Works fine:</p>

<pre><code>$ curl --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }' -H 'content-type: text/plain;' http://user:pass@localhost:8332/
{"result":{"version":90100,"protocolversion":70002,"walletversion":60000,"balance":0.00000000,"blocks":311140,"timeoffset":0,"connections":13,"proxy":"","difficulty":17336316978.50783157,"testnet":false,"keypoololdest":1402698503,"keypoolsize":102,"paytxfee":0.00000000,"errors":""},"error":null,"id":"curltest"}
</code></pre>

<p>Question:</p>

<p>Why does the bitcoind CLI not connect to the server, but curl does?</p>

<p>Driving me nuts. Something buggy in 0.9.1's JSON-RPC client implementation?</p>

CC BY-SA 3.0
2014-07-27T22:33:29.853Z
I ended up setting up a new Bitcoin node at a different provider. With the same system config and bitcoin.conf there "bitcoind getinfo" works fine. I assume it has to do with firewall or loopback interface settings at the old provider.
meinhard
CC BY-SA 3.0
2014-12-15T20:54:09.647Z
I turn off firewall and still get the same, that's not the answear in my opinion :/
Sebastian Xawery Wiśniowiecki
CC BY-SA 3.0
2017-03-20T20:46:41.363Z
same problem when I start via /etc/rc.local (raspberry pi)
tobi
<bitcoind><json-rpc><ubuntu>
JSON-RPC "couldn't connect to server" via bitcoind CLI (curl works fine)
meinhard
# JSON-RPC "couldn't connect to server" via bitcoind CLI (curl works fine)

(Asked by: username_0 on 2014-07-17)

This is an odd one. I am running bitcoind 0.9.1 on Ubuntu 14.04 and have this behaviour:
Doesn't work:
$ bitcoind getinfo
error: couldn't connect to server

(timeout after 30s)
Works fine:
$ curl --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }' -H 'content-type: text/plain;' http://user:pass@localhost:8332/
{"result":{"version":90100,"protocolversion":70002,"walletversion":60000,"balance":0.00000000,"blocks":311140,"timeoffset":0,"connections":13,"proxy":"","difficulty":17336316978.50783157,"testnet":false,"keypoololdest":1402698503,"keypoolsize":102,"paytxfee":0.00000000,"errors":""},"error":null,"id":"curltest"}

Question:
Why does the bitcoind CLI not connect to the server, but curl does?
Driving me nuts. Something buggy in 0.9.1's JSON-RPC client implementation?

**Tags:** bitcoind, json-rpc, ubuntu

> **Comments:**
> **username_0**: I ended up setting up a new Bitcoin node at a different provider. With the same system config and bitcoin.conf there "bitcoind getinfo" works fine. I assume it has to do with firewall or loopback interface settings at the old provider.  
> **username_1**: I turn off firewall and still get the same, that's not the answear in my opinion :/  
> **username_2**: same problem when I start via /etc/rc.local (raspberry pi)  

---

## 0 answers

