I have created an altcoin base on litecoin source code. I want to test it in multiple node to test peers of each node weather each node can connect to each other. So I try to run "mycoind" in multiple but it not work. Any way for me to run multiple node in same ubuntu machine?
-
can you provide the last few lines of debug.log and config files?– AdamMay 4, 2018 at 16:26
-
My config file: rpcuser=dogerpc rpcpassword=DLKKWE93203909238dkkKKeowxmIOw0232lsakwL02k rpcport=8334 rpcallowip=192.168.1.* rpcallowip=127.0.0.1 server=1 daemon=1 listen=1 testnet=0– D NguyenMay 4, 2018 at 17:54
3 Answers
Try to use -datadir with mycoind and specify that node's data directory address there.Remember each peer needs different port and rpcport, so for example :
mycoind -port=<port> -rpcport=<rpcport> -datadir=/home/user/.mycoind2(or whatever) -(other parameteres)
I you want to add node just simply use "-addnode=127.0.0.1:" along mycoind command.
Your problem here is nodes are trying to use the same port Accept connections from outside.
You have to change the default port or disable listening.
-port=<port> Listen for connections on <port> (default: 8333 or testnet: 18333)
or
-listen Accept connections from outside (default: 1 if no -proxy or -connect/-noconnect)
If you want to add another peer just simply add "-addnode:127.0.0.1:" to mycoind command.
It is definitely a combination of all of the above answers.
Ports should be different for every node
From my testing in the past there can only be 1 server=1 when running the same nodes for the same altcoin.
Specifying a -datadir on each node is required because if not it will on look in the default location.
Each Node should be different ports and datadirs, if it's the same altcoin then there should only be one node with server=1.
I hope this helps.