When initializing or configuring cross-cluster WAN replication between two Tanzu GemFire service instances on Tanzu Application Service (TAS), administrators and developers may encounter the following connection and replication blockers:
Step 1: Fix Service Instance IDs & Refresh Service Keys
Update the service instances so each cluster has a unique integer ID, then delete and recreate service keys to refresh the cached JSON metadata:
# 1. Reconfigure cluster IDs
cf update-service GemFire1 -c '{"distributed_system_id": 1}'
cf update-service GemFire2 -c '{"distributed_system_id": 2}'
# 2. Re-create service keys to refresh metadata
cf delete-service-key GemFire1 my-service-key1 -f
cf delete-service-key GemFire2 my-service-key2 -f
cf create-service-key GemFire1 my-service-key1
cf create-service-key GemFire2 my-service-key2Step 2: Connect Non-Interactively via gfsh
Connect to each cluster's GoRouter URL without getting blocked by keystore prompts by explicitly setting --use-ssl=false:
gfsh> connect --url=https://<router-url>/gemfire/v1 \
--user=<cluster_operator_user> \
--password=<password> \
--skip-ssl-validation \
--use-ssl=falseStep 3: Establish WAN Gateway Senders
In gfsh, deploy the gateway senders targeting the remote cluster's new distributed_system_id:
A) On GemFire1 (Cluster ID 1): Point --remote-distributed-system-id to 2:
gfsh> create gateway-sender --id=sender-to-cluster2 --remote-distributed-system-id=2 --parallel=false --enable-persistence=trueB) On GemFire2 (Cluster ID 2): Point --remote-distributed-system-id to 1:
gfsh> create gateway-sender --id=sender-to-cluster1 --remote-distributed-system-id=1 --parallel=false --enable-persistence=trueStep 4: Attach Senders to Data Regions
Bind the gateway sender IDs to your target data regions:
gfsh> alter region --name=/myRegion --gateway-sender-id=sender-to-cluster2