[esp-idf v5.1.2 ] HTTP errors during Azure Connection

Suresh
Posts: 6
Joined: Wed May 03, 2023 5:16 am

[esp-idf v5.1.2 ] HTTP errors during Azure Connection

Postby Suresh » Tue Jan 16, 2024 7:51 am

Hi Team,

Build environment:

SDK: ESP-IDF v5.1.2
Device: ESP32
Component: HTTP

Issue:

During establishing the connection with the Azure cloud using HTTP (while fetching Azure connection tokens),and despite a stable internet connection, it remains stuck in the same loop.


Here are some key observations we have made during our testing:


1. Network Frequency Variation & Inconsistency in Network Behaviour:

We have noticed that the issue is not consistent across all networks. In some instances, the network frequency is higher, exacerbating the problem, while in others, it is relatively lower.

2. Comparison with Previous Version (4.4.3 ESP-IDF):

This behaviour was not observed in the 4.4.3 ESP-IDF version, indicating that there might be a specific factor related to the current version causing the problem.


Please find the logs for your reference:

(57829007) transport_base: Failed to open a new connection
(57829007) HTTP_CLIENT: Connection failed, sock < 0
(57829007) [dps]: HTTP_EVENT_ERROR
(57830017) [dps]: 2.a. Requesting for access token
(57839747) esp-tls: Failed to open new connection in specified timeout
(57839747) transport_base: Failed to open a new connection
(57839747) HTTP_CLIENT: Connection failed, sock < 0
(57839747) [dps]: HTTP_EVENT_ERROR
(57840757) [dps]: 2.a. Requesting for access token
(57848027) [dps]: HTTP_EVENT_ERROR
(57849027) [dps]: 2.a. Requesting for access token
(57854577) esp-tls: Failed to open new connection in specified timeout
(57854577) transport_base: Failed to open a new connection
(57854577) HTTP_CLIENT: Connection failed, sock < 0
(57854577) [dps]: HTTP_EVENT_ERROR
(57855587) [dps]: 2.a. Requesting for access token
(57862467) esp-tls: Failed to open new connection in specified timeout
(57862467) transport_base: Failed to open a new connection
(57862467) HTTP_CLIENT: Connection failed, sock < 0
(57862467) [dps]: HTTP_EVENT_ERROR
(57863477) [dps]: 2.a. Requesting for access token
(57869837) esp-tls: Failed to open new connection in specified timeout
(57869837) transport_base: Failed to open a new connection
(57869837) HTTP_CLIENT: Connection failed, sock < 0
(57869837) [dps]: HTTP_EVENT_ERROR
(57870847) [dps]: 2.a. Requesting for access token
(57879057) esp-tls: Failed to open new connection in specified timeout
(57879057) transport_base: Failed to open a new connection
(57879057) HTTP_CLIENT: Connection failed, sock < 0
(57879057) [dps]: HTTP_EVENT_ERROR
(57880067) [dps]: 2.a. Requesting for access token
(57885077) esp-tls: [sock=56] select() timeout
(57885077) esp-tls: Failed to open new connection
(57885077) transport_base: Failed to open a new connection
(57885077) HTTP_CLIENT: Connection failed, sock < 0
(57885087) [dps]: HTTP_EVENT_ERROR
(57886097) [dps]: 2.a. Requesting for access token
(57900617) esp-tls: [sock=56] select() timeout
(57900617) esp-tls: Failed to open new connection
(57900617) transport_base: Failed to open a new connection
(57900617) HTTP_CLIENT: Connection failed, sock < 0
(57900627) [dps]: HTTP_EVENT_ERROR
(57901627) [dps]: 2.a. Requesting for access token
(57907287) esp-tls: Failed to open new connection in specified timeout
(57907287) transport_base: Failed to open a new connection
(57907287) HTTP_CLIENT: Connection failed, sock < 0
(57907287) [dps]: HTTP_EVENT_ERROR
(57908297) [dps]: 2.a. Requesting for access token
(57916427) esp-tls-mbedtls: mbedtls_ssl_handshake returned -0x7280
(57916427) esp-tls: Failed to open new connection
(57916427) transport_base: Failed to open a new connection
(57916437) HTTP_CLIENT: Connection failed, sock < 0
(57916437) [dps]: HTTP_EVENT_ERROR
(57917437) [dps]: 2.a. Requesting for access token
(57922447) esp-tls: [sock=56] select() timeout
(57922447) esp-tls: Failed to open new connection
(57922447) transport_base: Failed to open a new connection
(57922447) HTTP_CLIENT: Connection failed, sock < 0
(57922457) [dps]: HTTP_EVENT_ERROR
(57923457) [dps]: 2.a. Requesting for access token
(57928467) esp-tls: [sock=56] select() timeout
(57928467) esp-tls: Failed to open new connection
(57928467) transport_base: Failed to open a new connection
(57928467) HTTP_CLIENT: Connection failed, sock < 0
(57928477) [dps]: HTTP_EVENT_ERROR
(57929477) [dps]: 2.a. Requesting for access token
(57937447) esp-tls: Failed to open new connection in specified timeout
(57937447) transport_base: Failed to open a new connection
(57937447) HTTP_CLIENT: Connection failed, sock < 0
(57937457) [dps]: HTTP_EVENT_ERROR
(57938457) [dps]: 2.a. Requesting for access token
(57946257) [dps]: HTTP_EVENT_ERROR
(57947257) [dps]: 2.a. Requesting for access token
(57954017) esp-tls-mbedtls: mbedtls_ssl_handshake returned -0x7280
(57954017) esp-tls: Failed to open new connection
(57954017) transport_base: Failed to open a new connection
(57954027) HTTP_CLIENT: Connection failed, sock < 0
(57954037) [dps]: HTTP_EVENT_ERROR
(57955037) [dps]: 2.a. Requesting for access token
(57959357) [local_mode]: Connection closed[55]
(57959357) HEAP_MEM: [77280] bytes
(57959357) [local_mode]: [CloseSocket] Memory Lost: 116 bytes
(57972027) esp-tls-mbedtls: mbedtls_ssl_handshake returned -0x7280
(57972027) esp-tls: Failed to open new connection
(57972027) transport_base: Failed to open a new connection
(57972037) HTTP_CLIENT: Connection failed, sock < 0
(57972047) [dps]: HTTP_EVENT_ERROR
(57973047) [dps]: 2.a. Requesting for access token
(57975067) [dps]: 2.b. Received access token
(57975137) [dps]: 3.a. Requesting SAS token
(57982097) HTTP_CLIENT: Connection timed out before data was ready!
(57982097) [dps]: SAS Token Request: Failed to perform HTTPS request = 28679
(57989867) esp-tls: Failed to open new connection in specified timeout
(57989867) transport_base: Failed to open a new connection
(57989867) HTTP_CLIENT: Connection failed, sock < 0
(57989867) [dps]: HTTP_EVENT_ERROR
(57989877) [dps]: SAS Token Request: Failed to perform HTTPS request = 28674
(57995897) esp-tls: [sock=55] select() timeout
(57995897) esp-tls: Failed to open new connection
(57995897) transport_base: Failed to open a new connection
(57995897) HTTP_CLIENT: Connection failed, sock < 0
(57995907) [dps]: HTTP_EVENT_ERROR
(57995907) [dps]: SAS Token Request: Failed to perform HTTPS request = 28674
(58001927) esp-tls: [sock=55] select() timeout
(58001927) esp-tls: Failed to open new connection
(58001927) transport_base: Failed to open a new connection
(58001927) HTTP_CLIENT: Connection failed, sock < 0
(58001937) [dps]: HTTP_EVENT_ERROR
(58001937) [dps]: SAS Token Request: Failed to perform HTTPS request = 28674
(58001947) [dps]: SAS Token Request: All retries are over. Re-initiating DPS request.
(58002957) [dps]: 2.a. Requesting for access token
(58012367) [dps]: 2.b. Received access token
(58012447) [dps]: 3.a. Requesting SAS token
(58017887) [dps]: HTTP_EVENT_ERROR
(58017887) [dps]: SAS Token Request: Failed to perform HTTPS request = 28676
(58026867) esp-tls: Failed to open new connection in specified timeout
(58026867) transport_base: Failed to open a new connection
(58026867) HTTP_CLIENT: Connection failed, sock < 0
(58026867) [dps]: HTTP_EVENT_ERROR
(58026877) [dps]: SAS Token Request: Failed to perform HTTPS request = 28674
(58033887) esp-tls-mbedtls: mbedtls_ssl_handshake returned -0x7280
(58033887) esp-tls: Failed to open new connection
(58033887) transport_base: Failed to open a new connection
(58033897) HTTP_CLIENT: Connection failed, sock < 0
(58033907) [dps]: HTTP_EVENT_ERROR



Regards,
Suresh

Who is online

Users browsing this forum: Baidu [Spider] and 132 guests