Solution to failure to migrate OSS resources by using the data migration tool ossimport
Challenge
When you use Alibaba Cloud Object Storage Service (OSS), you can use the ossimport tool to migrate local, third-party, and Object Storage Service (OSS) data from any region to OSS. This topic describes the causes and solutions of errors that fail to migrate OSS resources by using the data migration tool ossimport.
Cause
Common causes of migration failures using ossimport include the following:
- If the files in the source path are modified during upload, an error that contains
SIZE_NOT_MATCHare recorded in log/audit.log. In this case, only the files before modification are uploaded to OSS. - If the source file is deleted during upload, the migration job may fail.
- If the name of the file to upload does not conform to the naming conventions of OSS (for example, start with a forward slash or be empty), the upload fails.
- If you failed to download the source object from OSS because of network conditions or insufficient permissions, view logs/ossimport2.log or logs/import.log to identify the cause of the failure.
- The program exits unexpectedly and the job status is Abort. In this case, contact Alibaba Cloud technical support.
Solution
If the migration fails, run the bash console.sh stat command to view the status of the migration task. If the JobState parameter is failed, the migration task fails. View the log of the migration failure. For more information, see the following content to resolve the errors in the log. You can use the retry command to retry after you resolve these problems:
Note: The path of logs that fail to be migrated to OSS is master/jobs/[$JobName]/failed_tasks/[$TaskName]/audit.log.
- [$JobName]: task name, string.
- [$TaskName]: the task name.
| Error codes | Error message | Error cause | Solution |
| AccessDenied | The bucket you are attempting to access must be addressed using the specified endpoint | The error message returned because the srcDomain or destDomain is incorrect. |
Enter the correct endpoint based on the Domain Name List. |
| SignatureDoesNotMatch | The request signature we calculated does not match the signature you provided |
destAccessKey and destSecretKey are wrong. |
Enter the correct AK information. |
| N/A | The bucket name “xxx/xx” is invalid |
The configuration items destBucket is incorrect. |
Check whether the configuration items destBucket is entered correctly. The bucket name does not contain forward slashes (/) and paths. |
| ConnectionTimeout | Connect to xxx.oss-cn-beijing-internal.aliyuncs.com:80 timed out |
This is a connection timeout error. Usually, the reason is that the device used for migration is not an ECS instance or an ECS instance in the same region as OSS, but the configuration file uses the internal domain name of OSS. The internal endpoint supports access only from ECS instances that are located in the same region as OSS instances. |
This problem can be solved in the following ways:
|
| InvalidBucketName | The specified bucket is not valid |
The domain name configured by the destDomian in the configuration file is the endpoint of the region where the bucket is located, not the second-level domain name with the bucket name. |
Enter the endpoint of the region where the bucket is located. For example, if the bucket is in China (Beijing), you should enter the oss-cn-beijing.aliyuncs.com. For more information, see Sample configuration files. |
| RequestTimeTooSkewed | Unable to execute HTTP request: The Difference between... is too large |
This error may be caused by the following conditions:
|
This problem can be solved in the following ways:
|
| N/A | The object key "/xxxxx.jpg” is invalid |
This error may be caused by the following conditions:
|
This problem can be solved in the following ways:
|
| N/A | No route to host |
in this case, the network is blocked due to local firewalls or iptables. |
Run the ping command to test whether the migration server to the source and target network are normal.
|
| N/A | Unknown http list file format |
When using HTTP mode migration, the problem is because the specified HTTP list file format is incorrect or the content does not conform to the specification. |
This problem can be solved in the following ways:
|
SLB parameters
Solution for successful migration after repeated retries after some file migration failures:
- View the list
master/jobs/[$JobName]/failed_tasks/[$TaskName]/error.listof files that failed to be migrated to obtain the relative paths of the failed files. - Check whether you are authorized to access these files, whether these files are deleted, whether they are symbolic links, and whether the file names are garbled.
- After the preceding problems are resolved, run the retry command to migrate the files again.
Applicable scope
- Object Storage Service (OSS)
- ossimport