0

I cloned an altcoin and set up a network of 7 peers.

One of the clients is connected to a pool and is mining the coin.

All the other clients are connected to the pool one and are syncing and updating as they should.

The different clients are located at different VPSs and all of their IPs are inserted into the code as seeds.

When a new client is started it automatically connects to the pool node, but never to the other ones.

I tried the addnode method but it still does not make the nodes connect.

In the debug.log of one of them, I found this:

trying connection <ipaddres>:port lastseen=396818.4hrs

and a little bit further down

connection to <sameipaddress>:port timeout

Is there another way do debug the connection attempt more in depth? Do you have any idea why are the nodes not connecting to eachother, but only to the pool one?

Thanks!

  • It seems that the firewall is stopping the connections... – Alex Brest Jun 9 '18 at 17:08
  • When I open the ports in the firewall the nodes find one of the other nodes (randomly) and stops with 1 connection. – Alex Brest Jun 10 '18 at 8:56
0

If your 7 nodes are all on the same WAN IP address then you will need to specify individual ports for each node and port forwards to correspond with them.

For example if your WAN IP is 10.10.10.10 and all 7 nodes originate from this IP, you will have to tell each node to listen on it's own port in the config file for the coin client. You would then have to tell your router to forward traffic from each port to the LAN IP address of your node.

EDIT:

Now that I fully understand what you were asking, if you want nodes to find each other without specifying the connections in the configuration file you will either need to hard code the IP addresses of your seed nodes into the source in net.cpp (I think..) OR setup a DNS seeder that contains the list of the healthy nodes for seeding.

  • They are all on separate VPSs - different machines with different public IPs. – Alex Brest Jun 13 '18 at 20:12
  • Hmmm... Do you have info relative to the firewalls for the VPS's? && What ports are the clients listening on? – apt-getschwifty Jun 14 '18 at 0:28
  • I have disabled the firewalls and when I add a node manually, they connect but they don't find each other automatically - i guess they don't share known nodes?. The port is 26668. – Alex Brest Jun 14 '18 at 7:11
  • Ah no, they won't unless they're hard coded into the source, found via your own DNS seeding or manually specified in the config file. – apt-getschwifty Jun 14 '18 at 20:46

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.