Task Log Error and Troubleshooting Guide
This document aims to provide you with a detailed guide for identifying and resolving common errors found in the logs of data synchronization tasks. We delve into the causes of various common errors and offer clear, practical troubleshooting steps to help users quickly locate and solve issues.
Viewing Task Logsβ
Task runtime logs can be viewed at the bottom of the task monitoring page. For common issues, TapData has solidified them into specific error codes for your convenience, along with their causes and solutions. If the relevant error code is not found, you can also troubleshoot based on the log keywords provided in this document or contact technical support.
Oracleβ
ORA-01555, snapshot too oldβ
Scenario: This error often occurs in databases with frequent changes during full data synchronization, preventing the completion of full data synchronization.
Solution: Adjust the Oracle's undo size. If adjustment is not possible temporarily, reduce the number of concurrent synchronization tasks on this database and retry.
ORA-01325, archive log mode must be enabled to build into the log streamβ
Scenario: This error occurs when Oracle is used as the source and incremental data synchronization fails.
Solution: Enable Oracle's archive logging. For details, see Preparation for Oracle Data Source.
ORA-00257β
Scenario: Oracle is used as the source, but archive log archiving time is not configured, requiring manual cleanup of archives. If the log space is full, the database will not be able to continue providing services.
Solution: Steps include:
-
In sqlplus, first check the storage configuration of the archive log with
show parameter recover;. If using the default flashback, you can see the configured size from db_recovery_file_dest_size's size. -
Use the following command to view the disk size occupied by archived_log each day over a period.
select trunc(COMPLETION_TIME) as "Date",
count(*) as count,
(sum(blocks*block_size))/1024/1024/1024 size_g
from v$archived_log
group by trunc(COMPLETION_TIME)
order by 1; -
Adjust the size of db_recovery_file_dest_size according to the expected storage time of archived_log.
For example, adjust with the command:
alter system set db_recovery_file_dest_size=100g;In addition, it is recommended to regularly clean up expired archive logs with a script.
ORA-06550, PLS-00201, ORA-00942β
Scenario: Oracle is used as the source and fails to perform full or incremental synchronization.
Solution: Typically, this is a permission assignment issue. For authorization methods, see Preparation for Oracle Data Source.
ORA-01400: cannot insert NULL into...β
Scenario: Oracle is used as the target, and the task log indicates the above error.
Solution: Check if there are null values in the primary keys of the source table. If present, adjust the source table data or add a row filter node to exclude null primary keys.
MongoDBβ
Failed to resume change stream, Resume of change stream was not possible, as the resume point may no longer be in the oplogβ
Scenario: When MongoDB is used as the source, the task pauses for too long or the target writes relatively slowly, causing the breakpoint to be overwritten and incremental data synchronization cannot continue.
Solution: Use rs.printReplicationInfo() to check the oplog window period. It's recommended to keep the window at least 3 days to cope with some emergencies, then restart the task.
MySQLβ
Failed to authenticate to the MySQL database ...β
Scenario: MySQL 8.0 is used as the source. Connection tests are normal, but the task fails during the incremental data synchronization stage.
Solution: Log in to the MySQL database, execute the command select host,user,plugin,authentication_string from mysql.user; to check the encryption method of the corresponding user. If the current encryption method is caching_sah2_password, execute the following format of command to change it to mysql_native_password, then restart the related tasks.
-- Replace your username, password, and host information
ALTER USER 'username'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';