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?

2
  • How do you authenticate to CogSvc locally vs. how are you trying to do it in the pipeline? Commented Sep 6, 2021 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. Commented Sep 8, 2021 at 0:15

1 Answer 1

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/
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, it works. Do you have an issue id to track the next steps/resolution?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.