# Connect to load balancer from high level rest client

**URL:** <https://discuss.elastic.co/t/connect-to-load-balancer-from-high-level-rest-client/229935>\
**Category:** Elasticsearch\
**Created:** [April 27, 2020, 9:43am UTC](https://discuss.elastic.co/t/connect-to-load-balancer-from-high-level-rest-client/229935 "2020-04-27T09:43:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AshishUser](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ashishuser/32/58854_2.png) [@AshishUser](https://discuss.elastic.co/u/AshishUser)\
**Post date:** [April 27, 2020, 9:43am UTC](https://discuss.elastic.co/t/connect-to-load-balancer-from-high-level-rest-client/229935/1 "2020-04-27T09:43:59Z")

</div>

Hi

I am trying to connect to elastic search LB URL using high level rest client but getting following error:  
Caused by: java.net.UnknownHostException:  
I was able to communicate to individual nodes do we need to do something differently to connect to LB

i am following this link for https communication -  
[https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/\_encrypted\_communication.html](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/_encrypted_communication.html)

---

<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:** [May 25, 2020, 9:44am UTC](https://discuss.elastic.co/t/connect-to-load-balancer-from-high-level-rest-client/229935/2 "2020-05-25T09:44:03Z")

</div>

Closed on May 25, 2020, 9:44am UTC

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