0

I'm currently using programs based on the Azure-IoT-Hub-C-SDK MQTT examples as well as the samples itself. On my Ubuntu machine, after starting the program, I get a repeating connection error:

./iotsdk_linux/serializer/samples/devicetwin_simplesample/devicetwin_simplesample Info: IoT Hub SDK for C, version 1.1.21
Error: Time:Fri Aug 18 19:39:22 2017 File:/home/user/workspaceMisc/azure-iot-sdk-c/c-utility/adapters/socketio_berkeley.c Func:socketio_open Line:676 Failure: select failure.
Info: Closing tlsio from a state other than TLSIO_STATE_EXT_OPEN or TLSIO_STATE_EXT_ERROR
Error: Time:Fri Aug 18 19:39:22 2017 File:/home/user/workspaceMisc/azure-iot-sdk-c/c-utility/src/tlsio_openssl.c Func:on_underlying_io_open_complete Line:688 Invalid tlsio_state. Expected state is TLSIO_STATE_OPENING_UNDERLYING_IO.
Error: Time:Fri Aug 18 19:39:22 2017 File:/home/user/workspaceMisc/azure-iot-sdk-c/c-utility/src/tlsio_openssl.c Func:tlsio_openssl_open Line:1202 Failed opening the underlying I/O.
Error: Time:Fri Aug 18 19:39:22 2017 File:/home/user/workspaceMisc/azure-iot-sdk-c/umqtt/src/mqtt_client.c Func:mqtt_client_connect Line:974 Error: io_open failed
Error: Time:Fri Aug 18 19:39:22 2017 File:/home/user/workspaceMisc/azure-iot-sdk-c/iothub_client/src/iothubtransport_mqtt_common.c Func:SendMqttConnectMsg Line:1519 failure connecting to address XXXX.azure-devices.net.
Reported state will be send to IoTHub
press ENTER to end the sample

This happens with both the simplesample_mqtt and the devicetwin_simplesample. Sometimes the errors don't stop and I have no chance trying the program. I only changed the connection strings in the samples. The AMQP example (simplesample_amqp) does not show any connection errors and works fine even after starting it several times. On my Yocto board, I also see a few connection errors at every start of a custom MQTT application built on the SDK samples.

Does anyone know a possible cause? I don't know whether it's caused by SDK, IoT hub or my local setup (Ubuntu, Yocto?). I get this error even with a cellular connection and sometimes is also reappears after running fine for a certain time.

Please, if you think I should post more information, request that. Right now I just don't know where to start.

UPDATE: Right now, nothing is working anymore, I only get errors, the applications don't connect anymore. See the issue on github here: https://github.com/Azure/azure-iot-sdk-c/issues/214

StrawHat
  • 175
  • 1
  • 12
  • I test on Ubuntu 16.04 with azure-iot-sdk-c compiled with CMake, both the simplesample_mqtt and the devicetwin_simplesample work with no errors. – Rita Han Aug 21 '17 at 05:57
  • Yes, today I tried it again with the current version, this morning it was working again flawlessly, right now I get errors already but just at the beginning of the application's runtime so far. – StrawHat Aug 21 '17 at 14:14

0 Answers0