This topic describes errors that may occur when OTSStream Reader is running and how to resolve the errors based on the error messages.

Error message: "Must set date or time range millis or time range string, please check your config"

  • Problem description

    The "Must set date or time range millis or time range string, please check your config" error message appears when OTSStream Reader is running. The following figure shows the error message.

    fig_setdate
  • Possible cause

    The parameters that specify the timestamp range of incremental data are not configured in the configuration script of OTSStream Reader.

  • Solution
    Specify the timestamp range of incremental data by using one of the following methods:
    • Set the value of the parameter.date parameter to the date of incremental data that you want to export.
    • Set the value of the parameter.startTimestampMillis parameter to the start timestamp of the timestamp range of incremental data, and the value of the parameter.endTimestampMillis parameter to the end timestamp of the timestamp range.

    For more information about how to configure the timestamp range of incremental data, see Synchronize incremental data in script mode.

Error Message: "The stream of data table is not enabled"

  • Problem description
    The "The stream of data table is not enabled" error message appears when OTSStream Reader is running. The following figure shows the error message. fig_datatablestream
  • Possible cause

    Stream is disabled for the data table that is specified by the parameter.table parameter in OTSStream Reader.

  • Solution
    Enable Stream for the data table that is specified in OTSStream Reader by using one of the following methods:
    • Log on to the Tablestore console, find the data table for which you want to enable the Stream feature, go to the Manage Table page, click the Tunnels tab, and then enable the Stream feature. fig_streamopen
    • Modify data table attributes by using a suitable SDK to call the UpdateTable operation. For more information, see UpdateTable.

Error Message: "As expiration time is xx, so the start timestamp must greater than xx"

  • Problem description

    The "As expiration time is xx, so the start timestamp must greater than xx" error message appears when OTSStream Reader is running. The following figure shows the error message.

    fig_greaterthan
  • Possible cause

    The startTime parameter that specifies the start timestamp of the timestamp range of incremental logs is not correctly configured based on the log expiration time.

  • Solution

    Set the startTime parameter in the synchronization script to a value that is greater than the value that is obtained by using the following formula: Synchronization task start time - Log expiration time + 10 minutes.

    To obtain the log expiration time, log on to the Tablestore console, find the data table whose log expiration time you want to obtain, go to the Manage Table page, click the Basic Information tab, and then view the value of Log Expiration Time.

Error message: "To avoid timing error between different machines, the end timestamp must smaller than xx"

  • Problem description
    The "To avoid timing error between different machines, the end timestamp must smaller than xx" error message appears when OTSStream Reader is running. The following figure shows the error message. fig_smallerthan
  • Possible cause

    An invalid value is specified for the endTime parameter.

  • Solution

    Set the endTime parameter in the synchronization script to a value that is less than the value that is obtained by using the following formula: Synchronization task start time - 5 minutes.

Error message: "The item of column must be map object"

  • Problem description
    The "The item of column must be map object" error message appears when OTSStream Reader is running. The following sample shows the error message.
    [ code:OTSStreamReaderError, messageOTS Stream Reader Error] - com.alibaba.datax.plugin.reader.otsstreamreader.internal.OTSStreamReaderException: Parse column fail, please check your config. - com.alibaba.datax.plugin.reader.otsstreamreader.internal.OTSStreamReaderException: Parse column fail, please check your config.
            at com.alibaba.datax.plugin.reader.otsstreamreader.internal.config.OTSStreamReaderConfig.parseConfigForSingleVersionAndUpdateOnlyMode(OTSStreamReaderConfig.java:178)
            at com.alibaba.datax.plugin.reader.otsstreamreader.internal.config.OTSStreamReaderConfig.load(OTSStreamReaderConfig.java:267)
            at com.alibaba.datax.plugin.reader.otsstreamreader.internal.OTSStreamReader$Job.init(OTSStreamReader.java:30)
            at com.alibaba.datax.core.job.JobContainer.initJobReader(JobContainer.java:1083)
            at com.alibaba.datax.core.job.JobContainer.init(JobContainer.java:497)
            at com.alibaba.datax.core.job.JobContainer.start(JobContainer.java:220)
            at com.alibaba.datax.core.Engine.start(Engine.java:100)
            at com.alibaba.datax.core.Engine.entry(Engine.java:318)
            at com.alibaba.datax.core.Engine.main(Engine.java:351)
    Caused by: java.lang.IllegalArgumentException: The item of column must be map object, please check your input.
  • Possible cause

    An invalid format is used to specify the value for the parameter.column parameter.

  • Solution

    Make sure that the parameter.column parameter is configured based on a valid format. The following code provides examples of the format:

    • Incorrect example
      "column":[
           "col1",
           "col2"
      ]
    • Correct example
      "column":[
           {
      
                "name" : "col1"
      
           },
           {
      
                 "name" : "col2"
      
           }
      ]