Skip to content
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

Runtime error: Failed to initialize platform (azure-c-shared). Error: 2176 AWS Amazon Linux Elastic Beanstalk #2372

Closed
jpsanchezl10 opened this issue May 9, 2024 · 2 comments
Assignees
Labels
in-review In review pending close Closed soon without new activity

Comments

@jpsanchezl10
Copy link

AMAZON LINUX VERSION:
NAME="Amazon Linux"
VERSION="2023"
ID="amzn"
ID_LIKE="fedora"
VERSION_ID="2023"
PLATFORM_ID="platform:al2023"
PRETTY_NAME="Amazon Linux 2023.4.20240429"

OPEN SSL:
[ec2-user@ip-10-0-1-84 etc]$ openssl version
OpenSSL 1.1.1w 11 Sep 2023

LOGS:
May 9 19:14:53 ip-10-0-1-84 web[3188]: Runtime error: Failed to initialize platform (azure-c-shared). Error: 2176 May 9 19:14:53 ip-10-0-1-84 web[3188]: Traceback (most recent call last): May 9 19:14:53 ip-10-0-1-84 web[3188]: File "/var/app/current/application.py", line 197, in websocket_endpoint May 9 19:14:53 ip-10-0-1-84 web[3188]: call:Call = await solutions.call_stt(websocket,Listen_Task,chat_completion_task,call) May 9 19:14:53 ip-10-0-1-84 web[3188]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ May 9 19:14:53 ip-10-0-1-84 web[3188]: File "/var/app/current/src/models/solutions.py", line 20, in call_stt May 9 19:14:53 ip-10-0-1-84 web[3188]: return await wait_for_user_input(self=self,websocket=websocket,listen_task=listen_task, chat_completion_task=chat_completion_task, call=call) # Assuming wait_for_user_input is async May 9 19:14:53 ip-10-0-1-84 web[3188]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ May 9 19:14:53 ip-10-0-1-84 web[3188]: File "/var/app/current/src/services/stt/google/v1/user_input_google.py", line 125, in wait_for_user_input May 9 19:14:53 ip-10-0-1-84 web[3188]: await self.call_tts(call, text_iterator=text_iterator(), twilio_ws=websocket,listen_task=listen_task) May 9 19:14:53 ip-10-0-1-84 web[3188]: File "/var/app/current/src/models/solutions.py", line 32, in call_tts May 9 19:14:53 ip-10-0-1-84 web[3188]: return await text_to_speech_input(call=call, text_iterator=text_iterator, twilio_ws=twilio_ws, listen_task=listen_task) # Assuming text_to_speech_input is async May 9 19:14:53 ip-10-0-1-84 web[3188]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ May 9 19:14:53 ip-10-0-1-84 web[3188]: File "/var/app/current/src/services/speech/azure/tts_streaming.py", line 34, in text_to_speech_input May 9 19:14:53 ip-10-0-1-84 web[3188]: speech_synthesizer = speechsdk.SpeechSynthesizer(speech_config=speech_config, audio_config=None) May 9 19:14:53 ip-10-0-1-84 web[3188]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ May 9 19:14:53 ip-10-0-1-84 web[3188]: File "/var/app/venv/staging-LQM1lest/lib64/python3.11/site-packages/azure/cognitiveservices/speech/speech.py", line 2223, in __init__ May 9 19:14:53 ip-10-0-1-84 web[3188]: _call_hr_fn(fn=_sdk_lib.synthesizer_create_speech_synthesizer_from_config, *[ May 9 19:14:53 ip-10-0-1-84 web[3188]: File "/var/app/venv/staging-LQM1lest/lib64/python3.11/site-packages/azure/cognitiveservices/speech/interop.py", line 62, in _call_hr_fn May 9 19:14:53 ip-10-0-1-84 web[3188]: _raise_if_failed(hr) May 9 19:14:53 ip-10-0-1-84 web[3188]: File "/var/app/venv/staging-LQM1lest/lib64/python3.11/site-packages/azure/cognitiveservices/speech/interop.py", line 55, in _raise_if_failed May 9 19:14:53 ip-10-0-1-84 web[3188]: __try_get_error(_spx_handle(hr)) May 9 19:14:53 ip-10-0-1-84 web[3188]: File "/var/app/venv/staging-LQM1lest/lib64/python3.11/site-packages/azure/cognitiveservices/speech/interop.py", line 50, in __try_get_error May 9 19:14:53 ip-10-0-1-84 web[3188]: raise RuntimeError(message) May 9 19:14:53 ip-10-0-1-84 web[3188]: RuntimeError: Exception with error code: May 9 19:14:53 ip-10-0-1-84 web[3188]: [CALL STACK BEGIN] May 9 19:14:53 ip-10-0-1-84 web[3188]: /var/app/venv/staging-LQM1lest/lib64/python3.11/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x1ec00c) [0xffff7ddec00c] May 9 19:14:53 ip-10-0-1-84 web[3188]: /var/app/venv/staging-LQM1lest/lib64/python3.11/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x20c5e4) [0xffff7de0c5e4] May 9 19:14:53 ip-10-0-1-84 web[3188]: /lib64/libc.so.6(+0x95880) [0xffffa0cc7880] May 9 19:14:53 ip-10-0-1-84 web[3188]: /var/app/venv/staging-LQM1lest/lib64/python3.11/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x20d564) [0xffff7de0d564] May 9 19:14:53 ip-10-0-1-84 web[3188]: /var/app/venv/staging-LQM1lest/lib64/python3.11/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x1bc394) [0xffff7ddbc394] May 9 19:14:53 ip-10-0-1-84 web[3188]: /var/app/venv/staging-LQM1lest/lib64/python3.11/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x1b9ec0) [0xffff7ddb9ec0] May 9 19:14:53 ip-10-0-1-84 web[3188]: /var/app/venv/staging-LQM1lest/lib64/python3.11/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x1f2d0c) [0xffff7ddf2d0c] May 9 19:14:53 ip-10-0-1-84 web[3188]: /var/app/venv/staging-LQM1lest/lib64/python3.11/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x2066d0) [0xffff7de066d0] May 9 19:14:53 ip-10-0-1-84 web[3188]: /var/app/venv/staging-LQM1lest/lib64/python3.11/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x1dbc88) [0xffff7dddbc88] May 9 19:14:53 ip-10-0-1-84 web[3188]: /var/app/venv/staging-LQM1lest/lib64/python3.11/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x1094dc) [0xffff7dd094dc] May 9 19:14:53 ip-10-0-1-84 web[3188]: /var/app/venv/staging-LQM1lest/lib64/python3.11/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x1f2d0c) [0xffff7ddf2d0c] May 9 19:14:53 ip-10-0-1-84 web[3188]: /var/app/venv/staging-LQM1lest/lib64/python3.11/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x1b9a0c) [0xffff7ddb9a0c] May 9 19:14:53 ip-10-0-1-84 web[3188]: /var/app/venv/staging-LQM1lest/lib64/python3.11/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x225290) [0xffff7de25290] May 9 19:14:53 ip-10-0-1-84 web[3188]: /var/app/venv/staging-LQM1lest/lib64/python3.11/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(synthesizer_create_speech_synthesizer_from_config+0x10c) [0xffff7dcc21a4] May 9 19:14:53 ip-10-0-1-84 web[3188]: /lib64/libffi.so.8(+0x14db0) [0xffff8d7d3db0] May 9 19:14:53 ip-10-0-1-84 web[3188]: /lib64/libffi.so.8(+0x11f0c) [0xffff8d7d0f0c] May 9 19:14:53 ip-10-0-1-84 web[3188]: /usr/lib64/python3.11/lib-dynload/_ctypes.cpython-311-aarch64-linux-gnu.so(+0x1c070) [0xffff8da6c070] May 9 19:14:53 ip-10-0-1-84 web[3188]: [CALL STACK END] May 9 19:14:53 ip-10-0-1-84 web[3188]: Runtime error: Failed to initialize platform (azure-c-shared). Error: 2176

PYTHON azure-cognitiveservices-speech==1.37.0

The SDK works perfect on my m3 macbook pro. But not on my dev envoronment in AWS Elastic Beanstalk

@pankopon
Copy link
Contributor

pankopon commented May 9, 2024

Hi, AWS Elastic Beanstalk / "fedora" is not among the Linux distributions supported by the Speech SDK, please see
https://learn.microsoft.com/azure/ai-services/speech-service/quickstarts/setup-platform?tabs=linux&pivots=programming-language-python#platform-requirements

That said, you can check OpenSSL configuration as instructed in
https://learn.microsoft.com/azure/ai-services/speech-service/how-to-configure-openssl-linux?pivots=programming-language-python
In particular, you may have to set the SSL_CERT_FILE environment variable (presuming your Fedora-based system matches RHEL/CentOS).

If the above does not help, try running ldd -r on the .so files in /var/app/venv/staging-LQM1lest/lib64/python3.11/site-packages/azure/cognitiveservices/speech and check the output for anything "not found" (i.e. missing system library dependencies) or other errors.

@pankopon pankopon self-assigned this May 9, 2024
@pankopon pankopon added in-review In review pending close Closed soon without new activity labels May 9, 2024
@pankopon
Copy link
Contributor

Closed as the target environment is unsupported at the moment. Some suggestions of things to check were given.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in-review In review pending close Closed soon without new activity
Projects
None yet
Development

No branches or pull requests

2 participants