ossimport is a data migration tool that moves local, third-party, or OSS data from any region to Object Storage Service (OSS). This page covers the most common reasons ossimport migration jobs fail and how to fix them.
Check the migration status
Run the following command to view the status of a migration job:
bash console.sh statCheck the JobState value in the output:
JobState value | Meaning | Next step |
|---|---|---|
failed | The migration job failed. | Check the log to identify the error. See Read the logs. |
Abort | The program exited unexpectedly. | Contact Alibaba Cloud technical support. |
Read the logs
Failed migration logs are written to:
master/jobs/[$JobName]/failed_tasks/[$TaskName]/audit.logwhere [$JobName] is the job name and [$TaskName] is the task name.
If the failure occurred while downloading source objects from OSS, check logs/ossimport2.log or logs/import.log for more detail.
Common causes of migration failures
Before looking up a specific error code, check whether any of the following conditions apply to your job:
A source file was modified during upload. ossimport records a
SIZE_NOT_MATCHerror inlog/audit.logand uploads only the pre-modification version.A source file was deleted during upload, causing the job to fail.
A file name violates OSS naming conventions — for example, a name that starts with a forward slash or is empty.
A network issue or permission problem prevented ossimport from downloading the source object from OSS.
Resolve errors by error code
Find your error in the table below and follow the steps in the solution column. After fixing the issue, use the retry command to resume the job.
| Error code | Error message | Cause | Solution |
|---|---|---|---|
AccessDenied | The bucket you are attempting to access must be addressed using the specified endpoint | srcDomain or destDomain is incorrect | Enter the correct endpoint for your region. See Regions and endpoints. |
SignatureDoesNotMatch | The request signature we calculated does not match the signature you provided | destAccessKey or destSecretKey is incorrect | Verify and correct your AccessKey ID and AccessKey Secret. |
| N/A | The bucket name"xxx/xx" is invalid | destBucket contains a forward slash or a path | Set destBucket to the bucket name only. Do not include forward slashes or path components. |
ConnectionTimeout | Connect to xxx.oss-cn-beijing-internal.aliyuncs.com:80 timed out | The migration host is using an internal endpoint but is not an Elastic Compute Service (ECS) instance, or is not an ECS instance in the same region as the OSS bucket. Internal endpoints are only accessible from ECS instances in the same region. | Do one of the following: (1) Switch to a public endpoint in the configuration file, delete the migration job, and resubmit it. (2) Run the migration from an ECS instance in the same region as the OSS bucket. |
InvalidBucketName | The specified bucket is not valid | destDomain is set to a subdomain that includes the bucket name (for example, mybucket.oss-cn-beijing.aliyuncs.com) instead of the regional endpoint | Set destDomain to the regional endpoint only. For a bucket in China (Beijing), use oss-cn-beijing.aliyuncs.com. See Sample configuration files. |
RequestTimeTooSkewed | Unable to execute HTTP request: The Difference between... is too large | The system clock on the migration host differs from OSS server time by more than 15 minutes, or high CPU utilization from concurrent uploads is causing delays | Do one of the following: (1) Sync the system clock on the migration host with the OSS server time. (2) If high concurrency is the cause, reduce the value of workerTaskThreadNum in sys.properties to lower the number of concurrent uploads. |
| N/A | The object key"/xxxxx.jpg" is invalid | srcPrefix is set to a directory path that does not end with a forward slash (/), or destPrefix starts with a forward slash (/) or backslash (\) | Check srcPrefix: if the value points to a directory, it must end with /. Check destPrefix: remove any leading forward slashes or backslashes. |
| N/A | No route to host | The network path from the migration host to the source or destination is blocked, typically by local firewalls or iptables rules | Run ping to test connectivity from the migration host to both the source and destination. If connectivity is normal, check whether local firewall rules or iptables are blocking the connection. You can also try disabling the firewall. If connectivity is abnormal, fix the network issue and retry. |
| N/A | Unknown http list file format | The HTTP list file used in HTTP mode migration has an incorrect format or line endings | If the file was copied from another OS, convert the line endings: on Linux, use mac2unix or dos2unix. On Windows, use a format conversion tool. If the content format is wrong, correct it according to the specification in the"Configuration files" section of Architectures and configurations. |
Retry after partial failures
If most files migrated successfully but some failed, follow these steps:
Open the failed file list to get the paths of files that did not migrate:
master/jobs/[$JobName]/failed_tasks/[$TaskName]/error.listFor each failed file, check whether:
You have permission to access the file
The file has been deleted
The file is a symbolic link
The file name contains garbled characters
Fix any issues found, then run the retry command to migrate the failed files again.
Applicable scope
Object Storage Service (OSS)
ossimport