0

Refering the site https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-device-sdk-c-iothubclient I am writing a sample azzure iot code in C++ to run on linux and windows.

When I run my sample code on Ubutnu then whenever IoTHubClient_LL_DoWork() API is called I get below errors:

Error: Time:Thu May 10 23:56:23 2018 File:/home/azure/azure-iot-sdk-c/c-utility/adapters/httpapi_curl.c Func:HTTPAPI_ExecuteRequest Line:582 curl_easy_perform() failed: Out of memory

Error: Time:Thu May 10 23:56:23 2018 File:/home/azure/azure-iot-sdk-c/c-utility/adapters/httpapi_curl.c Func:HTTPAPI_ExecuteRequest Line:584 (result = HTTPAPI_OPEN_REQUEST_FAILED)
Error: Time:Thu May 10 23:56:23 2018 File:/home/azure/azure-iot-sdk-c/c-utility/src/httpapiex.c Func:HTTPAPIEX_ExecuteRequest Line:475 unable to recover sending to a working state
Error: Time:Thu May 10 23:56:23 2018 File:/home/azure/azure-iot-sdk-c/iothub_client/src/iothubtransporthttp.c Func:DoEvent Line:1684 unable to HTTPAPIEX_SAS_ExecuteRequest
Error: Time:Thu May 10 23:56:23 2018 File:/home/azure/azure-iot-sdk-c/c-utility/adapters/httpapi_curl.c Func:HTTPAPI_ExecuteRequest Line:582 curl_easy_perform() failed: Out of memory

Error: Time:Thu May 10 23:56:23 2018 File:/home/azure/azure-iot-sdk-c/c-utility/adapters/httpapi_curl.c Func:HTTPAPI_ExecuteRequest Line:584 (result = HTTPAPI_OPEN_REQUEST_FAILED)
Error: Time:Thu May 10 23:56:23 2018 File:/home/azure/azure-iot-sdk-c/c-utility/src/httpapiex.c Func:HTTPAPIEX_ExecuteRequest Line:475 unable to recover sending to a working state
Error: Time:Thu May 10 23:56:23 2018 File:/home/azure/azure-iot-sdk-c/iothub_client/src/iothubtransporthttp.c Func:DoMessages Line:2077 unable to HTTPAPIEX_SAS_ExecuteRequest

What might be the cause of these errors and how to get rid of them?

RKum
  • 758
  • 2
  • 12
  • 33

1 Answers1

0

Have you checked that OpenSSL is installed on the Linux or if installed what is the version?

I have found out some similar topics about this error as following:

Initializing SSL and libcurl and getting "out of memory"

"CURLE_OUT_OF_MEMORY" error when posting via https

The reason may be caused by not initialized openSSL library with SSL_library_init() before using azure iothub divice client. Even though I have not built the development environment and reproduced the error, hope that is helpful for you.

Michael Xu
  • 4,382
  • 1
  • 8
  • 16