Getting error "failed to configure cluster endpoints from hosts" for Amazon DAX Cluster

0

While connecting to encrypted Amazon DAX Cluster using DAX Java SDK we are getting following error

failed to configure cluster endpoints from hosts: [<DAX-Cluster-Endpoint>:9111]

We are using following dax sdk maven dependency

`<dependencies>
    <dependency>
     <groupId>com.amazonaws</groupId>
     <artifactId>amazon-dax-client</artifactId>
     <version>1.0.230341.0</version>
    </dependency>
</dependencies>`

Code Snippet

DynamoDB getDaxClient(String daxEndpoint) {
 AmazonDaxClientBuilder daxClientBuilder = AmazonDaxClientBuilder.standard();
 daxClientBuilder.withRegion(region).withEndpointConfiguration(daxEndpoint);
 AmazonDynamoDB client = daxClientBuilder.build();
 return new DynamoDB(client);
}

DAX Cluster is in ap-south-1 region.

However, I am able to connect DAX from local machine and ec2 instances when running nc command

nc -z <DAX-Cluster-Endpoint> 9111
Connection to<DAX-Cluster-Endpoint> port 9111 [tcp/*] succeeded! 

Note : 9091 port is open for our VPC in security group associated with the DAX cluster

已提问 2 年前153 查看次数
没有答案

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则