How can I fix WS_OPEN_ERROR_UNDERLYING_IO_OPEN_FAILED?

CRAZY INDIAN 0 Reputation points
2023-10-24T02:15:40.52+00:00

I have a FastAPI project which uses uvicorn server to run my application. speechsdk is used for Speech-to-Text operations, the endpoint I am using is "wss://eastus.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?language=en-US", I had a runtime error which was this: "

 Runtime error: Failed to initialize platform (azure-c-shared). Error: 2153

I noticed I was using Ubuntu 22.04 LTS on my ec2. I followed the steps on: https://learn.microsoft.com/en-us/azure/ai-services/speech-service/quickstarts/setup-platform

I encountered this error:

CancellationDetails(reason=CancellationReason.Error, error_details="Connection failed (no connection to the remote host). Internal error: 1. Error details: Failed with error: WS_OPEN_ERROR_UNDERLYING_IO_OPEN_FAILED

wss://eastus.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?language=en-US

After enabling the azure logs the error logs show:

[586746]: 34602ms SPX_TRACE_ERROR: AZ_LOG_ERROR: tlsio_openssl.c:691 error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed

[586746]: 34602ms SPX_TRACE_ERROR: AZ_LOG_ERROR: tlsio_openssl.c:2441 FORCE-Closing tlsio instance.

Also, my application uses a SSL certificate by LetsEncrypt and the .pem files are saved in a folder inside my application directory

I tried changing the SSL_CERT_DIR to several directories but still didn't work:

export SSL_CERT_DIR=/usr/lib/ssl/certs

Any help is appreciated!!!

Azure AI Speech
Azure AI Speech
An Azure service that integrates speech processing into apps and services.
1,405 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. VasaviLankipalle-MSFT 14,421 Reputation points
    2023-10-24T20:45:54.27+00:00

    Hello @CRAZY INDIAN , Thanks for using Microsoft Q&A Platform.

    Sorry to hear about your inconveniences. Firstly, if you haven't, please try to add SDK logging to check if any additional details can be seen in logs? There are similar kind of issues here please check if that helps you. Otherwise, I would suggest raising this issue here so that the SDK team will help you in advising what could be wrong in your case: https://github.com/Azure-Samples/cognitive-services-speech-sdk/issues

    I hope this helps.

    Regards,
    Vasavi


  2. 洪斌 唐 0 Reputation points
    2024-04-24T12:31:43.1133333+00:00

    Hello, I also experienced similar problem on Centos 7.4 whose openssl is OpenSSL 1.1.1t 7 Feb 2023.

    the same python code with the same azure account can work on win11, but failed on centos v7.4. its logger error as

    78854]: 126ms SPX_TRACE_SCOPE_ENTER: uws_web_socket.cpp:149 Open

    [878854]: 126ms SPX_TRACE_INFO: AZ_LOG_INFO: tlsio_openssl.c:2027 create_openssl_instance by TLS_method.

    [878854]: 126ms SPX_TRACE_INFO: AZ_LOG_INFO: tlsio_openssl.c:1849 load_system_store not implemented on this platform

    [878854]: 126ms SPX_TRACE_INFO: AZ_LOG_INFO: tlsio_openssl.c:1882 CRL check enabled.

    [878854]: 148ms SPX_TRACE_SCOPE_EXIT: uws_web_socket.cpp:149 Open

    [878854]: 148ms SPX_TRACE_INFO: usp_connection.cpp:787 Create requestId for messageType 0

    [878854]: 738ms SPX_TRACE_ERROR: AZ_LOG_ERROR: tlsio_openssl.c:691 error:1416F086:SSL routines:tls_process_server_certi

    ficate:certificate verify failed

    [878854]: 738ms SPX_TRACE_ERROR: AZ_LOG_ERROR: tlsio_openssl.c:2464 FORCE-Closing tlsio instance.

    0 comments No comments