<p>You're trying to send RPC queries to the P2P network port. You should use port 8332 instead of 8333.</p>

<p>Bitcoin Core:</p>

<ul>
<li>interacts with other Bitcoin nodes on the network using the P2P protcol via port 8333 (or whatever you configure <code>-port</code> to be)</li>
<li>responds to RPC queries (JSON-RPC) via port 8332 (or whatever you configure <code>-rpcport</code> to be).</li>
</ul>

CC BY-SA 3.0
2016-03-19T23:59:24.803Z
And just like that it's working. :) Infinite thanks man!
Anthony
CC BY-SA 4.0
2018-08-22T12:06:18.707Z
I have the same issue. it's still "connection refused" for me even though i use 8332. but works locally when i execute on my cloud instance as 127.0.0.1:8332

any other things to check ?
Sonic Soul
CC BY-SA 4.0
2018-08-22T12:13:57.463Z
i get a different error on 8333: "RemoteDisconnected: Remote end closed connection without response"
Sonic Soul
CC BY-SA 3.0
2016-03-19T23:09:21.663Z
2016-03-19T23:20:01.287Z
2016-03-19T23:20:01.287Z
Pieter Wuille
<p><a href="https://i.sstatic.net/hsTSl.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/hsTSl.png" alt="enter image description here"></a></p>

<p>I can verify that my node is up and that the port is up via the above method, however no amount of effort has allowed me to successfully make a remote RPC call.</p>

<p>I am booting my node via <code>$ bitcoind -daemon</code></p>

<p>I can make RPC calls via the same server without an issue using <code>$ bitcoin-cli getinfo</code></p>

<p>My <code>bitcoin.conf</code> file looks like:</p>

<p><code>
rpcuser=rpcuser
rpcpassword=anthony
rpcallowip=::/0
</code></p>

<p>I have also tried:</p>

<p><code>
rpcuser=notmyrealuser
rpcpassword=notmyrealpass
rpcallowip=0.0.0.0/</code></p>

<p>Without luck, both of which were suggested here: <a href="https://github.com/bitcoin/bitcoin/issues/4894" rel="nofollow noreferrer">https://github.com/bitcoin/bitcoin/issues/4894</a> by the lead Bitcoin engineer.</p>

<p>I am trying to authenticate using curl, the two scripts I am using are: </p>

<p><code>curl --user notmyrealuser --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }'  -H 'content-type: text/plain;' http://124.223.81.11:8333/
</code></p>

<p>and also:
<code>curl --data-binary 
'{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }' -H 'content-type: text/plain;' http://notmyrealuser:notmyrealpass@104.223.81.11:8333/
</code></p>

<p>Nothing is working so I figured I would ask here after several hours of not making progress, everytime I receive:</p>

<p><code>curl: (52) Empty reply from server</code></p>

<bitcoind>
Can't make successful call via remote JSON RPC
Anthony
# Can't make successful call via remote JSON RPC

(Asked by: username_0 on 2016-03-19)

[![enter image description here](https://i.sstatic.net/hsTSl.png)](https://i.sstatic.net/hsTSl.png)

I can verify that my node is up and that the port is up via the above method, however no amount of effort has allowed me to successfully make a remote RPC call.

I am booting my node via `$ bitcoind -daemon`

I can make RPC calls via the same server without an issue using `$ bitcoin-cli getinfo`

My `bitcoin.conf` file looks like:

`rpcuser=rpcuser
rpcpassword=username_0
rpcallowip=::/0`

I have also tried:

`rpcuser=notmyrealuser
rpcpassword=notmyrealpass
rpcallowip=0.0.0.0/`

Without luck, both of which were suggested here: <https://github.com/bitcoin/bitcoin/issues/4894> by the lead Bitcoin engineer.

I am trying to authenticate using curl, the two scripts I am using are:

`curl --user notmyrealuser --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }' -H 'content-type: text/plain;' http://124.223.81.11:8333/`

and also:
`curl --data-binary
'{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }' -H 'content-type: text/plain;' http://notmyrealuser:notmyrealpass@104.223.81.11:8333/`

Nothing is working so I figured I would ask here after several hours of not making progress, everytime I receive:

`curl: (52) Empty reply from server`

**Tags:** bitcoind


---

## 1 answers

### Answer by username_1 on 2016-03-19. Score: 5 | Accepted answer

You're trying to send RPC queries to the P2P network port. You should use port 8332 instead of 8333.

Bitcoin Core:

* interacts with other Bitcoin nodes on the network using the P2P protcol via port 8333 (or whatever you configure `-port` to be)
* responds to RPC queries (JSON-RPC) via port 8332 (or whatever you configure `-rpcport` to be).

> **Comments:**
> **username_0**: And just like that it's working. :) Infinite thanks man!  
> **username_2**: I have the same issue. it's still "connection refused" for me even though i use 8332. but works locally when i execute on my cloud instance as 127.0.0.1:8332  any other things to check ?  
> **username_2**: i get a different error on 8333: "RemoteDisconnected: Remote end closed connection without response"  

---

