How to Change DNS/IP Addresses for GemFire Nodes
search cancel

How to Change DNS/IP Addresses for GemFire Nodes

book

Article ID: 409867

calendar_today

Updated On:

Products

VMware Tanzu Gemfire

Issue/Introduction

After changing the DNS or IP addresses for GemFire cluster nodes, the cluster or clients may still reference old addresses, leading to configuration errors or connectivity failures.

Environment

All supported versions of GemFire

Resolution

Follow these steps to fully transition a GemFire cluster and its clients to new DNS/IP addresses, ensuring that all caches, directories, and configurations are updated to eliminate references to the old addresses.

 

1. Stop Cluster B and Clean Up Data

    • Shut down all locators and servers in the (target) cluster B.
    • Delete data directories, disk-stores, and any persisted locator/server directories to clear out references to old addresses.

 

  • Example:(Run on each node)

 

rm -rf $GEMFIRE_HOME/data/*

rm -rf $GEMFIRE_HOME/server_dirs/*

 

2. Export Cluster Configuration from Cluster A

    • Use gfsh to export the current cluster configuration from the source cluster (Cluster A):

 

  • Example:

 

gfsh> export cluster-configuration --dir=backup-config

 

  • Review the exported XML/property files. Update all locators, server, remote-locator, and WAN sender endpoint addresses to use the new DNS or IP values for Cluster B.

 

3. Import Configuration into Cluster B

    • Move the updated configuration files to Cluster B.
    • Import the configuration:

 

  • Example:

 

gfsh> import cluster-configuration --dir=backup-config

 

  • Verify all configuration files either reference only the new addresses or use DNS names that resolve to the updated IPs.

 

4. Deploy Locators and Cache Servers in Cluster B

    • Start up locators and cache servers using the new configuration and address scheme.

 

  • Example:

 

gfsh> start locator --name=locator1 --port=10334 --bind-address=<new_IP_or_DNS>

gfsh> start server --name=server1 --server-port=40404 --locators=<new_locator_DNS_or_IP>:10334

 

    • Confirm all running members use the new addresses with:

 

  • Example:

 

 

gfsh> list members

 

5. Export Region Data from Cluster A

  • For each region, export the data. Use the --parallel=true flag for partitioned regions to reduce downtime:

 

  • Example:

 

 

gfsh> export data --region=/<region-name> --dir=exported-data --parallel=true

 

6. Import Region Data into Cluster B

  • On Cluster B, import each region’s data:
  • Example:

 

gfsh> import data --region=/<region-name> --dir=exported-data

 

7. Redeploy or Reconfigure Applications

  • Update all GemFire client applications to use the new locator hostnames or IPs in their configuration files (such as gfsh.properties, XML, or Spring config).

 

8. Post-Migration Validation

  • Run cluster health checks:

 

  • Example:

 

gfsh> list members

gfsh> describe cluster

 

  • Check application logs for connectivity issues.
  • Confirm there are no lingering references to any old IP addresses in configurations, logs, or application properties.

Additional Information

References:

gfsh Command Help