# I/O dispatch worker terminated abnormally

**URL:** <https://discuss.elastic.co/t/i-o-dispatch-worker-terminated-abnormally/208002>\
**Category:** Elasticsearch\
**Created:** [November 15, 2019, 7:06am UTC](https://discuss.elastic.co/t/i-o-dispatch-worker-terminated-abnormally/208002 "2019-11-15T07:06:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gyana\_nayak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gyana_nayak/32/56498_2.png) [@gyana\_nayak](https://discuss.elastic.co/u/gyana_nayak)\
**Post date:** [November 15, 2019, 7:06am UTC](https://discuss.elastic.co/t/i-o-dispatch-worker-terminated-abnormally/208002/1 "2019-11-15T07:06:51Z")

</div>

Below code i have written to fetch all the records based on index, but getting exception

```auto
try (RestHighLevelClient client = new RestHighLevelClient(
				RestClient.builder(HttpHost.create("http://localhost:9200")))) {

			client.indices().getAsync(new GetIndexRequest("logs"), RequestOptions.DEFAULT,
					new ActionListener<GetIndexResponse>() {

						@Override
						public void onResponse(GetIndexResponse response) {

							MappingMetaData indexMappings = response.getMappings().get("logs");
							Map<String, Object> indexTypeMappings = indexMappings.getSourceAsMap();
							List<AliasMetaData> indexAliases = response.getAliases().get("logs");
							String numberOfShardsString = response.getSetting("logs", "logs.number_of_shards");
						}

						@Override
						public void onFailure(Exception e) {
							// TODO Auto-generated method stub

						}
					});
			client.close();
			return null;
		} catch (Exception e) {
			e.printStackTrace();
		}

```

```
Nov 15, 2019 12:17:51 PM org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1 run

    SEVERE: I/O reactor terminated abnormally

    org.apache.http.nio.reactor.IOReactorException: I/O dispatch worker terminated abnormally

    at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:359)

    at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:221)

    at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:64)

    at java.lang.Thread.run(Thread.java:748)
```

---

<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:** [December 13, 2019, 7:07am UTC](https://discuss.elastic.co/t/i-o-dispatch-worker-terminated-abnormally/208002/2 "2019-12-13T07:07:06Z")

</div>

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