question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Device to hub send_confirmation_callback on error not triggered

See original GitHub issue

Environment

Windows 10 Python 3.6 azure-iothub-device-client==1.4.3

Description of the issue:

We keep a local log of telemetry sent to IoT Hub and would like to flag and capture an error if transmission to IoT Hub fail. There is no sync method for sending data, so we are reliant on the callback, but the send_confirmation_callback is not triggered on failures. How can we capture a message status on transmission?

Code sample exhibiting the issue:

The simple sample can be used to reproduce: https://github.com/Azure/azure-iot-sdk-python/blob/master/device/samples/iothub_client_simple_sample.py

Console log of the issue:

Manually causing a connection error result in the below underlying errors, but the callback is never invoked even when setting a timeout.

IoT: testing connection...
IoT: sending startup message...
Error: Time:Thu Oct 11 14:52:25 2018 File:C:\Release\iot-sdks-internals\release\python\automation\aziotsdk_pytools\src\c\c-utility\adapters\socketio_win32.c Func:socketio_open Line:297 Failure: getaddrinfo failure 11002.
Error: Time:Thu Oct 11 14:52:25 2018 File:C:\Release\iot-sdks-internals\release\python\automation\aziotsdk_pytools\src\c\c-utility\adapters\tlsio_schannel.c Func:tlsio_schannel_open Line:1165 xio_open failed
Error: Time:Thu Oct 11 14:52:25 2018 File:C:\Release\iot-sdks-internals\release\python\automation\aziotsdk_pytools\src\c\umqtt\src\mqtt_client.c Func:mqtt_client_connect Line:1000 Error: io_open failed
Error: Time:Thu Oct 11 14:52:25 2018 File:C:\Release\iot-sdks-internals\release\python\automation\aziotsdk_pytools\src\c\iothub_client\src\iothubtransport_mqtt_common.c Func:SendMqttConnectMsg Line:2122 failure connecting to address <>

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
pierrecacommented, Jan 31, 2019

Thanks a lot! very helpful!

ping @jspaith @jebrando for help on the C side.

1reaction
pierrecacommented, Oct 22, 2018

@jspaith thanks for the follow up! @dllama as soon as the C SDK has a fix we’ll update our dependency and republish packages.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting Azure IoT Hub error codes | Microsoft Learn
The underlying cause of this error is that the number of messages enqueued for the device exceeds the queue limit. The most likely...
Read more >
isuue with iotedge send confirmation callback - Stack Overflow
My issue: The 'result' variable that comes in confirmation callback is equal to zero ("IOTHUB_CLIENT_CONFIRMATION_OK") even if there is no ...
Read more >
No order confirmation or order number received after purchase
We used the email address on your Hub profile and we see that your orders are still being fulfilled by the warehouse. They...
Read more >
Response Status and Error Codes - Infobip
Browse through the list of status and error codes that you might encounter to find out more about their meaning and how to...
Read more >
TWS API v9.72+: Placing Orders
An order can be sent to TWS but not transmitted to the IB server by setting the IBApi.Order.Transmit flag in the order class...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found