<p>Since Bitcoin Core 0.17 certain config file options are net-specific. In particular this is true for <code>rpcport</code>.</p>

<p>This means you need to write it as <code>test.rpcport=18332</code> now.</p>

<p>More information can be found in the 0.17 release notes: <a href="https://bitcoincore.org/en/releases/0.17.0/" rel="nofollow noreferrer">https://bitcoincore.org/en/releases/0.17.0/</a> (look for "Configuration sections for testnet and regtest").</p>

CC BY-SA 4.0
2018-11-14T19:37:09.300Z
Thank you for your help. But I don't think it is the reason why I can't connect bitcoind daemon from docker.
max
CC BY-SA 4.0
2018-11-06T02:39:43.013Z
2018-11-06T02:39:43.013Z
Pieter Wuille
<p>in the versions 0.15+ bitcoind rpc require <code>rpcauth</code> in the <code>bitcoin.conf</code> file.</p>

<pre><code>rpcauth = user: password //generated with python script
</code></pre>

CC BY-SA 4.0
2018-11-18T00:36:29.767Z
2018-11-21T01:03:41.797Z
2018-11-21T01:03:41.797Z
La Thortilla
<p>I am running bitcoind in unbuntu 16.04. And a web server running in docker container. When I excuted curl in container bash 
<code>curl --user user:pass --data-binary '{"jsonrpc":"1.0","method":"getblockchaininfo","params":[]}' -H 'content-type:text/plain;' <a href="http://127.0.0.1:18332/" rel="nofollow noreferrer">http://127.0.0.1:18332/</a>
</code>
response is <code>curl: (7) Failed to connect to 127.0.0.1 port 18332: Connection refused</code>
<br><br>docker inner address 172.17.0.1
. However, curl in command line directly is ok.</p>

<p>Below is .conf setting:
<code>
server=1
testnet=1
rpcuser=user
rpcpassword=pass
rpcallowip=172.17.0.1
rpcport=18332
rpcconnect=127.0.0.1
</code></p>

<p>I have tried all possible combinations of ip address and port number. All the results are 'Connection refused'
Can anyone advise me how to resolve the problem?
Thanks
<br>Regards, Max</p>

<bitcoind><json-rpc>
Connection Refused
max
# Connection Refused

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

I am running bitcoind in unbuntu 16.04. And a web server running in docker container. When I excuted curl in container bash
`curl --user user:pass --data-binary '{"jsonrpc":"1.0","method":"getblockchaininfo","params":[]}' -H 'content-type:text/plain;' http://127.0.0.1:18332/`
response is `curl: (7) Failed to connect to 127.0.0.1 port 18332: Connection refused`
  
  
docker inner address 172.17.0.1
. However, curl in command line directly is ok.

Below is .conf setting:
`server=1
testnet=1
rpcuser=user
rpcpassword=pass
rpcallowip=172.17.0.1
rpcport=18332
rpcconnect=127.0.0.1`

I have tried all possible combinations of ip address and port number. All the results are 'Connection refused'
Can anyone advise me how to resolve the problem?
Thanks
  
Regards, Max

**Tags:** bitcoind, json-rpc


---

## 2 answers

### Answer by username_1 on 2018-11-06. Score: 4

Since Bitcoin Core 0.17 certain config file options are net-specific. In particular this is true for `rpcport`.

This means you need to write it as `test.rpcport=18332` now.

More information can be found in the 0.17 release notes: <https://bitcoincore.org/en/releases/0.17.0/> (look for "Configuration sections for testnet and regtest").

> **Comments:**
> **username_0**: Thank you for your help. But I don't think it is the reason why I can't connect bitcoind daemon from docker.  

---

### Answer by username_2 on 2018-11-18. Score: -1

in the versions 0.15+ bitcoind rpc require rpcauth in the bitcoin.conf file.
rpcauth = user: password //generated with python script


---

