Hi I created an Azure data flow that transfer json from json file to cosmos db. The CosmosDbNoSql linked service connects successful. The Blob storage linked service for json file connects successful as well. The data flow is ok without any error. When refreshing data preview in debug the error always display. "Client initialization failed. Check if the endpoint is reachable and if your auth token is valid. More info: https://aka.ms/cosmosdb-tsg-service-unavailable-java"
The link displays the blow content.
Client initialization failure
The following exception is hit if the SDK isn’t able to talk to the Azure Cosmos DB instance. This exception normally indicates some security protocol like a firewall rule that is blocking the requests.
Java
java.lang.RuntimeException: Client initialization failed. Check if the endpoint is reachable and if your auth token is valid
To validate the SDK can communicate to the Azure Cosmos DB account execute the following command from where the application is hosted. If it fails this points to a firewall rule or other security feature blocking the request. If it succeeds the SDK should be able to communicate to the Azure Cosmos DB account.
Java
telnet myCosmosDbAccountName.documents.azure.com 443
It would be appreciated someone can let me know how to do the process "To validate the SDK can communicate to the Azure Cosmos DB account execute the following command from where the application is hosted." or how to the issue as I don’t find any details about it. Thanks million.
I created a new Azure integration runtime for cosmos. The connection works. The integration runtime for blob hasn’t been changed and uses the default (AutoResolveIntegrationRuntime). The same issue happen again
2
Answers
Follow the instructions below to connect to Cosmos DB:
Double-check the authentication token (such as the Cosmos DB account key or shared access signature) used in your Azure Data Factory linked service for Cosmos DB. Ensure that the token is valid and has sufficient permissions to access the Cosmos DB account.
Make sure the network is configured correctly to access the database, as shown below:
5.Use the same integration runtime for both linked services.
A similar question was raised on the MS Q&A platform. You can check this.
above should help you.