-
Hello, I'm trying to setup a CouchDB cluster, but I would like to use a private interface for the internal communications between nodes.
Without the env variable and with inet_dist_use_interface set to 0,0,0,0 the cluster works smoothly, but I'm pretty sure the node use the public interface for I'm using FQDNs, but I also tried to setup the cluster using the private IPs, but it didn't work. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
I noticed that I forgot to set the IP in |
Beta Was this translation helpful? Give feedback.
-
hi, thanks for moving this issue. It seems you've figured this out but I can restate some couchdb/erlang basics; users communicate with couchdb over http only, to port 5984 of any node in the cluster. couchdb can be configured to bind that port on a particular interface (typically a public one). the couchdb nodes talk to each other with the erlang distributed protocol over other (dynamically assigned) ports. They contact the port mapper (4369) to find that port. You can bind epmd to a private interface (either by starting epmd yourself with those settings or, less safely, setting ERL_EPMD_ADDRESS to that private interface for when couchdb launches epmd for you). the Erlang nodes will use port 4369 at the hostnames of the clusters, so those need to resolve to an address that will route over your private network. You said "forgot set the IP in vm.args", can you clarify that you meant the It is strongly encouraged to give couchdb cluster members FQDN's and not refer to each other directly by IP address. |
Beta Was this translation helpful? Give feedback.
I noticed that I forgot to set the IP in
vm.args
after switching from domain to IP, which is why the cluster setup didn't work. Eventually, I set up a cluster using domains that point to private IPs (to benefit from the advantages of domains), withepmd
listening on the private interface, and I left the:5984
binding to0.0.0.0
for the APIs. It seems to work perfectly, but I'd like to have some feedback from someone who has set up a cluster with private interfaces.