<p>it looks like the server rejected the connection from  client, try use this rpcallowip instead and see if it helps.</p>

<pre><code>rpcallowip=0.0.0.0/0
</code></pre>

<p>Above decrease the rpc security but will allow all connection reguardless their ip address</p>

CC BY-SA 3.0
2018-03-11T16:39:28.133Z
2018-03-11T16:39:28.133Z
zhiyan114
<p>Ok, so my bitcoin node (0.15.1) is running, and fully synced up with the network. I'm using python and the 'bitcoinrpc' package. I want to access the RPC server from outside my network. I have RPC set up on the normal port 8332 which is opened up on my router. I have rpcallowip configured to the address of the computer I'm connecting from. </p>

<p>When I run my python program I get the following error, which I am having a hard time tracking down. (my program is called 'PollForAddress.py')</p>

<pre><code>  File "PollForAddress.py", line 46, in &lt;module&gt;
    mempool = nodeRPC.getrawmempool()
  File "/usr/local/lib/python2.7/dist-packages/bitcoinrpc/authproxy.py", line 139, in __call__
    response = self._get_response()
  File "/usr/local/lib/python2.7/dist-packages/bitcoinrpc/authproxy.py", line 187, in _get_response
    'code': -342, 'message': 'non-JSON HTTP response with \'%i %s\' from server' % (http_response.status, http_response.reason)})
bitcoinrpc.authproxy.JSONRPCException: -342: non-JSON HTTP response with '403 Forbidden' from server
</code></pre>

<p>any ideas whats going wrong?</p>

<bitcoin-core><bitcoind><json-rpc>
Error connecting to RPC server
gearhead
# Error connecting to RPC server

(Asked by: username_0 on 2018-03-11)

Ok, so my bitcoin node (0.15.1) is running, and fully synced up with the network. I'm using python and the 'bitcoinrpc' package. I want to access the RPC server from outside my network. I have RPC set up on the normal port 8332 which is opened up on my router. I have rpcallowip configured to the address of the computer I'm connecting from.

When I run my python program I get the following error, which I am having a hard time tracking down. (my program is called 'PollForAddress.py')

```
  File "PollForAddress.py", line 46, in <module>
    mempool = nodeRPC.getrawmempool()
  File "/usr/local/lib/python2.7/dist-packages/bitcoinrpc/authproxy.py", line 139, in __call__
    response = self._get_response()
  File "/usr/local/lib/python2.7/dist-packages/bitcoinrpc/authproxy.py", line 187, in _get_response
    'code': -342, 'message': 'non-JSON HTTP response with \'%i %s\' from server' % (http_response.status, http_response.reason)})
bitcoinrpc.authproxy.JSONRPCException: -342: non-JSON HTTP response with '403 Forbidden' from server

```

any ideas whats going wrong?

**Tags:** bitcoin-core, bitcoind, json-rpc


---

## 1 answers

### Answer by username_1 on 2018-03-11. Score: 2 | Accepted answer

it looks like the server rejected the connection from client, try use this rpcallowip instead and see if it helps.

```
rpcallowip=0.0.0.0/0

```

Above decrease the rpc security but will allow all connection reguardless their ip address


---

