Unable to connect ES cloud

Hi All,

I am unable to connect ES cloud using transport client with below code.I have created
transport_client user using kibana but application throwing exception shown below.
Could you please help me to resolve this issue.I am using ES 5.7 version.

Exception:
(NoNodeAvailableException[None of the configured nodes are available: [{#transport#-1}) .

This is my code.

     Settings settings = Settings.builder()
                    .put("cluster.name", "tesclustername")
                    .put("xpack.security.user", "testuser:testpassword")
                    .build();

            TransportClient client = new PreBuiltXPackTransportClient(settings)
                     .addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("test.eu-west-1.aws.found.io"), 9300)); 

Regards,
Chhavi

Please format your code, logs or configuration files using </> icon as explained in this guide and not the citation button. It will make your post more readable.

Or use markdown style like:

```
CODE
```

There's a live preview panel for exactly this reasons.

Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.
Please update your post.

I think (but unsure though) that the transport port is 9343 on cloud.
Note that the TransportClient will probably be removed in the feature. You should use the REST Client instead.

Hi Dadoonet,

Sorry for the trouble.I will try to format my code next time.
Also I have tried for 9343 but its throwing same exception.And regarding REST Client We are using elastic search in our application many places and planing to migrate ES clod service in short time.Because of this regions we are not moving from TrasaportClient to REST Client(because again to much testing effort is required).
But in next version of ES may 6 we will migrate to REST Client.But t present to move i need this help from your side.

Regards,
Chhavi

Here is some documentation that might help:

This class for instance:

Hi Dadoonet,

Sorry for late reply But After using above Link code Also I am getting same exception as None of the configured nodes are available

Regards,
Chhavi

May be contact your cloud support?
Please see https://www.elastic.co/cloud/as-a-service/support on how to raise a support ticket for Elastic Cloud :slight_smile:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.