To connect to the primary cluster, execute the ENABLE CLUSTER SYNCHRONIZATION statement on a standby cluster to enable data synchronization. However, errors may occur when you execute the statement. This topic describes possible errors that may occur after you execute the ENABLE CLUSTER SYNCHRONIZATION statement and their causes and solutions.
Error 1: standby cluster not exist
Possible causes
The cluster ID of the standby cluster specified in the statement does not exist.
Solutions
Execute the following statement on the primary cluster to query the V$OB_STANDBY_STATUS view and check the value of CLUSTER_ID of the standby cluster:
obclient> SELECT CLUSTER_ID, CLUSTER_ROLE, CLUSTER_STATUS FROM oceanbase.V$OB_STANDBY_STATUS;
+------------+------------------+----------------+
| CLUSTER_ID | CLUSTER_ROLE | CLUSTER_STATUS |
+------------+------------------+----------------+
| 1 | PHYSICAL STANDBY | DISABLED |
+------------+------------------+----------------+
Error 2: enable read only cluster not allowed
Possible causes
Data synchronization cannot be enabled for read-only clusters.
Solutions
None
Error 3: enable primary cluster not allowed
Possible causes
Data synchronization cannot be enabled for the primary cluster.
Solutions
Execute the following statement on the primary cluster to query the
V$OB_STANDBY_STATUSview and check the information about all standby clusters:obclient> SELECT CLUSTER_ID, CLUSTER_ROLE, CLUSTER_STATUS FROM oceanbase.V$OB_STANDBY_STATUS; +------------+------------------+----------------+ | CLUSTER_ID | CLUSTER_ROLE | CLUSTER_STATUS | +------------+------------------+----------------+ | 1 | PHYSICAL STANDBY | DISABLED | +------------+------------------+----------------+Enable data synchronization the standby cluster.
Error 4: standby cluster failover epoch is larger than primary cluster, enable cluster not allowed
Possible causes
The standby cluster has redundant failover information. This indicates that data in the standby cluster is inconsistent with that in the primary cluster. Therefore, data synchronization cannot be enabled.
Solutions
Execute the following statement on the primary cluster and standby cluster to query the V$OB_CLUSTER_FAILOVER_INFO view for the system change numbers (SCNs) for the failover, and then contact OceanBase Technical Support for assistance.
obclient> SELECT `FAILOVER#`, TENANT_ID, SYS_TABLE_SCN, USER_TABLE_SCN FROM oceanbase.V$OB_CLUSTER_FAILOVER_INFO;
Error 5: standby cluster has more schema_version of sys than primary, enable cluster not allowed
Possible causes
The sys tenant of the standby cluster has more schema versions than that of the primary cluster. Therefore, data synchronization cannot be enabled.
Solutions
Contact OceanBase Technical Support for assistance.
Error 6: standby cluster has more freeze_info than primary, enable cluster not allowed
Possible causes
The standby cluster has more freeze information than that of the primary cluster. Therefore, data synchronization cannot be enabled.
Solutions
Execute the following statement on the primary cluster and standby cluster to query the freeze information. Then, contact OceanBase Technical Support for assistance.
obclient> SELECT * FROM oceanbase.__ALL_VIRTUAL_FREEZE_INFO;