MQTT Connection Problem

Hi,

We are having connection problems on our devices while are trying to connect to our cumulocity MQTT broker. Is there any way to see the reason of connection problems on the UI or is there any topics that we can subscribe to receive connection error reasons?

Second question: Does Cumulocity have any behaviours to block the connection when a device connects again and again in a short period of time. Is it maybe because the device disconnects and connects again and again in short periods for test purposes?

Thanks.

Hello,
there could be many reasons of failing to connect even before it gets to Cumulocity

  1. cannot connect to the network

  2. cannot connect to the internet

  3. cannot connect to Cumulocity

then there are as many reasons to not establish a MQTT session

  1. wrong endpoint

  2. wrong authentication parameters

and many more, so the only way to diagnose this is to find out exactly where in the connection process
your device fails.

In the meantime, there is a “Getting Started” lab at https://mqttlab.iotsim.iot/cumulocity
to try connecting in a couple of minutes. When you are successful there, you can apply
it to your device.

Hope this helps.

Hello Uwe,

Thanks for the answer.

I can connect and publish to a topic in most of the cases. But that issue only happens sometimes. I check the network connection and signal quality of the device hardware. It can connect to the network and open socket but the issue is sometimes connecting as an mqtt client does not work. In this cases I can only try again, it succeeds connecting after couple of trials. I tried changing the client id but the issue is still happening.

Do you think there is a chance that server does not accept MQTT client connection requests maybe because it thinks the device is already connected?

By the way, the link you provided can not be accessible for me. Is there a problem with or me?

Thanks.

It is a common problem for connections over the internet to fail.
Your software on your device should retry connecting.
Your application should detect when a device is not connected when it should be.

That link should have been IoT Simulator: Testing / Proof of concept / Training for the Internet of Things and I tested it this time.

Good luck.