Bitcoin

Fix ‘Connection reset by peer’ error when calling Bitcoin REST API from container

problem: No access Bitcoin REST API on host machine

explanation: i have Bitcoin It is installed in the container and REST API calls can be made successfully within the container. However, when I try to make the same call on my host machine, I get the following error:

isudoajl@f38-server:$curl localhost:8333/rest/chaininfo.json
curl: (56) Recv failure: Connection reset by peer

composition:

bitcoind configuration (bitcoin.conf):

server=1
rpcuser=xxxx
rpcpassword=xxxx
rpcallowip=192.168.1.0/24
rpcport=8332
rest=1
txindex=1

The container is listening on port 8333.

Troubleshooting steps:

Confirmed Bitcoin Configuration settings. I checked the container’s listening port. I tried various curl commands on the host machine.

question: Is there any solution for this problem? I’ve been troubleshooting the problem for several days without success. Any help would be greatly appreciated.

Related Articles

Back to top button