All Products
Search
Document Center

Object Storage Service:FAQ

Last Updated:Feb 29, 2024

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 work on the 64-bit Linux system. For other systems, replace ./ossutil64 in the commands with the corresponding binary name. For more information, see ossutil command reference.

Is object synchronization supported for Infrequent Access and Standard objects?

Yes, object synchronization is supported for Infrequent Access (IA) and Standard objects. For more information about synchronization, see Overview.

How do I prevent an object from being overwritten by another object that has the same name?

To prevent an object from being overwritten by another object that has the same name, specify the -u parameter in ossutil commands.

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 that you want to upload with existing objects in the bucket.

If the name of the object that you want to upload is the same as the name of an existing object and the last modified time of the object that you want to upload is the same as or earlier than the last modified time of the existing object, the object that you want to upload is skipped. If the last modified time of the object that you want to upload is later than the last modified time 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 skip message if you confirm that the content of the existing same-name object in the bucket is desired.

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

Analysis: HTTP 403 status code is returned due to one of the following reasons:

  • If you perform the operation as a RAM user, the RAM user does not have the required permissions on the object.

  • The object is blocked by OSS because the object content is prohibited.

Solutions

  • Insufficient RAM user permissions: Grant the required permissions.

  • Content violation: Delete or ignore the object if the object is blocked by OSS because the object content is prohibited.

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

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

Solutions

Warning

Deleted buckets and objects cannot be restored. Exercise caution when you run the command.

  • If versioning was or is enabled for the bucket, delete parts and previous versions from the bucket before you delete the bucket.

    1. Delete parts and previous versions from the bucket.

      • Run the following commands to list and delete parts from the bucket:

        ./ossutil64 ls oss://bucket1 -m
        ./ossutil64 rm -m oss://bucket1 -r
      • Run the following commands 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 the bucket.

    • If versioning is disabled for the bucket, run the following command to forcibly delete the bucket:

      ./ossutil64 rm oss://bucketname -abrf
    • If versioning was or is enabled for the bucket, run the following command to forcibly delete the bucket:

      ./ossutil64 rm oss://bucketname -abrf --all-versions

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 that you want 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 the instances, when the upload or download on an instance is complete, the .ossutil_checkpoint folder is automatically deleted. As a result, the upload or download on other instances cannot be completed and the progress on other instances exceeds 100%.

Solutions

  • 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

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

Analysis: This error occurs due to one of the following reasons:

  • ossutil retries the request when 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 download data by range until the entire object is downloaded. As a result, multiple request records are generated when you download an object that is greater than 100 MB in size.

What do I do if the download task is interrupted when I use ossutil to download an object?

The download of a large object may require a significant amount of time to complete and may experience an interruption in the process. You can use a checkpoint file to resolve this issue.

For example, when you use the cp command to upload an object, configure --checkpoint-dir to specify the directory in which the log information of the resumable upload task is stored.

./ossutil64 cp examplefile.txt oss://examplebucket/desfolder/ --checkpoint-dir localfolder/

For more information about how to configure --checkpoint-dir, see Command syntax.

What do I do if the Error: accessKeyID and ecsUrl are both empty error occurs when I run a command in ossutil?

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

Solutions

  • Before you run a command in ossutil, make sure that a configuration file is generated in the home directory of your account. For more information, see Install ossutil.

  • When you run a command in ossutil, specify the path of the configuration file. For example, specify the path of the configuration file when you upload an object by running the cp command:

    ./ossutil64 cp examplefile.txt oss://examplebucket/destfolder/ -c /home/admin/.ossutilconfig

Why is charset=utf-8 automatically added to the content-type parameter of an object that is uploaded by using ossutil?

Analysis: When you upload an object, ossutil searches for the associated Multipurpose Internet Mail Extensions (MIME) type based on the object extension to automatically specify the Content-Type parameter of the object. ossutil searches for the associated MIME type by calling the MIME operation of the standard library of OSS SDK for Go. The MIME operation automatically adds charset=utf-8 for objects of the text type. For example, text/html; charset=utf-8 is returned for objects that have an .htm extension.

Solution: Upgrade ossutil to version 1.7.14 or later. You can reinstall ossutil to upgrade ossutil. For more information, see Install ossutil.

Can I use ossutil to query the size of a directory?

Yes, you can run the du command in ossutil to query the size of a directory. The du command obtains information about all objects in the directory by calling the ListObjects operation and then calculates the size of the directory. If the directory contains a large number of objects, a long period of time is required to complete the query task.

For more information, see du (query object sizes).

How do I generate a signed URL that contains a custom domain name of the bucket?

  1. Configure a custom domain name for the bucket.

    For more information, see Specify a custom domain name.

  2. Run the sign command to generate a signed URL.

    For more information, see sign (generate signed object URLs).

Is result sorting supported for object query by using ossutil?

No, result sorting is not supported for ossutil-based object query.

What do I do if the "no such host" error is reported when I use ossutil to run commands?

Analysis: The endpoint is invalid.

Solution: Specify a valid value for the -e parameter, or store the endpoint information in the configuration file. The -e parameter specifies the endpoint of the bucket, as in -e oss-cn-shanghai.aliyuncs.com. Do not add other fields to the endpoint. For more information about the endpoints of each region, see Regions and endpoints.

How am I charged for running the du command?

If --all-versions is not specified in the du command, the ListObjects operation is called. If --all-versions is specified in the du command, the ListObjectVersions operation is called. In addition, the du command also initiates a call to the ListMultipartUploads operation, which incurs request fees. For more information, see API operation calling fees.

Note

If parts are stored in the bucket, additional ListUploadedParts requests are created.