Azure-Samples / cognitive-services-speech-sdk

Sample code for the Microsoft Cognitive Services Speech SDK
MIT License
2.97k stars 1.87k forks source link

WS_OPEN_ERROR_UNDERLYING_IO_OPEN_FAILED #2675

Open ArbazYousuf opened 1 week ago

ArbazYousuf commented 1 week ago

Issue: Intermittent Connection Failure in Speech Service

Error Details:

{
  "Reason": 1,
  "ErrorCode": 5,
  "ErrorDetails": "Connection failed (no connection to the remote host). Internal error: 1. Error details: Failed with error: WS_OPEN_ERROR_UNDERLYING_IO_OPEN_FAILED\nwss://eastus.s2s.speech.microsoft.com/speech/translation/cognitiveservices/v1?from=en-US&to=en-US\nX-ConnectionId: 9a04fc547d5543df93e19d3c2e75fbe7 SessionId: 9a04fc547d5543df93e19d3c2e75fbe7",
  "Result": {
    "Translations": {},
    "ResultId": "1d304b3ea84e4700b100ab9fcfebf9f7",
    "Reason": 1,
    "Text": "",
    "Duration": "00:00:00",
    "OffsetInTicks": 0,
    "Properties": {}
  },
  "Offset": 0,
  "SessionId": "9a04fc547d5543df93e19d3c2e75fbe7"
}

Problem Description: The error occurs intermittently during operation, resulting in failed connections to the Speech Service endpoint. The issue is specifically tied to WebSocket errors (WS_OPEN_ERROR_UNDERLYING_IO_OPEN_FAILED) while attempting to connect to: wss://eastus.s2s.speech.microsoft.com/speech/translation/cognitiveservices/v1

The X-ConnectionId and SessionId details vary, but the error consistently points to underlying I/O connection failures.

Environment Details: Microsoft.CognitiveServices.Speech Version: 1.38.0 Platform: Linux SKU/Size: PremiumV3 (P1v3)

Questions:

  1. What could be the potential cause of this intermittent connection failure?
  2. Are there any specific configurations or optimizations needed to resolve this?
  3. Could this be related to service throttling, regional network issues, or specific platform limitations?
ArbazYousuf commented 1 day ago

4599320_824599297351: CANCELED: ErrorDetails=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/universal/v2?storeAudio=true X-ConnectionId: c3cb4e0c1f3247d188f2da3e41d17dba SessionId: c3cb4e0c1f3247d188f2da3e41d17dba