-
Notifications
You must be signed in to change notification settings - Fork 735
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to connect with Azure (mqtt_client timed out waiting for CONNACK) #931
Comments
Hello... Connection Status result:IOTHUB_CLIENT_CONNECTION_UNAUTHENTICATED, Connection Status reason: IOTHUB_CLIENT_CONNECTION_NO_NETWORK that Seems issue with the trust certificate and authentication, However i have added mbedtls and Trust certificate as well
here is the logs for the same
|
any update from this thread? I suffer this problem as well, I ran the example of \azure-iot-sdk-c\iothub_client\samples\iothub_ll_client_x509_sample on nrf52840+cellular, but it's failed to connect to Azure IoT Hub with the x.509 certificate, the following is the snippet log from the program, is there anyone help to solve this issue, thank you. [EasyConnect] IP address 10.171.36.192
|
Hi @NOA-Vernon and @MahendraSondagar, thanks for filing this issue and thanks for being patient while we get to investigating it. I'll take a look and see what might be the root cause here. |
@MahendraSondagar it's not clear based on the logs you attached what's going on. The snippet you included isn't giving us enough information to pinpoint an issue. Could you reproduce the same error and send us the full log output? |
@YoDaMa thank you so much for your reply, I open the mbedtls debug output(level 4) and please have a look the following log
from the log above, it seems that the x.509 certificate verified failed(MBEDTLS_ERR_X509_CERT_VERIFY_FAILED ). However, the x.509 certificate and connection string can be able to work correctly as I successfully ran it on the Ubuntu example(\azure-iot-sdk-c\iothub_client\samples\iothub_ll_client_x509_sample ). Do you have any idea on this issue? thank you very much. |
@YoDaMa Is there any update?
|
Hi @NOA-Vernon, thanks for being patient with this. We've got some other bugs we are investigating and are trying to get to debugging your issue ASAP. From a cursory look of the last log you sent, it might be that you're not setting the trusted cert. Can you try adding the code
to get certificates you can either include certs.h in your build process via cmake or just go to certs.h in the repo and copy/paste the certificates into your code. (certs.h and certs.c are in the top level certs folder of this repo) |
@YoDaMa , thank you so much for your reply, I have set the OPTION_TRUSTED_CERT (the certificates in the certs.c is worked on the ubuntu I promised)as well for testing, but the result is the same, now I have no ideas what's wrong with that, can you help me solved this issue? |
I would double check that the X509 CERT that you are setting is exactly correct then. Based on your error in the TLS logs, If the usual suspects are not the problem here, I'll file this as a bug to be investigated further by the team. |
@YoDaMa thanks a lot for being patient with this, I set the OPTION_TRUSTED_CERT and re-run the program, it still connects to azure iot hub failed but the error log of this time is different, However, I update all the sources file of azure-iot-sdk-c in the project, then it connects to azure iot hub successfully, see the following log: [EasyConnect] IP address 10.171.36.192 Creating IoTHub handle
Thank you so much |
thank you very much for trying the suggestion from @YoDaMa . Thank you for using the Azure IoT SDK. |
@MahendraSondagar, @NOA-Vernon, @YoDaMa, @ewertons, thank you for your contribution to our open-sourced project! Please help us improve by filling out this 2-minute customer satisfaction survey |
STM32F429Zi Embedded hardware with ethernet
FreeRTOS mbedTLS
SDK Version (1.2.14)
Release 2019-01-31
Protocol
MQTT
Describe the Bug
Hello there....
I was using Azure SDK version with STM32F429Zi Nucleo board since 1-2 month having SDK version 1.2.10. then after suddenly from past 2-3 days I'm getting the error "mqtt_client timed out waiting for CONNACK" in iothubtransport_mqtt_commom.c and that's why i'd decided to update the SDK and I'd moved on 1.2.14
After updating the sdk I'm getting same error and board is unable to connect with Azure!!!
I have all default config.
Console Logs
Here is the logs of my setup
error ............\Middlewares\Third_Parties\Azure-IoT-SDK-C\iothub_client\src\iothubtransport_mqtt_common.c: line 2195
error ............\Middlewares\Third_Parties\Azure-IoT-SDK-C\c-utility\src\optionhandler.c: line 238
error ............\Middlewares\Third_Parties\Azure-IoT-SDK-C\c-utility\src\xio.c: line 187
error ............\Middlewares\Third_Parties\Azure-IoT-SDK-C\c-utility\src\optionhandler.c: line 238
error ............\Middlewares\Third_Parties\Azure-IoT-SDK-C\iothub_client\src\iothubtransport_mqtt_common.c: line 1940
Can any one advise me here
Thanks
The text was updated successfully, but these errors were encountered: