All Products
Search
Document Center

MaxCompute:Common Tunnel errors

Last Updated:Apr 23, 2024

This topic describes common errors that may occur when you use Tunnel commands, the causes of the errors, and solutions.

Common Tunnel errors:

Error message: ErrorCode=NoSuchPartition, ErrorMessage=The specified partition does not exist.

  • Cause

    The destination partition does not exist.

  • Solution

    Run the show partitions <table_name>; command to check whether the partition name that you specify is valid, or create a partition for the destination table. For more information about how to create a partition, see Add partitions.

Error message: ErrorCode=Unauthorized, ErrorMessage=The request authorization header is invalid or missing.

  • Cause

    The AccessKey pair is invalid and fails identity verification.

  • Solution

    Go to the AccessKey Pair page and obtain a valid AccessKey pair. If your AccessKey pair is valid, join the DingTalk group to report the issue and provide the logs about uploads or downloads that are successfully performed by using the AccessKey pair.

Error message: ErrorCode=Local Error, Failed to create download session with tunnel endpoint.

  • Causes

    • Cause 1: The network is not connected.

    • Cause 2: Excessive small files exist in a table or a partition.

  • Solutions

    • Solution to Cause 1:

      In the CLI of the device that reports the error, run the curl command to access the Tunnel endpoint that appears in the error message and check whether the access is successful.

      • If the following information is returned, the access to the endpoint is successful. In this case, troubleshoot the error based on Solution to Cause 2. Test connectivity

      • If the endpoint fails to be accessed, check and modify the tunnel endpoint configurations.

        The public Tunnel endpoint ends with aliyun.com. The Tunnel endpoint of the classic network or a virtual private cloud (VPC) ends with aliyun-inc.com. You can specify a Tunnel endpoint based on your business requirements. For more information about Tunnel endpoints, see Endpoints.

        Note

        If you access a Tunnel endpoint of the classic network or a VPC from an external device, or if you access the public Tunnel endpoint from a device that resides in the classic network or a VPC, the access may fail because of network disconnection.

    • Solution to Cause 2:

      Run the desc extended command on the MaxCompute client or DataWorks client to view the number of files in the table or partition.

      desc extended <table_name> [partition(partition_spec)];

      The value of FileNum in the output indicates the number of files. If the number of files exceeds 1,000, you must Merge small files.

      If you use InstanceTunnel to download data in your project, this error may be caused by the number of table files. If the number of files is large, a timeout error may occur. If you do not need to download SQL query results, you can disable InstanceTunnel. This way, the SQL execution process is not affected by the LIMIT clause, and all data in the table is returned. If you want to accelerate queries, you can add a WHERE clause. For example, if you want to search for columns that do not contain NULL values, you can add the where xxx not null clause to generate temporary data. The system does not need to perform a full table scan.

Error message: ErrorCode=NoSuchProject, ErrorMessage=The specified project name does not exist.

  • Cause

    The MaxCompute project name or Tunnel endpoint is invalid.

  • Solution

    • Check the project name. If the project name is invalid, change the project name.

      Log on to the MaxCompute console. In the top navigation bar, select a region. Then, view the name of the MaxCompute project on the Project management tab.

    • Check the Tunnel endpoint. If the Tunnel endpoint is invalid, change the Tunnel endpoint.

      For more information about Tunnel endpoints for each type of network in each region, see Endpoints.

Error message: ErrorCode=NoPermission, ErrorMessage=Authorization Failed [4019], You have NO privilege 'odps:Update' on.

  • Cause

    You do not have the permissions to upload data.

  • Solution

    Go to Data Map of DataWorks and apply for the update permissions on the destination table, or contact the project owner or table owner to grant the update permissions on the table to you. For more information about how to grant the update permissions, see MaxCompute permissions.

Error message: ErrorCode=NoPermission, ErrorMessage=Authorization Failed [4019], You have NO privilege 'odps:Download' on.

  • Cause

    You do not have the permissions to download data.

  • Solution

    Go to Data Map of DataWorks to apply for the download permissions on the destination table. You can also contact the project owner or the user who is assigned the Super_Administrator role to grant the download permissions on the table to you. For more information about how to grant the download permissions, see Policy-based access control.

Error message: ErrorCode=NoPermission, ErrorMessage=Authorization Failed [4021], You have NO privilege 'odps:Select' on 'xxx', project 'xxx' is protected.

  • Cause

    The data protection feature is enabled for your MaxCompute project. Therefore, you cannot download data by using Tunnel commands.

  • Solution

    Contact the project owner to configure an exception policy to grant required permissions to you. For more information about exception policies, see Data outflow policy 1: Configure an exception policy.

Error message: ErrorCode=InvalidBlockID, ErrorMessage=The specified block id is not valid.xxxx.

  • Cause

    The block ID is invalid when multiple tasks are running at the same time.

  • Solution

    Reduce the parallelism of tasks and run the following command to delete the logs that are generated five days before the current day:

    tunnel purge 5;

Error message: ErrorCode=TableModified, ErrorMessage=The specified table has been modified since the download initiated. Try initiate another download.

  • Cause

    The table is modified during data download.

  • Solution

    Recreate a download session to download data. You can use one of the following methods to view the change records:

Error message: ErrorCode=StatusConflict, ErrorMessage=The download session is expired.

  • Cause

    The download duration exceeds 24 hours. As a result, the session expires.

  • Solution

    Recreate a download session to download data. Take note of the following points:

    • If the download session does not automatically terminate, the session becomes invalid after 24 hours.

    • After you create a download session to download data from a table, the download session becomes invalid if the table is modified.

Error message: ErrorCode=StatusConflict, ErrorMessage=You cannot complete the specified operation under the current upload or download status.

  • Causes

    • Cause 1: The upload session is committed.

    • Cause 2: Excessive small files exist in a table or a partition.

  • Solutions

    • Solution to Cause 1: Recreate an upload session to upload data.

    • Solution to Cause 2: Merge small files. For more information, see Merge small files.

Error message: ErrorCode=InvalidProjectTable, ErrorMessage=The specified project or table name is not valid or missing.

  • Cause

    The project name or table name is invalid.

  • Solution

    Check whether the project name or table name is invalid. If the project name or table name is invalid, change it.

    Log on to the MaxCompute console. In the top navigation bar, select a region. Then, view the name of the MaxCompute project on the Project management tab.

    You can run the show tables; command to view the table name.

Error message: ErrorCode=InvalidPartitionSpec, ErrorMessage=Error: The specified partitionspec is not valid.

  • Cause

    The partition field or format is invalid.

  • Solution

    You can run the show partitions <table_name>; command to view the partition information of the table. Check the partition field information and make sure that the following requirements are met:

    • The sequence of the partition key columns in the parameters is the same as the sequence of the partition key columns in the CREATE TABLE statement.

    • If the value of a partition key column contains single quotation marks (') or double quotation marks ("), such as pt='a' or pt="a", make sure that Tunnel SDK of the latest version is used because Tunnel SDK of an earlier version does not support quotation marks.

    • If a space exists between multi-level partitions, such as pt1=a, pt2=a, remove the space.

    • If the table is a multi-level partitioned table, you must specify a partition for each partition level.

    • The letter case of the partition names in the parameters is the same as the letter case of the partition names in the table creation statement.

Error message: ErrorCode=InvalidRowRange, ErrorMessage=The specified row range is not valid.

  • Cause

    The values of the startOffset and count parameters in the open_reader method are invalid.

  • Solution

    Check the code and make sure that the following requirements are met:

    • The value of startOffset is greater than or equal to 0.

    • The value of count is greater than 0.

Error message: ErrorCode=StatusConflict, ErrorMessage=Cannot close upload now: Close Upload Session Failed.Because of Status Conflict.Current Status:critical.

  • Cause

    The DDL operation fails. As a result, the upload session becomes abnormal.

  • Solution

    Recreate an upload session.

Error message: ErrorCode=StatusConflict, ErrorMessage=The upload|download session is expired.

  • Cause

    The duration of the upload session or download session exceeds 24 hours. As a result, the session expires.

  • Solution

    Recreate an upload session or a download session.

Error message: ErrorCode=FlowExceeded, ErrorMessage=Your flow quota is exceeded.

Fill in the DingTalk group application form to join the DingTalk group to report the issue.

Error message: ErrorMessage=java.net.SocketException: Connection reset.

  • Cause

    In most cases, this error occurs when you use a program that is written by using an SDK or when a third-party platform uses Tunnel to read data for processing. Connection protection is enabled for the server. After you turn on RecordReader, the server is disconnected if you do not read data from the server within 300 seconds.

    RecordReader has a cache. If data is computed or processed at a low speed, cache data may not be processed within the timeout period and data reading may not be triggered. As a result, this error message may appear.

  • Solution

    Optimize the code processing logic.

Error message: ErrorCode=Unauthorized ErrorMessage=The request authorization header is invalid or missing. Message:The signature is Time-Expired.

  • Cause

    The signature-based time verification fails.

  • Solution

    Check the system time of your device and make sure that the interval between the time that Open Writer is called and the time that the data write operation starts does not exceed 15 minutes. The Tunnel server performs Network Time Protocol (NTP) timing as scheduled. In most cases, the NTP timing is accurate. If you confirm that the system time of your device is correct, fill in the DingTalk group application form to join the DingTalk group to report the issue.

    If you encounter this error when you use Tunnel SDK, make sure that the time interval between the time that Open Writer is called and the time that the data write operation starts does not exceed 15 minutes. A signature is generated when Open Writer is called.

Error message: ErrorCode=MalformedDataStream ErrorMessage=The data stream you provided was not well-formed or did not validate against schema.

  • Cause

    The schema of the data that you upload is different from the schema of the destination table.

  • Solution

    Check the schema of the data that you upload and the schema of the destination table and make sure that the schemas are the same.

Error message: ErrorCode=MethodNotAllowed, ErrorMessage=The specified method is not allowed against clustered table and partition.

  • Cause

    You cannot upload clustered tables by using Tunnel commands.

  • Solution

    None.

Error message: ErrorCode=InstanceNotTerminate, ErrorMessage=The instance does not terminate.

  • Cause

    The instance whose data you want to download is running.

  • Solution

    Download the data of the instance again after the instance stops running.