Hello everyone,
I am trying to setup a mariadb/galera cluster across two datacenters. I have tried a few configurations but I have not been having any luck.
Here is what I am trying to achieve. I am currently operating in a private datacenter and I have three database nodes that connect to each other over a local network. I am trying to migrate my setup to a co-location facility, and I have duplicated my setup there. I want to be able to synchronize the two cluster together.
Starting with my current firewall I created NAT rules to map ports of three public ip addresses to ports on the original cluster. These ports are 3306, 4567, 4568, and 4444. I changed my configs to use the NAT'ed public ip addresses instead of the local ip addresses in wsrep_cluster_address and wsrep_node_address.
I stopped the cluster and started it up by bootstrapping the first node. When I joined the second node I saw this error in the second node's error log:
150820 13:40:35 [Warning] WSREP: Failed to prepare for incremental state transfer: Failed to open IST listener at tcp://x.x.x.x:4568', asio error 'Cannot assign requested address': 99 (Cannot assign requested address)
The second node does join the cluster (although it takes a while). My guess is that IST fails to bind to the public ip because the node does not have that ip address assigned to it.
Is it possible to make a node listen on tcp://0.0.0.0.4568 so it will work correctly behind a firewall? If not what are my options? hand off public ip addresses to the nodes in each datacenter? SSH tunnels? VPN? If there is anyone who has dealt with the kind of setup I would greatly appreciate and advice.
Thanks,
Mark