# ES 6.3.0 RestClient ConnectionException while executing BulkProcessor

**URL:** <https://discuss.elastic.co/t/es-6-3-0-restclient-connectionexception-while-executing-bulkprocessor/137840>\
**Category:** Elasticsearch\
**Created:** [June 28, 2018, 6:09pm UTC](https://discuss.elastic.co/t/es-6-3-0-restclient-connectionexception-while-executing-bulkprocessor/137840 "2018-06-28T18:09:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gmarshall56](https://avatars.discourse-cdn.com/v4/letter/g/bbe5ce/32.png) [@gmarshall56](https://discuss.elastic.co/u/gmarshall56)\
**Post date:** [June 28, 2018, 6:09pm UTC](https://discuss.elastic.co/t/es-6-3-0-restclient-connectionexception-while-executing-bulkprocessor/137840/1 "2018-06-28T18:09:01Z")

</div>

Hello:  
I am running a process that builds an index by reading a relational database table containing over 26,000 rows.

The indexing process appears to have run successfully however after looking through the log file - which btw contains over 100KB of messages written by this process - I see a few java.net.ConnectException exceptions written to the file. They look like:

2018-06-28 13:25:40 DEBUG InternalHttpAsyncClient:333 - [exchange: 36] connection request failed  
2018-06-28 13:25:40 DEBUG RestClient:92 - request [POST [http://localhost:9201/\_bulk?timeout=1m](http://localhost:9201/_bulk?timeout=1m)] failed  
java.net.ConnectException: Connection refused: no further information  
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)  
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)  
at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvent(DefaultConnectingIOReactor.java:171)  
at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:145)  
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:348)  
at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:192)  
at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:64)  
at java.lang.Thread.run(Thread.java:748)

As I said it appears that all of the rows from the table have been indexed. Do I need to be concerned about this?

Thank you  
Gary

---

<div class="post-metadata">

**Author:** ![javanna](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/javanna/32/4698_2.png) [@javanna](https://discuss.elastic.co/u/javanna)\
**Post date:** [July 6, 2018, 9:42am UTC](https://discuss.elastic.co/t/es-6-3-0-restclient-connectionexception-while-executing-bulkprocessor/137840/2 "2018-07-06T09:42:19Z")

</div>

Hi,  
did you have multiple nodes configured in your client? If so, how many? The rest client retries on connection failure the next node in the list, so if it is the whole bulk request to fail due to a connection exception, and the next node works ok, the documents will all be indexed without users notice this. That is one of the advantages of using our own client, both low-level and high-level.

Cheers  
Luca

---

<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:** [August 3, 2018, 9:42am UTC](https://discuss.elastic.co/t/es-6-3-0-restclient-connectionexception-while-executing-bulkprocessor/137840/3 "2018-08-03T09:42:21Z")

</div>

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