All Products
Search
Document Center

Simple Log Service:Error codes

Last Updated:Oct 26, 2023

If the response that is returned by Simple Log Service contains error information after you call an API operation, the call fails. This topic describes the error codes that are returned when API calls fail. You can handle errors based on the error codes.

Overview

If an error occurs when you send an API request to Simple Log Service, Simple Log Service returns error information that consists of an HTTP status code and error details. The error details are included in the HTTP response body in the following format:

{
"errorCode" : <ErrorCode>,
"errorMessage" : <ErrorMessage>
}

You can handle errors based on the descriptions in this topic. You can also go to the API Error Center to view the details of error codes. For more information about the error codes of Simple Log Service, visit the API Error Center.

Operation-specific error codes

Each API operation has a set of operation-specific error codes. The operation-specific error codes of API operations are described in the corresponding API reference topic.

Common error codes

The common error codes that are returned by Simple Log Service are applicable to most API operations. The following table describes the common error codes that are returned when API calls fail.

Note

Simple Log Service provides the common error messages that are returned when you query and analyze logs and the corresponding solutions. For more information, see How do I resolve common errors that may occur when I query and analyze logs?.

HTTP status code

Error code

Error message

Description

Solution

400

RequestTimeExpired

Request time requestTime has been expired while server time is server time.

The error message returned because the request is initiated more than 15 minutes before or after the Simple Log Service time.

Check the requester time and try again later.

400

InvalidRequestTime

Request time requestTime not follow RFC822 spec.

The error message returned because the value of the Date header in the request does not comply with RFC 822.

Check the request headers and make sure that the value of the Date header complies with RFC 822.

400

InvalidHost

Host header Host is invalid.

The error message returned because the value of the Host header in the request is invalid.

Check the request headers and make sure that the value of the Host header is valid.

400

ProjectAlreadyExist

Project ProjectName already exist.

The error message returned because the specified project already exists.

The name of the project must be unique in a region. Specify a new project and try again.

400

PostBodyInvalid

The request body is not valid JSON object.

The error message returned because the body of the request is not in the JSON format.

Adjust the request body and initiate the request again.

400

InvalidContentType

Content-Type type is unsupported.

The error message returned because the value of the Content-Type header is invalid.

Make sure that the value of the Content-Type header is valid.

400

ParameterInvalid

Http extend authorization : authorization pair is invalid.

The error message returned because the value of the Authorization header is invalid.

Make sure that the value of the Authorization header is valid.

Http extend x-log-bodyrawsize : x-log-bodyrawsize pair is invalid.

The error message returned because the value of the x-log-bodyrawsize header is invalid.

Make sure that the value of the x-log-bodyrawsize header is valid.

Http extend x-log-compresstype : x-log-compresstype pair is invalid.

The error message returned because the value of the x-log-compresstype header is invalid.

Make sure that the value of the x-log-compresstype header is valid.

x-log-signaturemethod: x-log-signaturemethod pair is invalid.

The error message returned because the value of the x-log-signaturemethod header is invalid.

Make sure that the value of the x-log-signaturemethod header is valid.

400

MissingParameter

Missing query key : parameter.

The error message returned because the required request parameters are missing.

Specify the required request parameters and try again. For information about the signature structure and the process of calculating a signature, see Request signatures.

Missing http extend header key : authorization.

The error message returned because the Authorization header is missing in the request.

Specify the Authorization header in the request and try again. For information about the signature structure and the process of calculating a signature, see Request signatures.

Missing http extend header key : x-log-bodyrawsize.

The error message returned because the x-log-bodyrawsize header is missing in the request.

Specify the x-log-bodyrawsize header in the request and try again. For information about the signature structure and the process of calculating a signature, see Request signatures.

Missing http extend header key : x-log-date.

The error message returned because the x-log-date header is missing in the request.

Specify the x-log-date header in the request and try again. For information about the signature structure and the process of calculating a signature, see Request signatures.

Missing http extend header key : x-log-signaturemethod.

The error message returned because the x-log-signaturemethod header is missing in the request.

Specify the x-log-signaturemethod header in the request and try again. For information about the signature structure and the process of calculating a signature, see Request signatures.

401

SignatureNotMatch

Signature signature not matched.

The error message returned because the digital signature that is calculated by the client does not match the signature that is calculated by Simple Log Service.

Try again, or replace the AccessKey pair and try again. Possible causes:

  • The AccessKey pair or Security Token Service (STS) token has expired. In this case, you must check whether the AccessKey pair or STS token is valid.

  • The version of Simple Log Service SDK that is deployed is earlier than required. In this case, you can log on to GitHub to obtain open source code and references. For more information, see Overview of Log Service SDK.

For information about the signature structure and the process of calculating a signature, see Request signatures.

401

Unauthorized

The AccessKeyId is unauthorized.

The error message returned because the specified AccessKey ID does not have the required permissions.

Make sure that the AccessKey ID has access permissions on Simple Log Service. For information about how to grant a RAM user the permissions to manage Simple Log Service resources, see Create a RAM user and authorize the RAM user to access Log Service.

The security token you provided is invalid.

The error message returned because the STS token is invalid.

Check the STS request and make sure that the STS token is valid.

The security token you provided has expired.

The error message returned because the STS token has expired.

Apply for a new STS token and initiate the request again.

AccessKeyId not found: AccessKey ID

The error message returned because the AccessKey ID does not exist.

Replace your AccessKey ID and initiate the request again.

AccessKeyId is disabled: AccessKey ID

The error message returned because the AccessKey ID is disabled.

Make sure that your AccessKey ID is enabled and initiate the request again.

Your SLS service has been forbidden.

The error message returned because Simple Log Service is suspended for your Alibaba Cloud account.

Make sure that your Alibaba Cloud account has no overdue payments.

The project does not belong to you.

The error message returned because the project does not belong to the current user.

AccessKeyId is disabled.

The error message returned because the AccessKey pair is disabled.

The AccessKey pair is in an abnormal state. Make sure that your AccessKey pair is in the Enabled state.

401

InvalidAccessKeyId

The access key id you provided is invalid: AccessKey ID.

The error message returned because the AccessKey ID is invalid.

Check your AccessKey ID and make sure that the AccessKey ID is valid.

Your SLS service has not opened.

The error message returned because Simple Log Service is not activated.

Log on to the Simple Log Service console or call the Simple Log Service API to activate Simple Log Service. Then, initiate the request again. For more information, see Activate Log Service.

403

WriteQuotaExceed

Write quota is exceeded.

The error message returned because the number of logs that are written to Simple Log Service exceeds the quota.

Optimize the settings for the request to reduce the number of logs to write. For more information, see Limits.

403

ReadQuotaExceed

Read quota is exceeded.

The error message returned because the number of logs that are read from Simple Log Service exceeds the quota.

Optimize the settings for the request to reduce the number of logs to read. For more information, see Limits.

403

MetaOperationQpsLimitExceeded

Qps limit for the meta operation is exceeded.

The error message returned because the default QPS limit is exceeded.

Optimize the settings for the request to reduce the number of operations. We recommend that you try again after a few seconds.

Simple Log Service limits the QPS for the following management API operations:

  • Project-related API operations

  • Logstore-related API operations

  • Index-related API operations

  • Other API operations that do not read or write data

For more information, see Limits.

403

ProjectForbidden

Project ProjectName has been forbidden.

The error message returned because the specified project is disabled.

Check the project status. The account to which the project belongs may have overdue payments.

404

ProjectNotExist

The Project does not exist : name

The error message returned because the specified project does not exist.

Check the project name and make sure that the project exists.

405

InvalidMethod

Invalid request method : request URI

The error message returned because the HTTP request method is invalid.

Check the HTTP request method and try again.

413

PostBodyTooLarge

Body size bodysize must little than 10485760.

The error message returned because the size of the request body exceeds 10 MB.

Make sure that the size of the request body is less than or equal to 10 MB and try again.

500

InternalServerError

Internal server error message.

The error message returned because an internal server error has occurred.

Try again later.

500

RequestTimeout

The request is timeout. Please try again later.

The error message returned because the request timed out.

Try again later.

503

ServerBusy

The server is busy, please try again later.

The error message returned because the server is busy.

Try again later.

Note

The italic part in an error message indicates specific error objects. For example, name in the ProjectNotExist error message is replaced by a specific project name.