Thanks for reaching out to us, could you please provide the document you are referring to us, so that we can reproduce your error and investigate further.
Generally, there are several possible reasons you may want to consider -
- DNS resolution: Ensure that your Docker container can resolve DNS queries correctly. You can test this by executing a command like
nslookup {Subscription_Name}.cognitiveservices.azure.com
from within the container. If this fails, it may indicate a problem with DNS resolution. - Network configuration: Verify the network configuration of your Docker container. Depending on how your Docker network is set up, it may not have access to the external network. You can try using the
host
network mode (--network=host
when starting the container) as a test to see if this resolves the issue. - Proxies: If your environment uses a proxy for internet access, you need to ensure that your Docker container is also configured to use this proxy. You can set the
HTTP_PROXY
andHTTPS_PROXY
environment variables to the address of your proxy when starting the Docker container. - Firewall / Security Groups: Even though you have mentioned it's not a firewall issue, it's worth double-checking the firewall rules or security groups associated with your Docker host and the network it's connected to. Ensure that they allow outbound connections to the Azure Cognitive Services API.
- Cognitive Services Configuration: Check the configuration of your Cognitive Services resource in the Azure portal. Make sure it's not restricted to certain IP addresses or networks.
Please have a try and let me know how it works. If you still see this issue, please share more details, I hope this helps.
Regards,
Yutong
-Please kindly accept the error if you feel helpful to support the community, thanks a lot.