Elasticsearch 5.3 Transport Client taking minutes to connect

We are using Transport Client to connect to elastic search cluster with 6 nodes on aws. It is taking 3 minutes to connect. Can anyone help with the same ? Following is code snippet.

             Settings settings = Settings.builder().put("cluster.name", clusterName).put("client.transport.sniff", true).build();
	TransportAddress[] nodes = new InetSocketTransportAddress[addresses.length];
	for (int idx = 0; idx < nodes.length; idx++) {
			nodes[idx] = new InetSocketTransportAddress(InetAddress.getByName(addresses[idx]), port);
	}
	client = new PreBuiltTransportClient(settings).addTransportAddresses(nodes);

Logs are as follows

13:41:50.702 [main] DEBUG org.elasticsearch.threadpool.ThreadPool - created thread pool: name [force_merge], size [1], queue size [unbounded]
13:41:50.703 [main] DEBUG org.elasticsearch.threadpool.ThreadPool - created thread pool: name [fetch_shard_started], core [1], max [8], keep alive [5m]
13:41:50.704 [main] DEBUG org.elasticsearch.threadpool.ThreadPool - created thread pool: name [listener], size [2], queue size [unbounded]
13:41:50.708 [main] DEBUG org.elasticsearch.threadpool.ThreadPool - created thread pool: name [index], size [4], queue size [200]
13:41:50.708 [main] DEBUG org.elasticsearch.threadpool.ThreadPool - created thread pool: name [refresh], core [1], max [2], keep alive [5m]
13:41:50.708 [main] DEBUG org.elasticsearch.threadpool.ThreadPool - created thread pool: name [generic], core [4], max [128], keep alive [30s]
13:41:50.709 [main] DEBUG org.elasticsearch.threadpool.ThreadPool - created thread pool: name [warmer], core [1], max [2], keep alive [5m]
13:41:50.709 [main] DEBUG org.elasticsearch.threadpool.ThreadPool - created thread pool: name [search], size [7], queue size [1k]
13:41:50.709 [main] DEBUG org.elasticsearch.threadpool.ThreadPool - created thread pool: name [flush], core [1], max [2], keep alive [5m]
13:41:50.709 [main] DEBUG org.elasticsearch.threadpool.ThreadPool - created thread pool: name [fetch_shard_store], core [1], max [8], keep alive [5m]
13:41:50.709 [main] DEBUG org.elasticsearch.threadpool.ThreadPool - created thread pool: name [management], core [1], max [5], keep alive [5m]
13:41:50.710 [main] DEBUG org.elasticsearch.threadpool.ThreadPool - created thread pool: name [get], size [4], queue size [1k]
13:41:50.710 [main] DEBUG org.elasticsearch.threadpool.ThreadPool - created thread pool: name [bulk], size [4], queue size [200]
13:41:50.710 [main] DEBUG org.elasticsearch.threadpool.ThreadPool - created thread pool: name [snapshot], core [1], max [2], keep alive [5m]

13:41:51.670 [main] DEBUG org.elasticsearch.client.transport.TransportClientNodesService - node_sampler_interval[5s]

13:41:51.723 [main] DEBUG org.elasticsearch.client.transport.TransportClientNodesService - adding address [{#transport#-1}{qgYGEoPsRsSScO6LnMdusw}{10.26.28.233}{10.26.28.233:9300}]

13:41:51.723 [main] DEBUG org.elasticsearch.client.transport.TransportClientNodesService - adding address [{#transport#-2}{29FiwGE9T3CdSxVNIBXN9A}{10.26.23.118}{10.26.23.118:9300}]

13:41:51.723 [main] DEBUG org.elasticsearch.client.transport.TransportClientNodesService - adding address [{#transport#-3}{iPUFSC4wQL2-EyyD9YGB5w}{10.26.24.206}{10.26.24.206:9300}]

13:41:51.723 [main] DEBUG org.elasticsearch.client.transport.TransportClientNodesService - adding address [{#transport#-4}{HO629PcxQXmH2rbfU28ZGg}{10.26.28.56}{10.26.28.56:9300}]

13:41:51.724 [main] DEBUG org.elasticsearch.client.transport.TransportClientNodesService - adding address [{#transport#-5}{zYLiPUI2RI6auLlgl-1smQ}{10.26.21.129}{10.26.21.129:9300}]

13:41:51.724 [main] DEBUG org.elasticsearch.client.transport.TransportClientNodesService - adding address [{#transport#-6}{ovHQIQNzQ4iPnjNztryv0A}{10.26.22.90}{10.26.22.90:9300}]

13:41:51.770 [elasticsearch[client][management][T#3]] DEBUG io.netty.buffer.AbstractByteBuf - -Dio.netty.buffer.bytebuf.checkAccessible: true

13:41:51.777 [elasticsearch[client][management][T#4]] DEBUG io.netty.util.Recycler - -Dio.netty.recycler.maxCapacity: 262144

13:41:51.824 [elasticsearch[client][management][T#2]] DEBUG org.elasticsearch.transport.netty4.Netty4Transport - connected to node [{#transport#-3}{iPUFSC4wQL2-EyyD9YGB5w}{10.26.24.206}{10.26.24.206:9300}]

13:41:51.824 [elasticsearch[client][management][T#3]] DEBUG org.elasticsearch.transport.netty4.Netty4Transport - connected to node [{#transport#-4}{HO629PcxQXmH2rbfU28ZGg}{10.26.28.56}{10.26.28.56:9300}]

13:41:51.825 [elasticsearch[client][management][T#1]] DEBUG org.elasticsearch.transport.netty4.Netty4Transport - connected to node [{#transport#-1}{qgYGEoPsRsSScO6LnMdusw}{10.26.28.233}{10.26.28.233:9300}]

13:41:51.825 [elasticsearch[client][management][T#4]] DEBUG org.elasticsearch.transport.netty4.Netty4Transport - connected to node [{#transport#-2}{29FiwGE9T3CdSxVNIBXN9A}{10.26.23.118}{10.26.23.118:9300}]

13:41:51.825 [elasticsearch[client][management][T#5]] DEBUG org.elasticsearch.transport.netty4.Netty4Transport - connected to node [{#transport#-5}{zYLiPUI2RI6auLlgl-1smQ}{10.26.21.129}{10.26.21.129:9300}]

13:41:51.853 [elasticsearch[client][management][T#4]] DEBUG org.elasticsearch.transport.netty4.Netty4Transport - connected to node [{#transport#-6}{ovHQIQNzQ4iPnjNztryv0A}{10.26.22.90}{10.26.22.90:9300}]

13:42:36.875 [main] DEBUG org.elasticsearch.transport.netty4.Netty4Transport - connected to node [{esdata-a6}{DQKRNG4CTv2voD7w4r7M4w}{gdoufwtiT6Kx1ByW9dZtNA}{10.26.24.206}{10.26.24.206:9300}]

13:42:36.883 [main] DEBUG org.elasticsearch.transport.netty4.Netty4Transport - connected to node [{esdata-a5}{lNKTDhsASLSRqCH60SbuHg}{utSPJP9jQmqnC4lfpdGPJA}{10.26.23.118}{10.26.23.118:9300}]

13:43:21.891 [main] DEBUG org.elasticsearch.transport.netty4.Netty4Transport - connected to node [{esdata-a9}{-_MEbYFdQxaMirw38PbrHQ}{YUn6GpE3TbySP3CdAt8Qew}{10.26.22.90}{10.26.22.90:9300}]

13:43:21.900 [main] DEBUG org.elasticsearch.transport.netty4.Netty4Transport - connected to node [{esdata-a4}{SwCNZUfYTlKUXG0zd01vAQ}{M-cc1gvfQ12uO0g8vtOJUg}{10.26.28.233}{10.26.28.233:9300}]

13:44:06.905 [main] DEBUG org.elasticsearch.transport.netty4.Netty4Transport - connected to node [{esdata-a7}{f4vBRJUjR-m11-_zm2_MUw}{kROruFYzStatgU6OKS-T_g}{10.26.28.56}{10.26.28.56:9300}]

13:44:51.909 [main] DEBUG org.elasticsearch.transport.netty4.Netty4Transport - connected to node [{esdata-a8}{J0n81Su1S2uQ2gn6wss8Dw}{tDfD3satRhyw-XoRVslglg}{10.26.21.129}{10.26.21.129:9300}]

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