3

I have an IoTEdge module which runs a deep learning model on a Raspberry Pi 3 and runs well but then somehow returns this error:

Error: Time:Mon Jan 28 22:45:21 2019 File:/usr/sdk/src/c/iothub_client/src/iothubtransport_mqtt_common.c Func:InitializeConnection Line:2230 mqtt_client timed out waiting for CONNACK

Is this a network connection issue? It seems afterwards, this error disappears. Not sure why this is the case. I thought there might be a communication error between this IoTEdge module and the IoTHub, so I even restarted the IoTEdge module and rebooted the Raspberry Pi device.

How can this be resolved? Does it have to deal with a time.sleep(1) code in Python?

Alvin Chin
  • 51
  • 3
  • Sometimes restarting the IoTEdge module solves this problem, but not always. – Alvin Chin Jan 28 '19 at 23:23
  • I do see a lot of these messages as well in my setup. ```Error: Time:Tue Jan 29 04:42:41 2019 File:/usr/sdk/src/c/iothub_client/src/iothubtransport_mqtt_common.c Func:InitializeConnection Line:2230 mqtt_client timed out waiting for CONNACK Error: Time:Tue Jan 29 04:42:41 2019 File:/usr/sdk/src/c/iothub_client/src/iothubtransport_mqtt_common.c Func:InitializeConnection Line:2230 mqtt_client timed out waiting for CONNACK``` can anyone from Azure IOT team respond? I run `iotedge: 1.0.5-1` with `mcr.microsoft.com/azureiotedge-hub:1.0 ` – Rag Jan 29 '19 at 05:04
  • So I found out I was using azure-iothub-device-client version 1.4.3 and decided to use the latest one which is 1.4.6. However, I still get these mqtt_client timed out waiting for CONNACK errors. – Alvin Chin Jan 29 '19 at 22:52
  • Which version of IoT Edge are you running? Did you follow the advice here and set the OptimizeForPerformance env var to false? https://learn.microsoft.com/en-us/azure/iot-edge/how-to-install-iot-edge-linux-arm#tips-and-suggestions – silent Jan 31 '19 at 19:15
  • I do have the OptimizeForPerformance env var set to false for the edgeHub in the deployment.template.json. Do I need to uninstall the IoTEdge and then redeploy the modules from Visual Studio Code? I am running iotedge version 1.4.3. – Alvin Chin Jan 31 '19 at 23:12
  • Should I uninstall the IoTEdge from my device and then reinstall with the latest version and then deploy the modules? – Alvin Chin Feb 01 '19 at 16:47
  • @Rag were you able to solve this, I am still having the mqtt_client time out waiting for CONNACK errors continuing. – Alvin Chin Feb 01 '19 at 17:17
  • Hi, I run 1.0.5-1 in my env. I have not encountered the error again and I have not taken any actions since then. you may raise the issue here, https://github.com/Azure/iotedge/issues – Rag Feb 02 '19 at 04:07
  • @Rag what environment are you running? Because I tried upgrading to 1.0.5-1 on my Raspberry Pi 3 using Raspbian and it said I had the latest one. – Alvin Chin Feb 05 '19 at 18:14
  • I am still having the same problem with this: Error: Time:Tue Feb 5 18:40:33 2019 File:/usr/sdk/src/c/iothub_client/src/iothubtransport_mqtt_common.c Func:InitializeConnection Line:2230 mqtt_client timed out waiting for CONNACK – Alvin Chin Feb 05 '19 at 19:14
  • @AlvinChin can you upgrade to version 1.0.6 and see if the issue is solved? See related: https://github.com/Azure/iotedge/issues/570 – asergaz Mar 13 '19 at 17:10
  • @AlvinChin are you still blocked? If not can you post the answer to this thread? Thanks! – asergaz Apr 12 '19 at 15:06

1 Answers1

0

You are using the original version of the Azure IoT Python SDK. This is a wrapper around the C SDK and the message you are encountering is a known bug in the C SDK. This has been fixed in the C SDK but was never propagated into the Python v1 reposiotry.

I suggest that you rebuild your Edge module using the new Python v2 SDK (https://github.com/Azure/azure-iot-sdk-python). By default, this is the version now used by the Visual Studio Cloud Azure Edge extension.

Mark Radbourne
  • 528
  • 3
  • 12