# Listener timeout after waiting for \[30000\] ms in RestHightLevel Client

**URL:** <https://discuss.elastic.co/t/listener-timeout-after-waiting-for-30000-ms-in-resthightlevel-client/179643>\
**Category:** Elasticsearch\
**Created:** [May 4, 2019, 10:05pm UTC](https://discuss.elastic.co/t/listener-timeout-after-waiting-for-30000-ms-in-resthightlevel-client/179643 "2019-05-04T22:05:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sanjay\_Das](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sanjay_das/32/41444_2.png) [@Sanjay\_Das](https://discuss.elastic.co/u/Sanjay_Das)\
**Post date:** [May 4, 2019, 10:05pm UTC](https://discuss.elastic.co/t/listener-timeout-after-waiting-for-30000-ms-in-resthightlevel-client/179643/1 "2019-05-04T22:05:30Z")

</div>

Hi I am facing error on Elasticsearch rest hight level client. I checked with elasticsearch host, but it is working correctly. I can able to fetch the data by doing GET request. Even , when I start my java application , it fetches data from elastic gracefully. But after some time (1or 2 day later) , the application starts throwing  
_**listener timeout after waiting for [30000] ms**_ on any search query. Manually(using curl) I am able get the data from same elasticseach host. I dint find any way , so reach out here only.

my piece of code

> private RestHighLevelClient createElasticClient() {  
> RestHighLevelClient client = null;  
> try {  
> String elasticUrl = elDashboardConfService.getElasticSearchUrl();  
> log.info("Building RestHighLevelClient for: {}", elasticUrl);  
> client = new RestHighLevelClient(  
> RestClient.builder(HttpHost.create(elasticUrl)));  
> } catch (Exception e) {  
> log.error(e.getMessage());  
> }  
> return client;  
> }

If I restart my application , again it starts working correctly.  
I went through this discussion [Rest Client listener timeout after waiting for [30000] ms - #5 by ajit](https://discuss.elastic.co/t/rest-client-listener-timeout-after-waiting-for-30000-ms/101326/5). I dint find my solution there.

---

<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:** [June 1, 2019, 10:05pm UTC](https://discuss.elastic.co/t/listener-timeout-after-waiting-for-30000-ms-in-resthightlevel-client/179643/2 "2019-06-01T22:05:35Z")

</div>

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