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?
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)
-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.