Transport Client issue with ES cloud

Hi All,

I am unable to connect ES cloud with transport client version(5.6.8).Its showing error as None of the configured nodes are available.

Here is the my java Example which I have taken from github(

Also i have tried from public network and different port combination 9243,9343.

So my Question is it possible to connect ES cloud(5.7) version with Transport Client.

Can some Please help me to resolve this issue.


FWIW you should look at which is probably closer to what to expect on a 5.x version.

May be share your code and the exact and full error message you are getting.

Please follow the formatting rules in this guideline: About the Elasticsearch category.

Hi Dadoonet,

I am using code exactly which you share in link with 9243,9343 port.Please find code and exception below.Also tried with public network.

Code :

public class TransportExample {

    public Logger logger = ESLoggerFactory.getLogger(getClass().getCanonicalName());
    // Note: If enabling IPv6, then you should ensure that your host and network can route it to the Cloud endpoint.
    // (eg Docker disables IPv6 routing by default) - see also the system property parsing code below.
    private boolean ip6Enabled = true;
    private boolean ip4Enabled = true;

    public static void main(String[] args)  {
        new TransportExample().run(args);

    public void run(String[] args) {
         String host = "";
        int port = Integer.parseInt(System.getProperty("port", "9343"));

        String hostBasedClusterName = host.split("\\.", 2)[0];
        String clusterName = System.getProperty("cluster", hostBasedClusterName);

        boolean enableSsl = Boolean.parseBoolean(System.getProperty("ssl", "true"));
        // Note: If enabling IPv6, then you should ensure that your host and network can route it to the Cloud endpoint.
        // (eg Docker disables IPv6 routing by default) - see also the initialization code at the top of this file.
        ip6Enabled = Boolean.parseBoolean(System.getProperty("ip6", "true"));
        ip4Enabled = Boolean.parseBoolean(System.getProperty("ip4", "true"));"Connecting to cluster: [{}] via [{}:{}] using ssl:[{}]", clusterName, host, port, enableSsl);

        // Build the settings for our client.
        Settings settings = Settings.builder()
            .put("client.transport.nodes_sampler_interval", "5s")
            .put("client.transport.sniff", false)
            .put("transport.tcp.compress", true)
            .put("", clusterName)
            .put("", enableSsl)
            .put("request.headers.X-Found-Cluster", "${}")
            .put("", "username:password")

        // Instantiate a TransportClient and add the cluster to the list of addresses to connect to.
        // Only port 9343 (SSL-encrypted) is currently supported. The use of X-Pack security features (formerly Shield) is required.
        TransportClient client = new PreBuiltXPackTransportClient(settings);
        try {
            for (InetAddress address : InetAddress.getAllByName(host)) {
                if ((ip6Enabled && address instanceof Inet6Address)
                        || (ip4Enabled && address instanceof Inet4Address)) {
                    client.addTransportAddress(new InetSocketTransportAddress(address, port));
        } catch (UnknownHostException e) {
            logger.error("Unable to get the host", e.getMessage());

        while(true) {
            try {
      "Getting cluster health... ");
                ActionFuture<ClusterHealthResponse> healthFuture = client.admin().cluster().health(Requests.clusterHealthRequest());
                ClusterHealthResponse healthResponse = healthFuture.get(5, TimeUnit.SECONDS);
      "Got cluster health response: [{}]", healthResponse.getStatus());
            } catch(Throwable t) {
                logger.error("Unable to get cluster health response: [{}]", t.getMessage());
            try {
            } catch (InterruptedException ie) { ie.printStackTrace(); }


08:25:01.339 [main] ERROR javaapplication21.TransportExample - Unable to get cluster health response: [None of the configured nodes are available: [{#transport#-1}{ZFOMH60GQgKMdxQMbzxY7Q}{}{}, {#transport#-2}{HJi0ZrhvQuyxXbmmMS-fPg}{}{}, {#transport#-3}{vKEGIwwJQ6uzUG55kfVvMA}{}{}, {#transport#-4}{0qTkNoKORrW-AHcZVomvMQ}{}{}, {#transport#-5}{NOHIVbq0Q--uPDF8jG-KYw}{}{}, {#transport#-6}{KZ7bCyrbTh6N21z06fLPYg}{}{}, {#transport#-7}{zSDlpeH1TDCdMmSRnIhKiA}{}{}, {#transport#-8}{ZOY_xv1GRTua5pJRbkTpAQ}{}{}]]


Can you try with port 9300?

Strangely the port 9200 of your instance seems to answer.

Hi Dadoonet,

Thanks for reply,I tried for both the port but still facing same issue.


May be contact your cloud support?
Please see 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.