# Exception during indexing on the cluster

**URL:** <https://discuss.elastic.co/t/exception-during-indexing-on-the-cluster/6447>\
**Category:** Elasticsearch\
**Created:** [January 19, 2012, 10:23pm UTC](https://discuss.elastic.co/t/exception-during-indexing-on-the-cluster/6447 "2012-01-19T22:23:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Slava\_G](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@Slava\_G](https://discuss.elastic.co/u/Slava_G)\
**Post date:** [January 19, 2012, 10:23pm UTC](https://discuss.elastic.co/t/exception-during-indexing-on-the-cluster/6447/1 "2012-01-19T22:23:49Z")

</div>

Hi,  
I have stand-alone server with ES and also I have a cluster (2 EC2 nodes)  
of ES.  
I'm doing next 2 lines :

IndexRequestBuilder indexRequest =  
client.prepareIndex("12345").setSource("doc");  
IndexResponse response = indexRequest.execute().actionGet();

When I execute indexing on stand alone machine everything is working fine,  
but when I'm doing the same index on the cluster I got this exception:  
org.elasticsearch.common.util.concurrent.UncategorizedExecutionException:  
Failed execution  
at  
org.elasticsearch.action.support.AdapterActionFuture.rethrowExecutionException(AdapterActionFuture.java:85)  
at  
org.elasticsearch.action.support.AdapterActionFuture.actionGet(AdapterActionFuture.java:48)  
at com.cl.DataIndexer.index(DataIndexer.java:44)  
at com.cl.taskindexers.MailIndexer.indexMessage(MailIndexer.java:107)  
at com.cl.taskindexers.MailIndexer.reWork(MailIndexer.java:71)  
at  
com.cl.reworkers.AbstractTaskReWorker.runTask(AbstractTaskReWorker.java:96)  
at  
com.cl.taskindexers.GoogleAppsIndexer.runTask(GoogleAppsIndexer.java:26)  
at  
com.cl.worker.AbstractTaskProcessor.executeTask(AbstractTaskProcessor.java:92)  
at com.cl.toolsworker.ToolsWorkerThread.call(ToolsWorkerThread.java:48)  
at com.cl.toolsworker.ToolsWorkerThread.call(ToolsWorkerThread.java:12)  
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)  
at java.util.concurrent.FutureTask.run(FutureTask.java:138)  
at  
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)  
at  
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)  
at java.lang.Thread.run(Thread.java:662)  
Jan 19 22:10:39 Caused by: java.util.concurrent.ExecutionException:  
java.util.concurrent.RejectedExecutionException  
at  
org.elasticsearch.common.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:263)  
at  
org.elasticsearch.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:250)  
at  
org.elasticsearch.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:78)  
at  
org.elasticsearch.action.support.AdapterActionFuture.actionGet(AdapterActionFuture.java:44)  
... 13 more  
Jan 19 22:10:39 Caused by: java.util.concurrent.RejectedExecutionException  
at  
java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1768)  
at  
java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:767)  
at  
java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:658)  
at  
org.elasticsearch.transport.TransportService.sendRequest(TransportService.java:197)  
at  
org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.start(TransportShardReplicationOperationAction.java:408)  
at  
org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.start(TransportShardReplicationOperationAction.java:331)  
at  
org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction.doExecute(TransportShardReplicationOperationAction.java:112)  
at  
org.elasticsearch.action.index.TransportIndexAction.innerExecute(TransportIndexAction.java:128)  
at  
org.elasticsearch.action.index.TransportIndexAction.doExecute(TransportIndexAction.java:114)  
at  
org.elasticsearch.action.index.TransportIndexAction.doExecute(TransportIndexAction.java:69)  
at  
org.elasticsearch.action.support.BaseAction.execute(BaseAction.java:61)  
at org.elasticsearch.client.node.NodeClient.index(NodeClient.java:130)  
at  
org.elasticsearch.client.action.index.IndexRequestBuilder.doExecute(IndexRequestBuilder.java:338)  
at  
org.elasticsearch.client.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:56)  
at  
org.elasticsearch.client.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:51)  
... 13 more

Please advise.

Thank You and Best Regards.

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [January 19, 2012, 11:03pm UTC](https://discuss.elastic.co/t/exception-during-indexing-on-the-cluster/6447/2 "2012-01-19T23:03:10Z")

</div>

Is there a chance that your node is closed? Did not follow the stand-aline  
and cluster, you mean you get it when you work only against the stand alone  
node?

On Fri, Jan 20, 2012 at 12:23 AM, slavag [slavago@gmail.com](mailto:slavago@gmail.com) wrote:

> Hi,  
> I have stand-alone server with ES and also I have a cluster (2 EC2 nodes)  
> of ES.  
> I'm doing next 2 lines :
> 
> IndexRequestBuilder indexRequest =  
> client.prepareIndex("12345").setSource("doc");  
> IndexResponse response = indexRequest.execute().actionGet();
> 
> When I execute indexing on stand alone machine everything is working  
> fine, but when I'm doing the same index on the cluster I got this exception:  
> org.elasticsearch.common.util.concurrent.UncategorizedExecutionException:  
> Failed execution  
> at  
> org.elasticsearch.action.support.AdapterActionFuture.rethrowExecutionException(AdapterActionFuture.java:85)  
> at  
> org.elasticsearch.action.support.AdapterActionFuture.actionGet(AdapterActionFuture.java:48)  
> at com.cl.DataIndexer.index(DataIndexer.java:44)  
> at com.cl.taskindexers.MailIndexer.indexMessage(MailIndexer.java:107)  
> at com.cl.taskindexers.MailIndexer.reWork(MailIndexer.java:71)  
> at  
> com.cl.reworkers.AbstractTaskReWorker.runTask(AbstractTaskReWorker.java:96)  
> at  
> com.cl.taskindexers.GoogleAppsIndexer.runTask(GoogleAppsIndexer.java:26)  
> at  
> com.cl.worker.AbstractTaskProcessor.executeTask(AbstractTaskProcessor.java:92)  
> at com.cl.toolsworker.ToolsWorkerThread.call(ToolsWorkerThread.java:48)  
> at com.cl.toolsworker.ToolsWorkerThread.call(ToolsWorkerThread.java:12)  
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)  
> at java.util.concurrent.FutureTask.run(FutureTask.java:138)  
> at  
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)  
> at  
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)  
> at java.lang.Thread.run(Thread.java:662)  
> Jan 19 22:10:39 Caused by: java.util.concurrent.ExecutionException:  
> java.util.concurrent.RejectedExecutionException  
> at  
> org.elasticsearch.common.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:263)  
> at  
> org.elasticsearch.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:250)  
> at  
> org.elasticsearch.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:78)  
> at  
> org.elasticsearch.action.support.AdapterActionFuture.actionGet(AdapterActionFuture.java:44)  
> ... 13 more  
> Jan 19 22:10:39 Caused by: java.util.concurrent.RejectedExecutionException  
> at  
> java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1768)  
> at  
> java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:767)  
> at  
> java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:658)  
> at  
> org.elasticsearch.transport.TransportService.sendRequest(TransportService.java:197)  
> at  
> org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.start(TransportShardReplicationOperationAction.java:408)  
> at  
> org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.start(TransportShardReplicationOperationAction.java:331)  
> at  
> org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction.doExecute(TransportShardReplicationOperationAction.java:112)  
> at  
> org.elasticsearch.action.index.TransportIndexAction.innerExecute(TransportIndexAction.java:128)  
> at  
> org.elasticsearch.action.index.TransportIndexAction.doExecute(TransportIndexAction.java:114)  
> at  
> org.elasticsearch.action.index.TransportIndexAction.doExecute(TransportIndexAction.java:69)  
> at  
> org.elasticsearch.action.support.BaseAction.execute(BaseAction.java:61)  
> at org.elasticsearch.client.node.NodeClient.index(NodeClient.java:130)  
> at  
> org.elasticsearch.client.action.index.IndexRequestBuilder.doExecute(IndexRequestBuilder.java:338)  
> at  
> org.elasticsearch.client.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:56)  
> at  
> org.elasticsearch.client.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:51)  
> ... 13 more
> 
> Please advise.
> 
> Thank You and Best Regards.

---

<div class="post-metadata">

**Author:** ![Slava\_G](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@Slava\_G](https://discuss.elastic.co/u/Slava_G)\
**Post date:** [January 20, 2012, 5:40am UTC](https://discuss.elastic.co/t/exception-during-indexing-on-the-cluster/6447/3 "2012-01-20T05:40:10Z")

</div>

Hi Shay,  
The problems occurs when I working against the cluster. When I working  
against stand-alone machine with ES - everything is fine.  
And about ht e node - no, it's running well, not closed.

Best Regards.

---

<div class="post-metadata">

**Author:** ![Slava\_G](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@Slava\_G](https://discuss.elastic.co/u/Slava_G)\
**Post date:** [January 20, 2012, 5:16pm UTC](https://discuss.elastic.co/t/exception-during-indexing-on-the-cluster/6447/4 "2012-01-20T17:16:55Z")

</div>

Ok, I found the problem and it's again my bad :-).

Thank You.

---

<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 6, 2017, 3:41am UTC](https://discuss.elastic.co/t/exception-during-indexing-on-the-cluster/6447/5 "2017-07-06T03:41:58Z")

</div>


