This topic describes the problems that you may encounter when you use ossutil and the solutions to these problems.

Note This topic provides sample command lines that are based on the 64-bit Linux system. For other systems, replace ./ossutil64 in the commands with the corresponding binary name. For more information, see ossutil.

What do I do if the skip message appears when I use the -u parameter to upload an object?

Analysis: When you use the -u parameter to upload an object, ossutil compares the object to upload with the existing objects in the bucket. If the name of the object to upload is the same as that of an existing object and the last modified time of the object to upload is equal to or earlier than that of the existing object, the object is skipped. If the last modified time of the object to upload is later than that of the existing object, the object is uploaded. Therefore, the skip message is normal when you use the -u parameter to upload an object.

Solution: Ignore the message if the object is uploaded.

What do I do if the HTTP 403 status code is returned when an object is restored?

Analysis: The HTTP 403 status code is returned due to one of the following reasons:
  • The RAM user that you use to restore the object does not have the required permissions.
  • The object is banned by OSS because its content is illegal.
Solution:
  • Grant permissions to the RAM user.
  • Delete or ignore the object.

What do I do if an error is returned when a bucket that does not contain objects based on the result of the ls command is deleted?

Analysis: When you run the ls command without options to list objects in a bucket, the parts and previous versions (for versioned buckets only) in the bucket are not listed. A bucket that contains parts or previous versions cannot be deleted by using the rm command.

Solution:
  • Delete parts and previous versions (for versioned buckets only) from a bucket before you delete the bucket.
    1. Delete parts and previous versions from a bucket.
      • Run the following command to list and delete parts from the bucket:
        ./ossutil64 ls oss://bucket1 -m
        ./ossutil64 rm -m oss://bucket1 -r
      • Run the following command to list and delete previous versions from the bucket:
        ./ossutil64 ls oss://bucket1 --all-versions
        ./ossutil64 rm oss://bucket1 --all-versions -r
    2. Delete the bucket.
      ./ossutil64 rm oss://bucket1 -b
  • Forcibly delete a bucket.
    • Run the following command to forcibly delete an unversioned bucket:
      ./ossutil64 rm oss://bucketname -abrf
    • Run the following command to forcibly delete a versioned bucket:
      ./ossutil64 rm oss://bucketname -abrf --all-versions
Warning Deleted buckets and objects cannot be recovered. Exercise caution when you run the preceding commands.

What do I do if the upload or download progress exceeds 100%?

Analysis: A folder named .ossutil_checkpoint is generated when you use ossutil to upload or download objects. By default, if the object to upload or download is greater than 100 MB in size, resumable upload or download is used. The checkpoint information that is generated during the upload or download is stored in the .ossutil_checkpoint folder. This folder is automatically deleted after the upload or download is complete. In scenarios where multiple ossutil instances run on a client at the same time and resumable upload or download is being performed on each instance, when the upload or download on an instance is complete, the .ossutil_checkpoint folder is deleted. As a result, the upload or download on other instances cannot be completed and the progress exceeds 100%.

Solution:
  • Complete the current upload or download tasks, and upload or download the object again.
  • Add the --checkpoint-dir parameter to the cp command and specify a folder whose name is different from the name of the default checkpoint folder to store the checkpoint information. Example:
    ./ossutil64 cp oss://bucket1/myphoto.jpg  /dir  --checkpoint-dir checkpoint

What do I do if multiple requests are recorded in OSS logs when I send a request to download a single object by using ossutil?

Analysis: This error is returned due to one of the following reasons:
  • ossutil retries the request because exceptions occur or the request fails. By default, ossutil retries a request for up to 10 times.
  • If the object that you want to download is greater than 100 MB in size, ossutil sends multiple requests to obtain data by range. Parts of the object data in a range are obtained by each request until the whole object is downloaded. As a result, multiple request records are generated when an object greater than 100 MB in size is downloaded.

What do I do if the error message Error: accessKeyID and ecsUrl are both empty is reported when I use ossutil to run related commands?

Analysis: No configuration file is generated in the home directory.

Solution:

  • Before you use ossutil to run related commands, a configuration file must be generated in the home directory of your account. For more information, see Download and installation.
  • When you use ossutil to run related commands, you must specify the path of the configuration file. For example, specify the path of the configuration file when you upload an object by using the cp command:
    ./ossutil64 cp examplefile.txt oss://examplebucket/destfolder/ -c /home/admin/.ossutilconfig