# Проблемы с Transport client and elasticsearch cluster behind load balancer

**URL:** <https://discuss.elastic.co/t/transport-client-and-elasticsearch-cluster-behind-load-balancer/34992>\
**Category:** Вопросы на русском языке\
**Created:** [November 18, 2015, 8:37pm UTC](https://discuss.elastic.co/t/transport-client-and-elasticsearch-cluster-behind-load-balancer/34992 "2015-11-18T20:37:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tanjok](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tanjok/32/22686_2.png) [@tanjok](https://discuss.elastic.co/u/tanjok)\
**Post date:** [November 18, 2015, 8:37pm UTC](https://discuss.elastic.co/t/transport-client-and-elasticsearch-cluster-behind-load-balancer/34992/1 "2015-11-18T20:37:08Z")

</div>

привет,

я прошу меня извенить, но я не в состояние сформулировать мой вопрос по русски, поэтому попытаюсь по англиски.  
Может быть кто-нибудь здесь мне может помочь.

I try to use elasticsearch for "search suggestion" in a java-webapplication.  
There are 2 nodes in the cluster behind a load balancer.  
I use elasticsearch 1.5

My problem is, if I use Transport Client with node host addresses there is no problem.

Client transportClient = new TransportClient(settings())  
.addTransportAddress(new InetSocketTransportAddress("elastic-suggest1.de", 9300))  
.addTransportAddress(new InetSocketTransportAddress("elastic-suggest2.de", 9300));

but if I try to use the load balancer with load balancer host address

Client client = new TransportClient(settings())  
.addTransportAddress(new InetSocketTransportAddress("load\_balancer\_host.de", 80));

I get an error  
elasticsearch[Blue Diamond][transport\_client\_worker][T#20]{New I/O worker #20} deploymentPhase   
WARN org.elasticsearch.transport.netty - [Blue Diamond] exception caught on transport layer [[id: 0x6f6cd7f0, /xx.xxx.xxx.xxx:41411 =\> load\_balancer\_host.de/xx.xxx.xxx.xxx:80]], closing connection  
java.io.IOException: Die Wartezeit fuer die Verbindung ist abgelaufen // =time out  
at sun.nio.ch.FileDispatcherImpl.read0(Native Method)  
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)  
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)  
at sun.nio.ch.IOUtil.read(IOUtil.java:192)  
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:384)  
at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:64)  
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)  
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)  
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)  
at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)  
at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)  
at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)  
at java.lang.Thread.run(Thread.java:745)

and then  
None of the configured nodes were available: [[suggest1][l6ReVYRRSeqz8CT9aSHnEA][elastic-suggest1.de][inet[load\_balancer\_host.de/xx.xxx.xxx.xxx:80]]]

Can somebody help me to find a solution for this problem?

Спасибо,  
Таня

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [November 19, 2015, 3:08am UTC](https://discuss.elastic.co/t/transport-client-and-elasticsearch-cluster-behind-load-balancer/34992/2 "2015-11-19T03:08:03Z")

</div>

Не был уверен на каком языке отвечать, поэтому ответил в английском в английской категории 😄

---

<div class="post-metadata">

**Author:** ![tanjok](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tanjok/32/22686_2.png) [@tanjok](https://discuss.elastic.co/u/tanjok)\
**Post date:** [November 19, 2015, 8:46am UTC](https://discuss.elastic.co/t/transport-client-and-elasticsearch-cluster-behind-load-balancer/34992/3 "2015-11-19T08:46:18Z")

</div>

Доброе утро Игорь,

огромное спасибо за ответ. Все поняла.  
Может вы мне подскажите какой REST Client я могла бы исползывать in java Application  
Может быть JEST?

Таня

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [November 19, 2015, 2:38pm UTC](https://discuss.elastic.co/t/transport-client-and-elasticsearch-cluster-behind-load-balancer/34992/4 "2015-11-19T14:38:37Z")

</div>

Да, пока что официального REST клиента для java нет.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:50pm UTC](https://discuss.elastic.co/t/transport-client-and-elasticsearch-cluster-behind-load-balancer/34992/5 "2017-07-06T13:50:36Z")

</div>


