Author

Topic: Unstable Bitcoin Connection (Read 208 times)

newbie
Activity: 20
Merit: 0
May 12, 2018, 01:42:30 AM
#6
addnode does not guarantee that a connection to the specified node will be attempted. If you want to guarantee that a connection will be attempted, then you need to use the -connect option.

Solved! Thanks!
staff
Activity: 3458
Merit: 6793
Just writing some code
May 08, 2018, 04:13:00 PM
#5
addnode does not guarantee that a connection to the specified node will be attempted. If you want to guarantee that a connection will be attempted, then you need to use the -connect option.
jr. member
Activity: 77
Merit: 7
May 08, 2018, 01:26:58 PM
#4
What exactly are you trying to achieve?

There is no need to run 2 nodes on the same machine with the same coin. it will just waste double the space and incoming nodes will expect to connect on a certain port anyway and if you are running non standard ports it wont get a connection.

If you want to test your modified version of bitcoin I would suggest using an outside server using the standard ports on both sides. This is the only true test you can attempt. Try what Sellingaccs has suggested.

Hope it all works!
copper member
Activity: 2856
Merit: 3071
https://bit.ly/387FXHi lightning theory
May 07, 2018, 10:21:09 AM
#3
Could both computers be trying to take the 127.0.0.1 IP internally also?

Do you have another IP they have assigned like 10.10.x.x or 192.168.x.x that you could use to link them (just thinking a bit outside the box).

Sellingaccs covered everything else quite well.
member
Activity: 126
Merit: 50
Ask me for Pools, Nodes and Explorers.
May 07, 2018, 09:37:10 AM
#2
I think that locally running two nodes might be causing some problems, however do not take my word for it.
I'd suggest you to try running other of the nodes on a external server, like on a Vultr VPS for example.

Also i noticed that you have the following line:

Code:
sudo ~/bitcoin/src/bitcoind -datadir=$HOME/.bitcoin2 -addnode=127.0.0.1:8962 -port=9333 -rpcport=9332 -debug=rpc -dns=0 -dnsseed=0

Try changing the 8962 to 8963 on the addnode line. You entered the wrong P2P port, unless you are trying to send RPC commands to the another client. Don't know what else could be the problem.
newbie
Activity: 20
Merit: 0
May 07, 2018, 09:21:51 AM
#1
I fork bitcoin core 16.0 and create my own alt coin. I run two bitcoind:

Code:
sudo ~/bitcoin/src/bitcoind -addnode=127.0.0.1:9332 -port=8963 -rpcport=8962 -debug=rpc -dns=0 -dnsseed=0

sudo ~/bitcoin/src/bitcoind -datadir=$HOME/.bitcoin2 -addnode=127.0.0.1:8962 -port=9333 -rpcport=9332 -debug=rpc -dns=0 -dnsseed=0

However, the connection between them seems very unstable. When I use bitcoin-cli -getinfo, sometimes the connection=0

I run locally, So I think the connection should be pretty stable? What's wrong?

Thank you very much.
Jump to: