2

I have created a Pipeline in Azure ML which makes calls to Azure Cognitive Services Text Analytics using its Python API. When I run the code I have written locally, it executes without error, but when run it in the pipeline it fails to perform the Sentiment Analysis and Key Phrase Extraction calls with a strange error message:

Got exception when invoking script at line 243 in function azureml_main: 'ServiceRequestError: <urllib3.connection.HTTPSConnection object at 0x7ff4dc727588>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'.

Upon further testing, it appears that it is able to open the Text Analytics Client correctly (Or at least without throwing an error), but when it gets to the line that actually makes the call out using the Python API it throws the above error.

I wondered if it was an Open SSL issue, but when I checked the version it had access to TLS 1.2: OpenSSL 1.1.1k 25 Mar 2021

It does not appear to be a temporary issue; I started seeing the issue last week, and I have seen it over a number of environments and with different input datasets.

Has anyone seen a similar issue before? Any ideas on how it could be resolved?

Anders Swanson
  • 3,637
  • 1
  • 18
  • 43
Angus B
  • 129
  • 7
  • How do you authenticate to CogSvc locally vs. how are you trying to do it in the pipeline? – Anders Swanson Sep 06 '21 at 23:44
  • Same way both in the pipeline and locally; with the Cognitive Services Endpoint and Access Key. During my testing to get around the issue I tried refreshing the keys but I still got the same error. – Angus B Sep 08 '21 at 00:15

1 Answers1

3

After speaking with Microsoft Support, it turns out this error was a platform error introduced in a recent update of Azure ML. Their product team are currently investigating a solution.

As a temporary fix, if you see this issue, you can try switching between using your personal endpoint and the generic regional endpoint; In this case, the error was only introduced for using personal endpoints. The endpoints in question have the following formats:

  • Personal: https://<COGNITIVE-SERVICES-INSTANCE>.cognitiveservices.azure.com/
  • Regional: https://<REGION>.api.cognitive.microsoft.com/
Angus B
  • 129
  • 7