How to troubleshoot device connection problem

Take a DCCS Key of DataHub as an example to illustrate the troubleshooting process of MQTT connection abnormality.

Problem description

If you find that the data cannot be uploaded to RabbitMQ. You can use MQTT Tools such as Paho or MQTTBox to test the MQTT connection information.

MQTT connection credential

You can refer to this document for retrieving connection credential through DCCS API. Retrieve a Credential of Connection Through API

MQTT Port: 1883
username: eaa7d8b1-f785-4c05-9857-9f7f7c1078f3:cab56b42-0616-4373-819a-5bc9ff7edff8
password: dyGekuVaeMbfluGJ6hXts46WI

Investigation process

  1. First check the RabbitMQ service connection
telnet 1883
  1. Use MQTT.fx to check MQTT connection
  1. Subscription and publishing troubleshooting
    -Enter the subscription topic at will, such as: /home/garden/fountain, and click “Subscribe”, then the connection is disconnected, check the log

    The preliminary judgment is that there is a topic whitelist in RabbitMQ. The method of querying the whitelist is as follows:
  • Method 1: RabbitMQ admin permission is required
    Log in to RabbitMQ management portal, filter by username in the Admin tab, and find that this account has a topic whitelist.

Subscribe and publish via topic whitelist

-Replace “.” with “/” and “*” with “#” in the whitelist, as follows: