You can query IoT Platform logs on the Device Log page of the IoT Platform console. This topic 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 submit messages to IoT Hub, the device-to-cloud 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 clients by using the rules engine or service subscription (AMQP and MNS), logs for the rule engine and service subscription are printed.

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 call are printed. The API 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 cloud-to-device 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 lists the supported search conditions.

    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 tracing ID to search for the logs of series modules.
    Keywords Enter a keyword to search for the logs that contain the keyword. You can use the value of the ProductKey, DeviceName, Code, Operation, or TraceId parameter as a keyword.
    MessageID Enter a message ID. A message ID is a unique identifier generated by IoT Platform for a message.

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

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

Log fields

The following table describes the log fields.

Parameter Description Remarks
Date The time when a log entry is printed. N/A
TraceId The tracing ID. You can use this ID to search for series modules. N/A
MessageID The message ID. This field is only available in logs that are generated when IoT Platform sends TSL commands to devices.
DeviceName The name of the device. N/A
BusinessType By default, logs of all business types are displayed. You can query logs of a specific business type.
  • Firmware update
  • Data parsing
  • TSL report
  • Data storage
  • Remote configuration
  • Topological relationship
  • TSL service call
  • Device behavior
  • Device-to-cloud message
  • Cloud-to-device message
  • API call
  • Service subscription
  • Device shadow
  • Rules engine
  • 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:
  • Firmware update:
    • OTAFirmwarePush: pushes notifications when a firmware update is initiated, confirmed, and completed.
    • OTAVersionReport: submits the firmware 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 Overview.
  • 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 tracing 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 certain 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 submitted by devices.
Status The 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.

N/A

Device behavior-related error codes

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

Error code Description Cause Troubleshooting
400 A request error occurs. This error may occur due to one of the following causes:
  • The device is disconnected because another device uses the same device certificate to connect to IoT Platform.

    IoT Platform identifies a device only based on the device certificate information (productKey, deviceName, and deviceSecret).

    The same device certificate may be used by different devices in the following scenarios:

    • 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.
  • The device has been deleted from IoT Platform.
  • The device has been disabled in IoT Platform.
  • Log on to the IoT Platform console. On the Device Details page, view the time when the device was activated in the Activated At field. Check whether different devices use the same device certificate to connect to IoT Platform.
  • On the Device List tab of the Devices page, search for the required device to check whether the device has been deleted.
  • In the IoT Platform console, check whether the device is in the Disabled state.

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.
Error code Description 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 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.
9200 The device is inactive. The device is not activated in 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 troubleshoot the error. 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 troubleshoot the error.
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.

TSL-related error codes

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

  • Call TSL data.
  • Submit TSL data.

If the data format of a product is set to Custom, TSL-related logs include the hexadecimal values of raw data 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 Description 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, you 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 the system 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 data formats required by service calls, see API reference and TSL-related topics.. 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, the system verifies the property data and the input parameters of the event based on the related definitions in the TSL.

Error code Description 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 the system 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.
6320 The property information is not found when the system verifies the input parameters based on the TSL. The specified property is not found when the system 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 respond to the service call and property configuration requests from IoT Platform.

Error code Description Cause Troubleshooting
Common error codes
460 The parameters are invalid. The request parameters are invalid. Submit a ticket.
500 An internal system error occurs. An unknown error occurs in the system. 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 short period of time. Traffic throttling is triggered because excessive requests are submitted in a short 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 error codes of TSLs.

During a service call, property data submission, and event data submission, the system verifies the input parameters of the service call, the property data, and the input parameters of the event based on the related definitions in the TSL.

Error code Description 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.
6302 The parameters does not exist. When the system 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 ensure that you have specified all required parameters.
6306 The input parameter does not meet the integer data type 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 defined in the TSL.
  • The parameter value is not in the range defined in the TSL.
Go to the Product Details page of the IoT Platform console. On the Define Feature tab, view the TSL and ensure that the data type of the input parameter is the same as the data type defined in the TSL.
6307 The input parameter does not meet the 32-bit float data type 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 defined in the TSL.
  • The parameter value is not in the range defined in the TSL.
Go to the Product Details page of the IoT Platform console. On the Define Feature tab, view the TSL and ensure that the data type of the input parameter is the same as the data type defined in the TSL and that the parameter value is in the value range defined in the TSL.
6322 The input parameter does not meet the 64-bit float data type 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 defined in the TSL.
  • The parameter value is not in the range defined in the TSL.
Go to the Product Details page of the IoT Platform console. On the Define Feature tab, view the TSL and ensure that the data type of the input parameter is the same as the data type defined in the TSL and that the parameter value is in the value range defined in the TSL.
6308 The input parameter does not meet the Boolean data type 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 defined in the TSL.
  • The parameter value is not in the range defined in the TSL.
Go to the Product Details page of the IoT Platform console. On the Define Feature tab, view the TSL and ensure that the data type of the input parameter is the same as the data type defined in the TSL.
6309 The input parameter does not meet the enum data type defined in the TSL. The data type of the parameter is different from the data type defined in the TSL. Go to the Product Details page of the IoT Platform console. On the Define Feature tab, view the TSL and ensure that the data type of the input parameter is the same as the data type defined in the TSL.
6310 The input parameter does not meet the text data type 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 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. On the Define Feature tab, view the TSL and ensure that the data type of the input parameter is the same as the data type defined in the TSL.
6311 The input parameter does not meet the date data type 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 defined in the TSL.
  • The input data is not a UTC timestamp.
Go to the Product Details page of the IoT Platform console. On the Define Feature tab, view the TSL and ensure that the data type of the input parameter is the same as the data type defined in the TSL.
6312 The input parameter does not meet the struct data type 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 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 and ensure that the data type of the input parameter is the same as the data type defined in the TSL.
6304 The input parameter does not exist in the TSL structure. The input parameter is not found in the structure when the system 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 ensure that the data type of the input parameter is the same as the data type defined in the TSL.
6,324 The input parameter does not meet the array data type defined in the TSL. When the system 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 the system 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. Ensure 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 the system verifies the parameter based on the TSL. Only the following data types of elements are supported: int32, float, double, text, and struct. Ensure that the data type of the element is supported by IoT Platform.
System error codes
6318 A system exception occurs when the system parses the TSL. A system exception occurs. Submit a ticket.
6329 An error occurs when the system parses the array data in the TSL.
6323 The data format of the parameter in the TSL is invalid.
6316 An error occurs when the system parses the parameter in the TSL.
6314 The data type of the parameter in the TSL is not supported.
6301 An error occurs when the system verifies the data format of the input parameters based on the TSL.
Data parsing script-related error codes
26010 Traffic throttling is triggered because excessive requests are submitted. Excessive requests are submitted in a short period of time. Submit a ticket.
26001 The content of the script is empty. The script content is empty when the system runs the script. Go to the Product Details page of the IoT Platform console, and check whether your 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 the system 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 modify the script. The console provides a basic script running environment, but does not verify the script. We recommend that you check the script 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 data format of the returned result 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 result is not in the required data format. For example, after a device submits data, a result is returned to the device. The returned result must also be parsed. Otherwise, the data format of the returned result 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.