Closed parikshitmukherjee11 closed 7 months ago
@parikshitmukherjee11 What is the Linux version in use in the container?
@jhakulin Its Debian 12.5 Bookworm
@parikshitmukherjee11 With Debian 12 you will need to install libssl 1.x in the container either from an old package (see Ubuntu example) or (recommended) latest sources. Yes, you need to install native system libraries, not just pip.
OpenSSL 1.1.1 was released on 11th September 2018, and though being an LTS release, is now considered EOL since 11th September 2023. Azure-Team: please upgrade your dependencies.
Closed as answered. OpenSSL upgrade status is followed up in https://github.com/Azure-Samples/cognitive-services-speech-sdk/issues/2048
python temporary solution : https://github.com/Azure-Samples/cognitive-services-speech-sdk/issues/2204#issuecomment-2075395036
My app works fine on Mac OS , but in python 3.9 image I get open SSL error:
6919ms SPX_TRACE_ERROR: AZ_LOG_ERROR: tlsio_openssl.c:691 error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed [473490]: 6919ms SPX_TRACE_ERROR: AZ_LOG_ERROR: tlsio_openssl.c:2464 FORCE-Closing tlsio instance. [473490]: 6919ms SPX_TRACE_SCOPE_ENTER: uws_web_socket.cpp:247 OnWebSocketOpened [473490]: 6919ms SPX_TRACE_ERROR: web_socket.cpp:907 WS open operation failed with result=1(WS_OPEN_ERROR_UNDERLYING_IO_OPEN_FAILED), code=2573[0x00000a0d], time=2024-03-01T13:27:48.9143037Z [473490]: 6919ms SPX_TRACE_INFO: usp_connection.cpp:933 TS:533, TransportError: connection:0x8c01b800, code=5, string=Connection failed (no connection to the remote host). Internal error: 1. Error details: Failed with error: WS_OPEN_ERROR_UNDERLYING_IO_OPEN_FAILED wss://westeurope.stt.speech.microsoft.com/speech/universal/v2 X-ConnectionId: ca429b9e33bd4f06b922f25d9b435d47 [473490]: 6919ms SPX_TRACE_ERROR: usp_reco_engine_adapter.cpp:2008 Response: On Error: Code:5, Message: Connection failed (no connection to the remote host). Internal error: 1. Error details: Failed with error: WS_OPEN_ERROR_UNDERLYING_IO_OPEN_FAILED wss://westeurope.stt.speech.microsoft.com/speech/universal/v2 X-ConnectionId: ca429b9e33bd4f06b922f25d9b435d47. [473490]: 6919ms SPX_DBG_TRACE_VERBOSE: usp_reco_engine_adapter.cpp:3022 TryChangeState; audioState/uspState: 1/0 => 1/-1 USP-ERRORERROR [473490]: 6919ms SPX_TRACE_ERROR: usp_reco_engine_adapter.cpp:2022 OnError: site->Error() ... error='Connection failed (no connection to the remote host). Internal error: 1. Error details: Failed with error: WS_OPEN_ERROR_UNDERLYING_IO_OPEN_FAILED wss://westeurope.stt.speech.microsoft.com/speech/universal/v2 X-ConnectionId: ca429b9e33bd4f06b922f25d9b435d47' [473490]: 6919ms SPX_DBG_TRACE_VERBOSE: usp_reco_engine_adapter_retry.cpp:153 ShouldReconnect: Should Reconnect: 1 [473490]: 7170ms SPX_DBG_TRACE_VERBOSE: usp_reco_engine_adapter_retry.cpp:127 CleanupAdapterAndAudio: Trying to reset the engine adapter [473490]: 7170ms SPX_DBG_TRACE_VERBOSE: create_object_helpers.h:78 SpxTerm: ptr=0x0xffff8c01a748 [473490]: 7170ms SPX_DBG_TRACE_SCOPE_ENTER: usp_reco_engine_adapter.cpp:97 Terminating CSpxUspRecoEngineAdapter... [473490]: 7170ms SPX_DBG_TRACE_VERBOSE: usp_reco_engine_adapter.cpp:98 Term: this=0x0xffff8c01a700 [473490]: 7170ms SPX_DBG_TRACE_VERBOSE: usp_reco_engine_adapter.cpp:3022 TryChangeState; audioState/uspState: 1/-1 => 1/9998 USP-TERMINATING [473490]: 7170ms SPX_DBG_TRACE_VERBOSE: usp_reco_engine_adapter.cpp:102 Term: Terminating USP Connection (0x0xffff8c01b838) [473490]: 7170ms SPX_DBG_TRACE_VERBOSE: create_object_helpers.h:78 SpxTerm: ptr=0x0xffff8c001eb8 [473490]: 7170ms SPX_DBG_TRACE_VERBOSE: usp_reco_engine_adapter.cpp:3022 TryChangeState; audioState/uspState: 1/9998 => 1/9999 USP-ZOMBIE [473490]: 7170ms SPX_DBG_TRACE_SCOPE_EXIT: usp_reco_engine_adapter.cpp:97 Terminating CSpxUspRecoEngineAdapter... Done!
DOCKER FILE:
FROM python:3.9
Set the working directory to /app
WORKDIR /app
Copy the current directory contents into the container at /app
COPY . .
ENV PYTHONFAULTHANDLER=1 \ PYTHONUNBUFFERED=1 \ PIP_NO_CACHE_DIR=off
RUN apt update && apt install -y build-essential gcc ffmpeg libsm6 libxext6 wget nano unzip gdebi -y \
&& pip install --upgrade pip \
&& pip install -r requirements.txt
RUN pip install -r requirements.txt
RUN pip install openssl==1.1.1
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
set display port to avoid crash
ENV DISPLAY=:99
Create a uwsgi log directory and files
RUN mkdir /var/log/uwsgi RUN touch /var/log/uwsgi/uwsgi_access.log RUN touch /var/log/uwsgi/uwsgi_error.log
Expose the port your FastAPI application runs on
EXPOSE 80
Command to run the FastAPI application
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80"]