bitcoind – Can not name rpc api from different machine in similar native community

0
47


can not name rpc api from different machine in similar native community

There’s a regtest node in my native community , I can name rpc api solely from the node’s machine,not my native machine.

I do know rpcallowip is modified in latest launch https://bitcoin.org/en/launch/v0.18.0#configuration-option-changes

http clinet httpie

my native machine’s ip: 192.168.1.155

btc node’s ip: 192.168.1.132

the port 8332 is opened sudo ufw enable 8332.

$ bitcoind -version                 
# Bitcoin Core Daemon model v0.18.0.0-g2472733a24a9364e4c6233ccd04166a26a68cc65

I begin regtest , and my ip is 192.168.1.155

bitcoind -regtest -deprecatedrpc=generate -printtoconsole -rpcuser=consumer -rpcpassword=password -rpcallowip=0.0.0.0/24 -rpcbind=127.0.0.1  -server -rpcport=8332

shopper request

# request from btc node's machine
http POST http://consumer:[email protected]:8332 jsonrpc="2.0" methodology="getblockchaininfo" id=1
# successed

# request from my native machine 192.168.1.155
http POST http://consumer:[email protected]:8332 jsonrpc="2.0" methodology="getblockchaininfo" id=1
# http: error: ConnectionError: HTTPConnectionPool(host="192.168.1.132", port=8332): Max retries exceeded with url: / (Brought on by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fd6e288f438>: Failed to determine a brand new connection: [Errno 111] Connection refused',)) whereas doing POST request to URL: http://consumer:[email protected]:8332/



Supply hyperlink

Leave a reply