# How to prevent RestHighLevelClient from blacklisting the Host in Elasticsearch 8.6.2?

**URL:** <https://discuss.elastic.co/t/how-to-prevent-resthighlevelclient-from-blacklisting-the-host-in-elasticsearch-8-6-2/327027>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [March 6, 2023, 5:27am UTC](https://discuss.elastic.co/t/how-to-prevent-resthighlevelclient-from-blacklisting-the-host-in-elasticsearch-8-6-2/327027 "2023-03-06T05:27:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_ite\_iew](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/_ite_iew/32/65296_2.png) [@\_ite\_iew](https://discuss.elastic.co/u/_ite_iew)\
**Post date:** [March 6, 2023, 5:27am UTC](https://discuss.elastic.co/t/how-to-prevent-resthighlevelclient-from-blacklisting-the-host-in-elasticsearch-8-6-2/327027/1 "2023-03-06T05:27:35Z")

</div>

I am using Elasticsearch client version 8.6

we use Elasticsearch as a service and other companies provided us an IP/port to connect to it.

we run heavy, numerous, automated queries against this Elasticsearch and sometimes I‌ see in the logs that the only Ip/port for this Elasticsearch gets blacklisted and this will cause elasticsearch load imbalance.

[DEBUG]-2023/02/19 11:28:01-[http-nio-6060-exec-14]-RestClient.onFailure(514) - added [[host=[http://xx.xx.xx.xx:3500]](http://xx.xx.xx.xx:3500%5D/)] to blacklist  
[DEBUG]-2023/02/19 11:28:01-[http-nio-6060-exec-7]-RestClient.onFailure(521) - updated [[host=[http://xx.xx.xx.xx:3500]](http://xx.xx.xx.xx:3500%5D/)] already in blacklist

---

<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:** [April 3, 2023, 5:28am UTC](https://discuss.elastic.co/t/how-to-prevent-resthighlevelclient-from-blacklisting-the-host-in-elasticsearch-8-6-2/327027/2 "2023-04-03T05:28:27Z")

</div>

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