All Products
Search
Document Center

:Error "failed to get master store addr for topic" is reported when you use the change tracking SDK to consume data

Last Updated:May 23, 2023

Problem description

An error similar to the following error is reported when you use the change tracking SDK to consume data:

failed to get master store addr for topic aliyun_sz_ecs_rdsr*y-1-0

Cause

The consumption checkpoint of the change tracking task is earlier than the time when data changes occur.

Solution

  1. Check whether the usePublicIp parameter is set to true. You must set this parameter to true before you use the change tracking SDK to consume data.

    Note

    The configuration usePublicIp=true specifies that the change tracking SDK accesses the change tracking task in Data Transmission Service (DTS) over the Internet.

  2. Check the consumption checkpoint of the change tracking SDK in the DTS console. If the consumption checkpoint is earlier than the time when data changes occur, no data is available and the error may occur. The following example shows the detailed error information.

    0    [Thread-1] INFO  com.aliyun.drc.clusterclient.partition.PartitionPool  - client partition is empty,wait partition balance
    10035 [Thread-1] INFO  com.aliyun.drc.clusterclient.partition.PartitionPool  - client partition is empty,wait partition balance
    20087 [Thread-1] INFO  com.aliyun.drc.clusterclient.partition.PartitionPool  - start new partition: {"tables":["sdp_db."],"topic":"aliyun_sz_ecs_rdsraey-1-0","guid":"dts_rdsraey_XNG","partition":{"name":"cb3999be97c2552477c2c298cb8339f1","gmt":1451272165},"offset":"16843009:1:188:21363830:[$Data]:511","group":"31137122"}
    20229 [Thread-1] ERROR com.aliyun.drc.clusterclient.partition.PartitionPool  - keep alive error
    com.aliyun.drc.client.HttpBadResponseException: java.lang.Exception: failed to get master store addr for topic aliyun_sz_ecs_rds**ey-1-0
      at com.aliyun.drc.client.impl.ServerProxy.askStore(ServerProxy.java:247)
      at com.aliyun.drc.client.impl.ClusterManagers.findStore(ClusterManagers.java:105)
      at com.aliyun.drc.client.impl.DRCClientImpl.connectClusterManager(DRCClientImpl.java:320)
      at com.aliyun.drc.client.impl.DRCClientImpl.startService(DRCClientImpl.java:572)
      at com.aliyun.drc.clusterclient.impl.ClientCluster.doStart(ClientCluster.java:128)
      at com.aliyun.drc.clusterclient.partition.PartitionPool.keepAlive(PartitionPool.java:140)
      at com.aliyun.drc.clusterclient.partition.PartitionPool.run(PartitionPool.java:168)
    Note

    The [$Data] field in "offset":"16843009:1:188:21363830:[$Data]:511", indicates the consumption checkpoint. In this example, the value of the [$Data] field is 1451012406, which indicates 2015-12-25 11:00:06.

  3. Change the consumption checkpoint of the change tracking task to the time of the current day. For more information, see Edit the consumption checkpoint.

Applicable scope

  • DTS

    Note

    This method is applicable to the previous version of the change tracking feature.