Ensure your application environment can reach the Cosmos DB endpoint.
- Firewall Rules: Check if any firewalls (local, network, or Azure Network Security Groups) are blocking outbound traffic on port 443 to your Cosmos DB endpoint.
- DNS Resolution: Verify that your application can resolve the Cosmos DB endpoint name to an IP address. Use tools like
pingornslookup. - Proxy Settings: If your environment uses a proxy, ensure it's configured correctly and not interfering with the connection.
Diagnostic Command (Example using `curl`):
curl -v https://your-cosmosdb-account.documents.azure.com:443
A successful response will show connection details and HTTP status codes (e.g., 401 Unauthorized, which is expected if not authenticated, but indicates a connection was made).