You can query IoT Platform logs on the Device Log page of the IoT Platform console. IoT Platform logs contain the records of communication among IoT Platform, devices, and applications. This article describes the error codes in IoT Platform logs and the corresponding troubleshooting methods.

Log types

The following figure shows the log types of upstream messages.

Upstream message logs
  1. When devices send messages to IoT Hub, the corresponding message logs are printed. The topics that are used to send messages are included in the logs.
  2. When data is processed by different business modules in IoT Platform, the logs of the business modules are printed.
  3. If messages are sent to consumers by using the data forwarding or server-side subscription feature, the logs of the corresponding feature are printed. If you use the server-side subscription feature, you can configure an AMQP or Message Service (MNS) client to receive messages.

The following figure shows the log types of downstream messages.

Downstream message logs
  1. When users call API operations to publish messages, the logs of the API operations are printed. The API operation names are included in the logs.
  2. When data is processed by different business modules in IoT Platform, the logs of the business modules are printed.
  3. If messages are sent from IoT Hub to devices, the corresponding message logs are printed. The topics that are used to send messages are included in the logs.

Query IoT Platform logs

  1. Log on to the IoT Platform console.
  2. In the left-side navigation pane, choose Maintenance > Device Log to go to the Cloud run log tab.
  3. Select a product, specify search conditions, and then click Search.

    The following table describes the supported search conditions.

    Notice If you specify a search condition such as DeviceName or keyword that contains one of the following special characters: , '";=()[] @&&>/:\n\t\r, the condition content is split into multiple words. In this case, the query fails. The following error message is returned: The parameter is invalid when you query logs.
    Search condition Description
    DeviceName Enter a device name. You can search for the logs of a device by specifying a device name.
    TraceId Enter a trace ID to search for the logs of series modules.
    Keyword Enter a keyword to search for the logs that contain the keyword.
    MessageID Enter a message ID. A message ID is a unique identifier that is generated by IoT Platform for a message.

    You can search for logs by message ID only in upstream and downstream message analysis.

    State Select a status to search for logs. Valid options:
    • All
    • Successful: The HTTP status code is 200.
    • Failed: The HTTP status code is not 200.
    Time range Select a time range.

Log fields

The following table describes the log fields.

Parameter Description Remarks
Time The time when a log entry is printed. None
TraceId The trace ID. You can use this ID to search for series modules. None
MessageID The message ID. This field is only available in the logs that are generated when IoT Platform sends TSL commands to devices.
DeviceName The name of the device. None
Workload Type (all) By default, logs of all business types are displayed. You can query logs of a specific business type. Valid values:
  • OTA Update
  • Data Parsing
  • TSL: verifies TSL data
  • Remote Configuration
  • Topological Relationship
  • TSL Service Call
  • Device Behavior
  • Device-to-cloud Message
  • Cloud-to-device Message
  • API Call
  • Server-side Subscription
  • Device Shadow
  • Rules Engine
  • Subscription: subscribes to a topic
  • Cancel Subscription: unsubscribes from a topic
  • TSL Message: submits TSL data
  • Others
The first-level business identifier that identifies a business module.
Operation This field includes an operation that is performed, API operation, service method, or message topic. The field value varies based on the following operation types:
  • OTA update
    • OTAFirmwarePush: pushes notifications when a firmware update is initiated, confirmed, and completed
    • OTAFirmwareRequest: queries the information about an OTA update package
    • OTAVersionReport: submits the OTA module version of a device
    • OTAProgressReport: submits the update progress of a device
  • Data parsing
    • RawDataToProtocol: converts raw data to Alink protocol data
    • ProtocolToRawData: converts Alink protocol data to raw data
  • TSL data submission
    • check: checks the TSL
    • For more information about the method parameter in the message body, see What is a TSL model?.
  • Device behavior management
    • online: connects a device to IoT Platform
    • offline: disconnects a device from IoT Platform
The second-level business identifier.
Content The log content may contain the following parameters:
  • TraceId: the trace ID that can be used to search for series modules
  • Message: the error message. Logs of failed operations include this field.
  • Params: the request parameters. Logs of some types include this field.
  • ResultData: the result. If operations generate results, printed logs include this field. Otherwise, printed logs do not include this field.
Note If the data format of a product is set to Custom, logs for TSL data parsing include the hexadecimal values of raw data that is submitted by devices.
State The HTTP status code in the response. The status code 200 indicates that a call was successful. Other status codes indicate that the call failed.

For information about API operation-related error codes, see Error codes. For information about other error codes, see the following section.

None

Device behavior-related error codes

Logs for device behaviors are generated when devices go online or offline.

Error code Definition Cause Troubleshooting
200 The device goes online or offline as expected.
  • Offline: The ends the connection with IoT Platform.
  • Online: The device establishes a connection with IoT Platform.
View the Last Online and Current Status parameters of the device on the Device Details page of the IoT Platform console.
1910 An error occurred due to an MQTT heartbeat timeout while disconnecting the device from IoT Platform. If IoT Platform does not receive a message in a keep-alive interval, the device is disconnected from IoT Platform and must reconnect to the server. Check whether the MQTT heartbeat keep-alive time exceeds the threshold.
1911 The device goes offline because the TCP connection between the device and IoT Platform is ended.
  • If a firewall or network address translation (NAT) gateway on the device side detects an inactive TCP connection, the device ends the TCP connection.
  • The TCP connection is terminated due to the complex network environment of the Internet. If the device is reconnected to IoT Platform and the business is not affected, ignore this error code.
Change the network environment, or check the firewall and gateway settings. For example, you can disable the firewall to troubleshoot the problem.
Note If TCP disconnections frequently occur, you can use TCPDUMP to obtain packet capture files and then submit a ticket.
427 A disconnection error occurred. The device is forced to go offline because the device certificate is used by another device.
IoT Platform identifies a device only based on the device certificate (ProductKey, DeviceName, and DeviceSecret).
  • The same device certificate is burned on multiple devices.
  • The network or power supply of the device is unstable. The device is reconnected to IoT Platform immediately after an abrupt network outage or power failure. In this case, IoT Platform identifies the reconnected device as a new device. Even if the error message is returned, the device can work properly.
Check whether the device certificate is reused on the Device Details page of the IoT Platform console.
521 The device has been deleted. The device has been deleted from IoT Platform. On the Device List tab of the Devices page, search for the required device to check whether the device has been deleted.
522 The device has been disabled. The device has been disabled in IoT Platform. In the IoT Platform console, check whether the device is in the Disabled state.
6401 The topological relationship does not exist. The topological relationship does not exist when the system verifies the topological relationship. Log on to the IoT Platform console and choose Devices > Devices. On the page that appears, search for the device and view the device information.

Message-related error codes

Message-related logs are generated in the following business scenarios:

  • Devices send messages to IoT Platform.
  • IoT Platform sends messages to devices.
  • The rules engine forwards messages when the server-side subscription or data forwarding feature is used.
Error code Definition Cause Troubleshooting
1901 The message fails to be sent due to poor network conditions, such as the congestion of the TCP write buffer. The data channel between the device and the server is blocked. The probable cause is that the network transmission speed is slow, or the device cannot process this number of messages. Check network conditions and device message consumption capabilities.
1902 When the message is transmitted over the network, an exception occurs. The sending failure is caused by a network exception. Check network conditions.
1903 The format of the topic is invalid. The format of the message topic is invalid. Check the topic format.
1904 IoT Platform receives an invalid RRPC response. The RRPC response received by IoT Platform does not have the corresponding RRPC request. This error may occur if the request times out. Check the RRPC response from the device to determine whether the RRPC request has timed out.
1905 IoT Platform does not receive an RRPC response before the timeout period. After IoT Platform sends an RRPC request to the device, IoT Platform does not receive an RRPC response from the device before the timeout period. Check whether a response is sent to the RRPC request that is received by the device.
1950 When the message is transmitted over the network, a network connection error occurs. The sending failure is caused by a network exception. Check the network status.
1951 The response type is unknown. The device sends a message of an unknown type to IoT Platform. Check the type of the message that is sent by the device. If you are using the Alibaba Cloud device SDK, contact technical support or submit a ticket.
6831 The specified topic or request method does not conform to the Alink protocol. The topic to which the device submits data or the method parameter in the parsed data does not conform to the Alink protocol. Check whether the topic to which the device submits data conforms to the Alink protocol. Check whether the method parameter in the parsed data conforms to the Alink protocol.
9200 The device is inactive. The device is not activated on IoT Platform. After a new device is registered, the device is activated only after it is connected to IoT Platform and submits data to IoT Platform. Check the status of the device in the IoT Platform console.
9201 The device is disconnected. The device is disconnected from IoT Platform. Check the status of the device in the IoT Platform console.
9236 The topic fails to be authenticated. The permission that is specified for the topic is invalid. Go to the Topic List tab of the IoT Platform console. Check whether the permissions that are specified for topics are valid. The Publish permission must be specified for the topics that are used to publish messages. The Subscribe permission must be specified for the topics that are used to receive messages.
9324 A throttling error occurs. The requests from the device or the tenant exceed the limit. Reduce the frequency of message sending, or contact technical support.
9321 The parameters are invalid. The input request parameters are invalid. Check the parameters as prompted.
9320 The payload is invalid. The format of the payload sent by the device is invalid. Check whether the format of the payload is valid.
9331 An internal error occurs on the destination cloud service. An internal error occurs on the cloud service to which the message is sent. Check the error code in the log entry, and go to the official website of the corresponding cloud service to view the cause and solution. You can also contact technical support.
9332 The cloud service configuration is invalid. The specified data forwarding destination is invalid. Therefore, an error occurs when IoT Platform connects to the destination cloud service. View the data forwarding rule to check whether the configuration of the destination cloud service is valid and whether the resource exists. Check the error code in the log entry, and go to the official website of the corresponding cloud service to view the cause and solution.
9333 The permission to access the cloud service is invalid. The permission that is granted on IoT Platform to access the destination cloud service is invalid. Check your Alibaba Cloud RAM policy.
9399 An unknown internal server error occurs. IoT Platform has an internal error. Contact technical support or submit a ticket.
9600 The number of connections in a consumer group exceeds the limit. IoT Platform cannot process this number of connections. For more information, see Limits for data forwarding. Remove extra connections.
9601 The heartbeat value is invalid. The heartbeat value does not meet the requirement. For more information, see. Specify a valid heartbeat value.
9602 IoT Platform ends the connection. This error may occur in the scenarios of load balancing and IoT Platform iteration. The device must be reconnected to IoT Platform. Submit a ticket.
9650 The ACK message times out. The ACK message from the receiver times out, which indicates that no response is sent from the receiver. Check the message processing logic of the receiver.
9651 The receiver returns ACK released. The receiver returns ACK released, which indicates that the received message is deleted.
9652 The receiver returns NACK. The receiver returns NACK, which indicates that the message is not received.

TSL-related error codes

TSL-related logs are generated in the following business scenarios:

  • Submit TSL data
  • Call TSL services

If the data format of a product is set to Custom, TSL-related logs include the hexadecimal values of raw data that is submitted by devices.

The following table lists error codes that may be generated when IoT Platform calls services and configures properties.

When IoT Platform calls a service, it checks whether the input parameters of the service follow the syntax defined in the TSL.

Error code Definition Cause Troubleshooting
9201 The device is disconnected. The device is disconnected from IoT Platform. Check the device status in the IoT Platform console.
9200 The device is inactive. The device is not activated in IoT Platform. A newly registered device must submit data to IoT Platform before the device can be activated. Check the device status in the IoT Platform console.
6208 The device has been disabled. After a device is disabled, IoT Platform cannot configure properties or call services of the device. Check the device status in the IoT Platform console. If the device is disabled, enable the device and then try again.
6300 The method parameter is not found when IoT Platform verifies the input parameters based on the TSL. The method parameter that is required by the Alink protocol does not exist in the standard Alink data or the parsed custom data submitted by the device. Check the submitted data by viewing the IoT Platform logs that are generated when property data is submitted. You can also check the submitted data by viewing the on-premises device logs.
6206 An error occurs when you query the service. When IoT Platform calls a service, the information of the service is queried. This error occurs if the service is not found. Go to the Product Details page of the IoT Platform console. On the Define Feature tab, check whether the service is defined in the TSL. If the service is defined, check whether the input parameters of the service contain invisible characters.
6200 The script does not exist. If the data format of a product is set to Custom, the script is used to parse data when IoT Platform calls the service of a device. This error occurs if you do not define a data parsing script. Go to the Product Details page of the IoT Platform console. Check whether the data parsing script exists. If the data parsing script exists, resubmit the script and then try again.
6201 The parsing result is empty. The data parsing script runs properly, but returns an empty result. For example, the rawDataToProtocol() method returns null, and the protocolToRawData() method returns null or an empty array. Check the script to identify the cause.
6207 The data format is invalid.

This error may occur when IoT Platform calls services in a synchronous manner or when the device submits data.

When IoT Platform calls services in a synchronous manner, this error may occur due to one of the following causes:

  • The format of the data returned by the device is invalid.
  • The format of parsed custom data is invalid.
  • The data format of the input parameters is invalid.
For information about the valid data format required by the service, see API documentation and the TSL definitions. For information about the data format required by the Alink protocol, see Alink protocol.
System error codes
5159 An error occurs when IoT Platform retrieves the TSL property data. A system exception occurs. Submit a ticket.
5160 An error occurs when IoT Platform retrieves the TSL event data.
5161 An error occurs when IoT Platform retrieves the TSL service data.
6661 An error occurs when IoT Platform queries the tenant information.
6205 An error occurs when IoT Platform calls the service.

The following table lists the error codes that are generated when devices fail to submit property and event data.

When a device submits property or event data, IoT Platform verifies the property data and the input parameters of the event based on the TSL.

Error code Definition Cause Troubleshooting
6106 The number of properties submitted by the device exceeds the limit. A device can submit a maximum of 200 properties at a time. Check the number of properties by viewing the IoT Platform logs that are generated when property data is submitted. You can also check the submitted data by viewing the on-premises device logs.
6300 The method parameter is not found when IoT Platform verifies the input parameters based on the TSL. The method parameter that is required by the Alink protocol does not exist in the standard Alink data or the parsed custom data submitted by the device. Check the submitted data by viewing the IoT Platform logs that are generated when property data is submitted. You can also view the log entry on the device to check the reported data.
6320 The property information is not found when IoT Platform verifies the input parameters based on the TSL. The specified property is not found when IoT Platform queries the TSL data of the device. Go to the Product Details page of the IoT Platform console. On the Define Feature tab, check whether the specified property is defined in the TSL. If the property is not defined, define the property.
6450 The method parameter does not exist in the Alink JSON formatted data. The method parameter does not exist in the standard Alink data or the parsed custom data submitted by the device. View the IoT Platform logs that are generated when property data is submitted, and check whether the data includes the method parameter. You can also view the on-premises device logs.
6207 The data format is invalid.

This error may occur when IoT Platform calls the service synchronously or when the device submits data.

When the device submits data, this error may occur due to the following cause: The Alink data submitted by the device or the data parsed by using the script is not in the JSON format.

For information about the data format required by the Alink protocol, see Alink protocol. You must use the required data format to submit data.
System error code
6452 A throttling error occurs. Traffic throttling is triggered because excessive requests are submitted. Submit a ticket.
6760 The storage quota of the tenant is exceeded. A system exception occurs. Submit a ticket.

The following table lists the error codes that are generated when devices fail to process the downstream requests to call services or configure properties.

Error code Definition Cause Troubleshooting
Common error codes
460 One or more parameters are invalid. The request parameters are invalid. Submit a ticket.
500 An internal system error occurs. An unknown error occurs in IoT Platform. Submit a ticket.
400 A service request error occurs. An unknown error occurs when IoT Platform calls the service. Submit a ticket.
429 Excessive requests are submitted in a specified period of time. Traffic throttling is triggered because excessive requests are submitted in a specified period of time. Submit a ticket.
System error code
6452 A throttling error occurs. Traffic throttling is triggered because excessive requests are submitted. Submit a ticket.

The following table lists the common TSL-related error codes.

During service calling, property data submission, and event data submission, IoT Platform verifies the input parameters of the service, the property data, and the input parameters of the event based on the TSL.

Error code Definition Cause Troubleshooting
6321 The identifier of the property does not exist in the TSL. A system exception occurs. Submit a ticket.
6317 The TSL is invalid. A system exception occurs. Submit a ticket.
6332 The input parameter does not follow the TSL standard. The input parameters must follow the defined TSL standard. Go to the Product Details page of the IoT Platform console. View the TSL on the Define Feature tab. Check the input parameters.
6302 The parameter does not exist. When IoT Platform verifies the input parameters of the service, the required parameters are not found in the request. Go to the Product Details page of the IoT Platform console. View the TSL on the Define Feature tab. Check the input parameters of the service in the TSL and make sure that all required parameters are specified.
6306 The input parameter does not match the integer data type that is defined in the TSL. When IoT Platform verifies a parameter based on the TSL, the following errors may occur:
  • The data type of the parameter is different from the data type that is defined in the TSL.
  • The parameter value is not in the defined range.
Go to the Product Details page of the IoT Platform console. On the Define Feature tab, view the TSL and make sure that the data type of the input parameter is the same as the data type that is defined in the TSL.
6307 The input parameter does not match the 32-bit float data type that is defined in the TSL. When IoT Platform verifies a parameter based on the TSL, the following errors may occur:
  • The data type of the parameter is different from the data type that is defined in the TSL.
  • The parameter value is not in the defined range.
Go to the Product Details page of the IoT Platform console. On the Define Feature tab, view the TSL. Make sure that the data type of the input parameter is the same as the defined data type and the parameter value is in the defined value range.
6322 The input parameter does not match the 64-bit float data type that is defined in the TSL. When IoT Platform verifies a parameter based on the TSL, the following errors may occur:
  • The data type of the parameter is different from the data type that is defined in the TSL.
  • The parameter value is not in the defined range.
Go to the Product Details page of the IoT Platform console. On the Define Feature tab, view the TSL. Make sure that the data type of the input parameter is the same as the defined data type and the parameter value is in the defined value range.
6308 The input parameter does not match the Boolean data type that is defined in the TSL. When IoT Platform verifies a parameter based on the TSL, the following errors may occur:
  • The data type of the parameter is different from the data type that is defined in the TSL.
  • The parameter value is not in the defined range.
Go to the Product Details page of the IoT Platform console. On the Define Feature tab, view the TSL. Make sure that the data type of the input parameter is the same as the defined data type.
6309 The input parameter does not match the enum data type that is defined in the TSL. The data type of the parameter is different from the data type that is defined in the TSL. Go to the Product Details page of the IoT Platform console. On the Define Feature tab, view the TSL. Make sure that the data type of the input parameter is the same as the defined data type.
6310 The input parameter does not match the text data type that is defined in the TSL. When IoT Platform verifies a parameter based on the TSL, the following errors may occur:
  • The data type of the parameter is different from the data type that is defined in the TSL.
  • The length of the parameter exceeds the limit defined in the TSL.
Go to the Product Details page of the IoT Platform console, and view the TSL model. Make sure that the data type of the input parameter is the same as the data type that is defined in the TSL model and that the parameter length does not exceed the upper limit.
6311 The input parameter does not match the date data type that is defined in the TSL. When the system verifies a parameter based on the TSL, the following errors may occur:
  • The data type of the parameter is different from the data type that is defined in the TSL.
  • The input data is not a UTC timestamp.
Go to the Product Details page of the IoT Platform console, and view the TSL model. Make sure that the data type of the input parameter is the same as the data type that is defined in the TSL model and that the input data is a UTC timestamp.
6312 The input parameter does not match the struct data type that is defined in the TSL. When the system verifies a parameter based on the TSL, the following errors may occur:
  • The data type of the parameter is different from the data type that is defined in the TSL.
  • The number of the parameters contained in a structure is different from the number defined in the TSL.
Go to the Product Details page of the IoT Platform console. On the Define Feature tab, view the TSL. Make sure that the data type of the input parameter is the same as the defined data type.
6304 The input parameter does not exist in the TSL structure. The input parameter is not found in the structure when IoT Platform verifies the parameter based on the TSL. Go to the corresponding Product Details page of the IoT Platform console, and view the TSL model. Check the input parameters for inconsistencies based on the TSL model.
6324 The input parameter does not match the array data type that is defined in the TSL. When IoT Platform verifies a parameter based on the TSL, the following errors may occur:
  • The elements in the array do not follow the array syntax defined in the TSL.
  • The number of elements in the array exceeds the maximum number defined in the TSL.
  • Go to the Product Details page of the IoT Platform console. On the Define Feature tab, view the TSL and check the array syntax defined in the TSL.
  • View the upstream message logs to check the number of array elements in the data submitted by the device.
6328 The input parameter is not an array. The input parameter is not an array when IoT Platform verifies the parameter based on the TSL. Go to the Product Details page of the IoT Platform console. On the Define Feature tab, view the TSL and check the service parameter of the array data type. Make sure that the data type of the input parameter is array.
6325 The data type of elements in the array is not supported by IoT Platform. The data type of the element in the array is not supported when IoT Platform verifies the parameter based on the TSL. Only the following data types of elements are supported: int32, float, double, text, and struct. Make sure that the data type of the element is supported by IoT Platform.
System error code
6318 A system exception occurs when IoT Platform parses the TSL. A system exception occurs. Submit a ticket.
6329 An error occurs when IoT Platform parses the array data in the TSL.
6323 The data format of the parameter in the TSL is invalid.
6316 An error occurs when IoT Platform parses the parameter in the TSL.
6314 The data type of the parameter in the TSL is not supported.
6301 An error occurs when IoT Platform verifies the data format of the input parameters based on the TSL.
Error codes about data parsing scripts
26010 Traffic throttling is triggered because excessive requests are submitted. The maximum number of requests in a specified period has been reached. Submit a ticket.
26001 The content of the script is empty. The script content is empty when IoT Platform runs the script. Go to the Product Details page of the IoT Platform console, and check whether the data parsing script exists. If the script exists, check whether the script is saved. The script cannot be a draft.
26002 An exception occurs when IoT Platform runs the script. The script runs properly, but the script content is invalid. For example, the script contains syntax errors. Log on to the IoT Platform console, use the same parameters to run the script for debugging, and then modify the script. The console provides a basic script running environment, but does not verify the script. We recommend that you check the script on premises before you submit it.
26006 The required method does not exist in the script. The script runs properly, but the script content is invalid. The script must contain the protocolToRawData() and rawDataToProtocol() methods. This error occurs if these two methods do not exist. Go to the Product Details page of the IoT Platform console, and check whether the protocolToRawData() and rawDataToProtocol() methods exist.
26007 The returned data format is invalid after data parsing. The script runs properly, but the format of the returned data is invalid. The script must contain the protocolToRawData() and rawDataToProtocol() methods. The protocolToRawData() method returns a byte[] array, and the rawDataToProtocol() method returns a JSON object. This error occurs if the returned data is not in the required format. For example, after a device submits data, IoT Platform sends a response to the device. The returned data must also be parsed. Otherwise, the format of the returned data may be invalid. Check the script in the IoT Platform console. Enter the input parameters, run the script on premises, and check whether the data format of the returned result is valid.

Subscription-related error codes

Error code Definition Cause Troubleshooting
9200 The device is inactive. The device is not activated on IoT Platform. After a new device is registered, the device is activated only after it is connected to IoT Platform and submits data to IoT Platform. Check the status of the device in the IoT Platform console.
500 An internal system error occurs. An unknown error occurs in IoT Platform. Submit a ticket.
403 The request is forbidden. Your account has overdue payments or the topic fails to be authenticated. Submit a ticket.