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

asked 2 years ago152 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions