3
0
I'm trying to make to nodes on the same computer communicate. I set up two bitcoin folder with two bitcoin.conf files. bitcoin.conf in the second node is the following:
rpcuser=bitcoinrpc
rpcpassword=roiroiroiroiroi
addnode=127.0.0.1:18444
while in the first node is just I've just set the rpcuser and rpcpasswords
Now I start the nodes with the following command
First node
./bitcoin/src/bitcoind -regtest
Second node ./bitcoin/src/bitcoind -regtest -rpcport=5444 -port=18888 -datadir=/Users/tommaso/.bitcoin/
But they don't connect to each other.
Only if a run the command ./bitcoin/src/bitcoin-cli -regtest -rpcport=5444 -datadir=/Users/tommaso/.bitcoin/ addnode "127.0.0.1:18444" "onetry"
they finally connect
Why does addnode=127.0.0.1:18444 in bitcoin.conf doesn't work?
If you just have to make one connection, you might try using
connectinstead ofaddnode– JBaczuk – 2018-10-09T13:18:19.110Anyway addnode should work but just to be safe I have tried as well connect but it doesn't work neither. – Tommaso Bendinelli – 2018-10-09T13:59:35.943
I have a Mac btw, this might help – Tommaso Bendinelli – 2018-10-10T07:12:28.843
1Try running bitcoind with
-debugand-printtoconsoleflags (and not-daemon) to see if you notice anything during startup – JBaczuk – 2018-10-10T12:01:51.293