This topic describes common Tunnel error codes, their causes, and solutions.
The following are common error codes for Tunnel:
Error message: ErrorCode=NoSuchPartition, ErrorMessage=The specified partition does not exist
Error message: ErrorCode=Local Error, Failed to create download session with tunnel endpoint
Error message: ErrorCode=NoSuchProject, ErrorMessage=The specified project name does not exist
Error message: ErrorCode=InvalidBlockID, ErrorMessage=The specified block id is not valid.xxxx
Error message: ErrorCode=StatusConflict, ErrorMessage=The download session is expired
Error message: ErrorCode=InvalidRowRange, ErrorMessage=The specified row range is not valid
Error message: ErrorCode=StatusConflict, ErrorMessage=The upload|download session is expired
Error message: ErrorCode=FlowExceeded, ErrorMessage=Your flow quota is exceeded
Error message: ErrorMessage=java.net.SocketException: Connection reset
Error message: ErrorCode=InstanceNotTerminate, ErrorMessage=The instance does not terminate
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 verify the partition name. You can also create a new partition for the destination table. For more information about how to create partitions, see Add a partition.
Error message: ErrorCode=Unauthorized, ErrorMessage=The request authorization header is invalid or missing
Cause
The AccessKey is incorrect and fails identity authentication.
Solution
Obtain the correct AccessKey from the AccessKey Management page. If the AccessKey is correctly configured, join the DingTalk group to provide feedback. Include the logs of successful uploads or downloads that use the AccessKey.
Error message: ErrorCode=Local Error, Failed to create download session with tunnel endpoint
Cause
Cause 1: The network connection failed.
Cause 2: The table or partition contains too many small files.
Solution
Solution for Cause 1:
On the device where the error occurred, run the
curlcommand to connect to the Tunnel Endpoint specified in the error message. Verify that the Endpoint is accessible.If the Endpoint is accessible, a message is returned. In this case, proceed to the solution for Cause 2.

If the Endpoint is not accessible, check and modify the Tunnel Endpoint configuration.
Tunnel Endpoints for the Internet end with aliyun.com. Tunnel Endpoints for internal networks or VPCs end with aliyun-inc.com. Configure the correct Tunnel Endpoint based on your business needs. For more information about Tunnel Endpoints, see Endpoints.
NoteIf you access a Tunnel Endpoint on an internal network or VPC from a device on the Internet, the connection may fail. Similarly, the connection may fail if you access a Tunnel Endpoint on the Internet from a device on an internal network or VPC.
Solution for Cause 2:
Use the MaxCompute client or the DataWorks client to run the
desc extendedcommand. This command lets you view the number of files in the table or partition.desc extended <table_name> [partition(partition_spec)];The FileNum parameter in the returned result indicates the number of files. If the number of files exceeds 1,000, you must merge the small files.
If your project also uses Instance Tunnel to download data, many files in the table can also cause this issue and lead to a timeout. If you do not need to download the SQL query results, you can disable Instance Tunnel. The SQL execution process is not affected by the LIMIT parameter and lists all data in the table. To speed up queries, add a WHERE clause. For example, to find columns that do not contain NULL values, add a
where xxx not nullstatement. This action generates temporary data and avoids a full table scan.
Error message: ErrorCode=NoSuchProject, ErrorMessage=The specified project name does not exist
Cause
The MaxCompute project name or the Tunnel Endpoint is incorrect.
Solution
Check and correct the project name.
Log on to the MaxCompute console. In the upper-left corner, switch the region. Then, on the Project Management tab, view the MaxCompute project name.
Check and correct the Tunnel Endpoint.
For information about the Tunnel Endpoints for different regions and networks, see Endpoints.
Error message: ErrorCode=NoPermission, ErrorMessage=Authorization Failed [4019], You have NO privilege 'odps:Update' on
Causes
You do not have permission to upload data.
Solution
Use the Data Map feature in DataWorks to request the Update permission for the destination table. Alternatively, ask the project owner or table owner to grant the Update permission to you. For more information about authorization, see MaxCompute permissions.
Error message: ErrorCode=NoPermission, ErrorMessage=Authorization Failed [4019], You have NO privilege 'odps:Download' on
Cause
You do not have the required permissions to download data.
Solution
Use the Data Map feature in DataWorks to request the Download permission for the destination table. Alternatively, ask the project owner or a user with the Super_Administrator role to grant the Download permission to you. For more information about Download authorization, 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
A data protection mechanism is enabled for the MaxCompute project. This mechanism prohibits data downloads using Tunnel.
Solution
Contact the project owner to configure an exception policy and grant the required permissions to the user. 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 BlockID is invalid due to concurrent multitasking.
Solution
Reduce the degree of concurrency. You can also run the following command to clear logs that are more than 5 days old.
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 was modified during the data download.
Solution
Create a new download session to download the data. You can view the modification records in the following ways:
View DDL operation records: Use the Data Map feature in DataWorks to view the change history of the table. For more information, see View details.
View table data modification records: View the data change records using metadata views or audit logs.
Error message: ErrorCode=StatusConflict, ErrorMessage=The download session is expired
Cause
The download took more than 24 hours, which caused the session to expire.
Solution
Create a new download session to download the data. Note the following:
If a download session is not actively closed, it automatically expires after 24 hours.
If the table is modified after a download session is created, the session also becomes invalid.
Error message: ErrorCode=StatusConflict, ErrorMessage=You cannot complete the specified operation under the current upload or download status
Cause
Cause 1: The upload session has already been submitted.
Cause 2: The table or partition contains too many small files.
Solution
Solution for Cause 1: Create a new upload session to upload the data.
Solution for Cause 2: Merge the 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 incorrect.
Solution
Check and correct the project name or table name.
Log on to the MaxCompute console. In the upper-left corner, switch the region. Then, on the Project Management tab, view the MaxCompute project name.
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 is incorrect or the format is invalid.
Solution
Run the
show partitions <table_name>;command to view the partitions of the table. Check the partition field information and make sure that the following requirements are met:The order of partition key columns in the parameters must be the same as the order in the CREATE TABLE statement.
If a partition key column value contains quotation marks, such as pt='a' or pt="a", you must use a later version of the Tunnel software development kit (SDK). Earlier versions of the SDK do not handle quotation marks.
If a multi-level partition specification contains spaces, such as
pt1=a, pt2=a, remove the spaces.For a multi-level partitioned table, you must specify all partitions.
The partition name must be in the same case as specified in the CREATE TABLE statement.
Error message: ErrorCode=InvalidRowRange, ErrorMessage=The specified row range is not valid
Cause
The values of the startOffset and count parameters for
openReaderare invalid.Solution
Check the code and make sure that the following requirements are met:
The value of startOffset must be greater than or equal to 0.
The value of count must be greater than 0.
Error message: ErrorCode=StatusConflict, ErrorMessage=Cannot close upload now: Close Upload Session Failed.Because of Status Conflict.Current Status:critical
Cause
A DDL operation failed. This caused the upload session to enter an abnormal status.
Solution
Create a new upload session.
Error message: ErrorCode=StatusConflict, ErrorMessage=The upload|download session is expired
Cause
The upload session or download session has been active for more than 24 hours and has expired.
Solution
Create a new upload session or download session.
Error message: ErrorCode=FlowExceeded, ErrorMessage=Your flow quota is exceeded
Fill out the DingTalk group application form to join the DingTalk group and provide feedback.
Error message: ErrorMessage=java.net.SocketException: Connection reset
Cause
This error often occurs when a program written using an SDK or a third-party platform reads data through Tunnel for processing. The server has a connection protection mechanism. If you open a RecordReader but do not read data for a long time, the server disconnects the connection. The timeout period is 300 seconds. The following figure shows the process.
The RecordReader has an internal cache. If your computing or processing logic is slow and a block of cached data is not processed before the timeout, the next read operation is not triggered. This causes the error.
Solution
Optimize your code logic.
Error message: ErrorCode=Unauthorized ErrorMessage=The request authorization header is invalid or missing. Message:The signatrue is Time-Expired
Cause
The signature failed the time verification.
Solution
Check the system time of the client. The time difference between the client and the server cannot exceed 15 minutes. The Tunnel server regularly synchronizes its time using Network Time Protocol (NTP) and is generally accurate. If you confirm that the client's system time is correct, fill out the DingTalk group application form to join the DingTalk group and provide feedback.
If you encounter this error when you use the Tunnel SDK for development, make sure that the time interval between opening the writer and writing data does not exceed 15 minutes. This is because the signature is generated when the writer is opened.
Error message: ErrorCode=MalformedDataStream ErrorMessage=The data stream you provided was not well-formed or did not validate against schema
Cause
The structure of the uploaded data is inconsistent with the structure of the destination table.
Solution
Check the structure of the uploaded data and the destination table to make sure that they are consistent.
Error message: ErrorCode=MethodNotAllowed, ErrorMessage=The specified method is not allowed against clustered table and partition
Cause
Tunnel does not support uploads to clustered tables.
Solution
None.
Error message: ErrorCode=InstanceNotTerminate, ErrorMessage=The instance does not terminate
Cause
The instance for the download has not finished running.
Solution
Wait for the instance to finish running before you start the download.
Error message: ErrorCode=QPSExceeded, ErrorMessage=Your qps quota is exceeded.ODPS-0110044: Flow control triggered - Request rejected by catalog server throttling, threshold 2.60, fallback or retry later
Cause
A table-level DDL operation triggered a queries per second (QPS) throttling error. The current limit for commit operations on a single table is 75 times per 15 seconds.
Solution
Control the frequency of DDL submissions, such as Commit Upload operations.