<p>I leave it here. Because i spent about two days on it :-o
<a href="https://github.com/bitcoin/bitcoin/issues/10218" rel="nofollow noreferrer">https://github.com/bitcoin/bitcoin/issues/10218</a></p>

<blockquote>
  <p>Authentication is not optional. Configuring it yourself is optional, but bitcoind never accepts RPC connections without explicitly or implicitly configured username/password.</p>
</blockquote>

<p>So, I just added user and pass from file <code>/root/.bitcoin/.cache</code>.
And get this:</p>

<pre><code>curl --user __cookie__:96fea535b009e62ddffe1c6f5090c50396d17e7f96d0b0a75eb580bdd1771d29 --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"getinfo","params":[]}' -H 'content-type:text/plain;' http://127.0.0.1:8332
</code></pre>

CC BY-SA 4.0
2021-01-04T14:03:57.743Z
Now this file is called `/root/.bitcoin/.cookie`
oxfn
CC BY-SA 3.0
2017-12-23T11:04:13.330Z
2017-12-23T11:04:13.330Z
dansamosudov
<p>I'm trying to work with the bitcoin daemon and rpc.</p>

<p>Using the user &amp; password I set I can't connect to it, trying with curl I always get "Empty reply from server".</p>

<p>It works just fine in the real network, I can connect, getinfo, etc, etc...</p>

<p>Is there something I might be missing? the output log in the daemon only shows:</p>

<p>accepted connection 190.xxx:62470
disconnecting node 190.xxx:62470</p>

<p>Thanks!
Javyer</p>

<json-rpc><server><daemon>
Bitcoin daemon sends "Empty reply from server" when in test net
Javier
# Bitcoin daemon sends "Empty reply from server" when in test net

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

I'm trying to work with the bitcoin daemon and rpc.

Using the user & password I set I can't connect to it, trying with curl I always get "Empty reply from server".

It works just fine in the real network, I can connect, getinfo, etc, etc...

Is there something I might be missing? the output log in the daemon only shows:

accepted connection 190.xxx:62470
disconnecting node 190.xxx:62470

Thanks!
Javyer

**Tags:** json-rpc, server, daemon


---

## 1 answers

### Answer by username_1 on 2017-12-23. Score: 3 | Accepted answer

I leave it here. Because i spent about two days on it :-o
<https://github.com/bitcoin/bitcoin/issues/10218>

> Authentication is not optional. Configuring it yourself is optional, but bitcoind never accepts RPC connections without explicitly or implicitly configured username/password.

So, I just added user and pass from file `/root/.bitcoin/.cache`.
And get this:

```
curl --user __cookie__:96fea535b009e62ddffe1c6f5090c50396d17e7f96d0b0a75eb580bdd1771d29 --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"getinfo","params":[]}' -H 'content-type:text/plain;' http://127.0.0.1:8332

```

> **Comments:**
> **username_2**: Now this file is called `/root/.bitcoin/.cookie`  

---

