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

Unable to configure Microsoft Translator "Name or service not known" #8644

Closed
2 tasks done
alikleit opened this issue Jan 20, 2023 · 9 comments
Closed
2 tasks done

Unable to configure Microsoft Translator "Name or service not known" #8644

alikleit opened this issue Jan 20, 2023 · 9 comments
Assignees
Labels
bug Something is broken.
Milestone

Comments

@alikleit
Copy link

Describe the issue

I'm getting the following error when setting up Microsoft Translator:

Failed to fetch supported languages: HTTPSConnectionPool(host='germanywestcentral.https', port=443): Max retries exceeded with url: //api.cognitive.microsofttranslator.com//sts/v1.0/issueToken?Subscription-Key=<my-api-key> (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fd05ae7e690>: Failed to establish a new connection: [Errno -2] Name or service not known'))

I tried the following urls (non-regional):
https://api.cognitive.microsofttranslator.com
https://api.cognitive.microsofttranslator.com/translate?api-version=3.0

and same with the europe region url:
api-eur.cognitive.microsofttranslator.com

region: germanywestcentral

I already tried

  • I've read and searched the documentation.
  • I've searched for similar issues in this repository.

Steps to reproduce the behavior

No response

Expected behavior

No response

Screenshots

No response

Exception traceback

No response

How do you run Weblate?

Docker container

Weblate versions

No response

Weblate deploy checks

No response

Additional context

No response

@nijel
Copy link
Member

nijel commented Jan 23, 2023

Is DNS working correctly on your server? Because api.cognitive.microsofttranslator.com resolves just fine for me...

@nijel nijel added the question This is more a question for the support than an issue. label Jan 23, 2023
@github-actions
Copy link

This issue looks more like a support question than an issue. We strive to answer these reasonably fast, but purchasing the support subscription is not only more responsible and faster for your business but also makes Weblate stronger.

In case your question is already answered, making a donation is the right way to say thank you!

@alikleit
Copy link
Author

alikleit commented Jan 25, 2023

I tried with the code sample that they provide, same credential work for me in a C# console application. However, I also tried on Weblate locally and a secure ec2 instance. and getting this exception:

image

All networks are allowed for the application in Azure:
image

I'm using the latest version of Weblate

@nijel
Copy link
Member

nijel commented Jan 25, 2023

Looking at their docs and you need to use api.cognitive.microsoft.com instead of api.cognitive.microsofttranslator.com when using region. Try omitting region, that should work for now.

@nijel nijel self-assigned this Jan 25, 2023
@nijel nijel added bug Something is broken. and removed question This is more a question for the support than an issue. labels Jan 25, 2023
@nijel nijel added this to the 4.16 milestone Jan 25, 2023
@nijel nijel closed this as completed in 607176a Jan 25, 2023
@alikleit
Copy link
Author

alikleit commented Jan 25, 2023

Thanks! that worked :) though the link in the documentation that they provide is api.cognitive.microsofttranslator.com

image

However, did not test yet the translations from it, cause the endpoint is different from the ones they give I would expect that the api won't be found, unless you are resolving this somehow in weblate

@github-actions
Copy link

Thank you for your report; the issue you have reported has just been fixed.

  • In case you see a problem with the fix, please comment on this issue.
  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.

@nijel
Copy link
Member

nijel commented Jan 25, 2023

Okay, I got confused myself as well api.cognitive.microsofttranslator.com is for translating, while api.cognitive.microsoft.com is for issuing keys. So, the change I made is wrong and needs to be reverted.

@nijel nijel reopened this Jan 25, 2023
@nijel nijel closed this as completed in 6de9b28 Jan 26, 2023
@nijel
Copy link
Member

nijel commented Jan 26, 2023

I've reworked the form, hopefully it will be less confusing now.

@github-actions
Copy link

Thank you for your report; the issue you have reported has just been fixed.

  • In case you see a problem with the fix, please comment on this issue.
  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken.
Projects
None yet
Development

No branches or pull requests

2 participants