Hi I'm new to rpc curl cmds and having some issues connecting to my regtest node. I'm getting "empty reply from server" which makes me think it is connecting but something is misconfigured.

Looking through various threads here I found similar things but nothing that quite fit the bill, but apologies if this is something that has already been covered.

bitcoin.conf settings

# Options only for regtest
# datadir
# Listen for incoming connections on non-default port.(default: 8333 or testnet: 18333)
# RPC allow all IPS (shouldn't have this on mainnet)
# RPC bind IP
# RPC port(default:8332 or testnet:18332)

my curl cmd returns

curl: (52) Empty reply from server

curl cmd

 curl --user xxxuser:xxxcookie --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblockcount", "params": [] }' -H 'content-type: text/plain;'

I'm also seeing this in the debug.log but not sure what it means or how to fix

UPnP: ExternalIPAddress = XX.XXX.XX.XXX
AddPortMapping(18444, 18444, failed with code 718 (ConflictInMappingEntry)
UPNP_DeletePortMapping() returned: 606

Also worth noting I have another regtest node and the 2 nodes are connected without issue.

Any help appreciated.

1 Answer 1


You are defining RPC port 18443 and attempting to connect to 18444 in your example.

There's no situation where you should attempt to rpcallowip to anything but localhost, don't get used to doing that or making systems which require it. There is no situation in which this is safe to do, even regtest can cause damage to your system.

  • when I change the curl cmd to IP:18443 I get connection refused curl: (7) Failed to connect to port 18443: Connection refused Feb 23, 2021 at 21:48
  • You will still be binding the RPC port to localhost irrespective of what the rpcallowip value is set to. The software doesn't make this easy because it's such a poor configuration option, you would have to change rpcbind as well.
    – Claris
    Feb 23, 2021 at 21:49
  • ok so I should change rpcallowip to this rpcallowip= ? and rpcbind to the local IP of my node? I originally had that but it looked like it was causing issues. should I also rpcallow my local node IP like here? link Feb 23, 2021 at 21:57
  • ok that got me connected thanks! this is my updated bitcoin.conf config which works [regtest] # Listen for incoming connections port=18444 # RPC allow all IP rpcallowip= rpcallowip= # RPC bind IP rpcbind= rpcbind= # RPC port rpcport=18443 Feb 23, 2021 at 22:06
  • sorry I know I already accepted this answer, but any insight into the debug.log ConflictInMapping errors? I'm still getting them Feb 23, 2021 at 22:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.