SatoshiPortal / cyphernode

Modular Bitcoin full-node microservices API server architecture and utilities toolkit to build scalable, secure and featureful apps and services without trusted third parties
MIT License
363 stars 68 forks source link

Welcome App not responding - Cyphernode in Docker swarm mode - Host in 10.0.0.X range #223

Open phillamy opened 3 years ago

phillamy commented 3 years ago

After setup, the welcome app is not responding.

The problem is caused by an IP address conflict. The host has an address in the 10.0.0.X range. Docker swarm uses adresses in the same address pool/range for its subnet.

From Docker docs (2021-06): https://docs.docker.com/engine/swarm/swarm-mode/

By default Docker Swarm uses a default address pool 10.0. 0.0/8 for global scope (overlay) networks. Every network that does not have a subnet specified will have a subnet sequentially allocated from this pool.

To fix this, the swarm could be initialized with a different address pool during setup:

docker swarm init --default-addr-pool \<IP range in CIDR>

Kexkey commented 3 years ago

Thanks for the report!

Even if it sounds like it's not Cyphernode-related, I guess it would be possible to detect that situation during Cyphernode's setup and mitigate by changing the Swarm's address pool... or at least display a message to the user.

Thanks for documenting here. This issue might save a lot of time to others in the future.