# ES version 6.3. IOException: listener timeout after waiting for \[60000\] ms

**URL:** <https://discuss.elastic.co/t/es-version-6-3-ioexception-listener-timeout-after-waiting-for-60000-ms/135899>\
**Category:** Elasticsearch\
**Created:** [June 14, 2018, 10:15am UTC](https://discuss.elastic.co/t/es-version-6-3-ioexception-listener-timeout-after-waiting-for-60000-ms/135899 "2018-06-14T10:15:55Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![porunov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/porunov/32/32268_2.png) [@porunov](https://discuss.elastic.co/u/porunov)\
**Post date:** [June 14, 2018, 10:15am UTC](https://discuss.elastic.co/t/es-version-6-3-ioexception-listener-timeout-after-waiting-for-60000-ms/135899/1 "2018-06-14T10:15:55Z")

</div>

Hello,

I've just updated to elasticsearch version 6.3.0 and seems that rest high level client doesn't work there as has to.  
Right now I am using the next code to refresh indexes:

```auto
Settings settings = Settings.builder()
        .put("client.transport.sniff", true)
        .put("cluster.name", "test-signle-cluster")
        .build();

System.setProperty("es.set.netty.runtime.available.processors", "false");

TransportClient client = new PreBuiltTransportClient(settings);
client.addTransportAddress(new TransportAddress(InetAddress.getByName("192.168.56.50"), 9300));

```

And then use the next method to refresh indices:  
`transportClient.admin().indices().prepareRefresh().get()`

Now, I would like to update my client to use REST High Level Client. I've changed my code to:

```auto
System.setProperty("es.set.netty.runtime.available.processors", "false");

RestClientBuilder restClientBuilder = RestClient.builder(new HttpHost("192.168.56.50", 9200, "http"));
restClientBuilder.setRequestConfigCallback(new RestClientBuilder.RequestConfigCallback() {
    @Override
    public RequestConfig.Builder customizeRequestConfig(RequestConfig.Builder requestConfigBuilder) {
        return requestConfigBuilder.setConnectTimeout(60000).setSocketTimeout(60000)
                .setConnectionRequestTimeout(0);
    }
});
restClientBuilder.setMaxRetryTimeoutMillis(60000);
RestHighLevelClient client = new RestHighLevelClient(restClientBuilder);

```

And now I try to refresh indices with the next code:  
`client.indices().refresh(new RefreshRequest());`

Unfortunately I am getting an error when I am trying to refresh indices:

```auto
java.io.IOException: listener timeout after waiting for [60000] ms
        at org.elasticsearch.client.RestClient$SyncResponseListener.get(RestClient.java:684)
...

```

Here is the full log: [http://paste.openstack.org/show/723460/](http://paste.openstack.org/show/723460/)

Here is my gradle dependencies:

```auto
compile "org.elasticsearch:elasticsearch:6.3.0"
compile "org.elasticsearch.client:elasticsearch-rest-high-level-client:6.3.0"
compile "org.elasticsearch.client:elasticsearch-rest-client:6.3.0"
compile "org.elasticsearch.client:transport:6.3.0"

```

Does anyone know why is it happening? My elasticsearch 6.3.0 is running under virtual machine. All ports are open. I can perform requests by using `curl` to port 9200 but REST High Level Client doesn't work.

Best regards

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 14, 2018, 10:39am UTC](https://discuss.elastic.co/t/es-version-6-3-ioexception-listener-timeout-after-waiting-for-60000-ms/135899/2 "2018-06-14T10:39:42Z")

</div>

Can you share your elasticsearch logs please?

Also can you run this from the same machine the code is running:

```auto
curl 192.168.56.50:9200

```

---

<div class="post-metadata">

**Author:** ![porunov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/porunov/32/32268_2.png) [@porunov](https://discuss.elastic.co/u/porunov)\
**Post date:** [June 14, 2018, 10:47am UTC](https://discuss.elastic.co/t/es-version-6-3-ioexception-listener-timeout-after-waiting-for-60000-ms/135899/3 "2018-06-14T10:47:50Z")

</div>

Yes, sure.

Here is `curl` execution from the same machine the code is running:

```auto
$ curl 192.168.56.50:9200
{
  "name" : "test-data-1",
  "cluster_name" : "test-signle-cluster",
  "cluster_uuid" : "hz8o0onWThqy6xL7T7OhDQ",
  "version" : {
    "number" : "6.3.0",
    "build_flavor" : "default",
    "build_type" : "rpm",
    "build_hash" : "424e937",
    "build_date" : "2018-06-11T23:38:03.357887Z",
    "build_snapshot" : false,
    "lucene_version" : "7.3.1",
    "minimum_wire_compatibility_version" : "5.6.0",
    "minimum_index_compatibility_version" : "5.0.0"
  },
  "tagline" : "You Know, for Search"
}

```

Here is my logs from `/var/log/elasticsearch/test-signle-cluster.log`: [http://paste.openstack.org/show/723461/](http://paste.openstack.org/show/723461/)

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 14, 2018, 11:32am UTC](https://discuss.elastic.co/t/es-version-6-3-ioexception-listener-timeout-after-waiting-for-60000-ms/135899/4 "2018-06-14T11:32:23Z")

</div>

Normally you need only to import:

```auto
compile "org.elasticsearch.client:elasticsearch-rest-high-level-client:6.3.0"

```

Anyway, that's really strange. I just started a 6.3.0 and I'm able to use the client without any problem.

Could you remove this part and test again?

```auto
restClientBuilder.setRequestConfigCallback(new RestClientBuilder.RequestConfigCallback() {
    @Override
    public RequestConfig.Builder customizeRequestConfig(RequestConfig.Builder requestConfigBuilder) {
        return requestConfigBuilder.setConnectTimeout(60000).setSocketTimeout(60000)
                .setConnectionRequestTimeout(0);
    }
});
restClientBuilder.setMaxRetryTimeoutMillis(60000);

```

So you will just have:

```auto
System.setProperty("es.set.netty.runtime.available.processors", "false");

RestClientBuilder restClientBuilder = RestClient.builder(new HttpHost("192.168.56.50", 9200, "http"));
RestHighLevelClient client = new RestHighLevelClient(restClientBuilder);

// ....

client.indices().refresh(new RefreshRequest());

```

---

<div class="post-metadata">

**Author:** ![porunov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/porunov/32/32268_2.png) [@porunov](https://discuss.elastic.co/u/porunov)\
**Post date:** [June 14, 2018, 12:12pm UTC](https://discuss.elastic.co/t/es-version-6-3-ioexception-listener-timeout-after-waiting-for-60000-ms/135899/5 "2018-06-14T12:12:45Z")

</div>

Ow now. Sorry for wasting your time. Actually, everything works.  
I was actually passing a parameter with the host name into `new HttpHost(myHost, port, scheme)` and the problem was that I by mistake passed there a wrong host parameter.  
Sorry again for wasting your time!

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 14, 2018, 12:31pm UTC](https://discuss.elastic.co/t/es-version-6-3-ioexception-listener-timeout-after-waiting-for-60000-ms/135899/6 "2018-06-14T12:31:23Z")

</div>

No problem. Glad you figured it out.

---

<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 12, 2018, 12:31pm UTC](https://discuss.elastic.co/t/es-version-6-3-ioexception-listener-timeout-after-waiting-for-60000-ms/135899/7 "2018-07-12T12:31:23Z")

</div>

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