# Warning about failed to invoke before shard closed callback

**URL:** <https://discuss.elastic.co/t/warning-about-failed-to-invoke-before-shard-closed-callback/20888>\
**Category:** Elasticsearch\
**Created:** [November 21, 2014, 1:14pm UTC](https://discuss.elastic.co/t/warning-about-failed-to-invoke-before-shard-closed-callback/20888 "2014-11-21T13:14:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bernd\_Fehling\_2](https://avatars.discourse-cdn.com/v4/letter/b/d07c76/32.png) [@Bernd\_Fehling\_2](https://discuss.elastic.co/u/Bernd_Fehling_2)\
**Post date:** [November 21, 2014, 1:14pm UTC](https://discuss.elastic.co/t/warning-about-failed-to-invoke-before-shard-closed-callback/20888/1 "2014-11-21T13:14:03Z")

</div>

I have a cluster with four shards with one replica.  
Each master is with one replica in one java instance.

Any idea what can cause this warning?  
[WARN][indices] [node\_01] [myindex][0] failed to invoke  
before shard closed callback  
org.elasticsearch.index.IndexShardMissingException: [myindex][0] missing  
at  
org.elasticsearch.index.service.InternalIndexService.shardInjectorSafe(InternalIndexService.java:292)  
at  
de.ubbielefeld.elasticsearch.service.suggest.SuggestService$2.beforeIndexShardClosed(SuggestService.java:74)  
at  
org.elasticsearch.indices.InternalIndicesLifecycle.beforeIndexShardClosed(InternalIndicesLifecycle.java:148)  
at  
org.elasticsearch.index.service.InternalIndexService.removeShard(InternalIndexService.java:376)  
at  
org.elasticsearch.indices.cluster.IndicesClusterStateService.applyDeletedShards(IndicesClusterStateService.java:287)  
at  
org.elasticsearch.indices.cluster.IndicesClusterStateService.clusterChanged(IndicesClusterStateService.java:183)  
at  
org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:424)  
at  
org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:134)  
at  
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)  
at  
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)  
at java.lang.Thread.run(Thread.java:745)

May be a timeout somewhere?

I see the warning when starting the cluster, but also when rerouting a  
shard from one node to another.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/9972730b-b862-4a2c-aed4-4da2ad85ec6d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/9972730b-b862-4a2c-aed4-4da2ad85ec6d%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [November 21, 2014, 1:27pm UTC](https://discuss.elastic.co/t/warning-about-failed-to-invoke-before-shard-closed-callback/20888/2 "2014-11-21T13:27:50Z")

</div>

It seems there is a bug in

de.ubbielefeld.elasticsearch.service.suggest.SuggestService

which is not aware of a moved shard.

Jörg

On Fri, Nov 21, 2014 at 2:14 PM, Bernd Fehling [bernd.fehling@gmail.com](mailto:bernd.fehling@gmail.com)  
wrote:

> I have a cluster with four shards with one replica.  
> Each master is with one replica in one java instance.
> 
> Any idea what can cause this warning?  
> [WARN][indices] [node\_01] [myindex][0] failed to invoke  
> before shard closed callback  
> org.elasticsearch.index.IndexShardMissingException: [myindex][0] missing  
> at  
> org.elasticsearch.index.service.InternalIndexService.shardInjectorSafe(InternalIndexService.java:292)  
> at  
> de.ubbielefeld.elasticsearch.service.suggest.SuggestService$2.beforeIndexShardClosed(SuggestService.java:74)  
> at  
> org.elasticsearch.indices.InternalIndicesLifecycle.beforeIndexShardClosed(InternalIndicesLifecycle.java:148)  
> at  
> org.elasticsearch.index.service.InternalIndexService.removeShard(InternalIndexService.java:376)  
> at  
> org.elasticsearch.indices.cluster.IndicesClusterStateService.applyDeletedShards(IndicesClusterStateService.java:287)  
> at  
> org.elasticsearch.indices.cluster.IndicesClusterStateService.clusterChanged(IndicesClusterStateService.java:183)  
> at  
> org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:424)  
> at  
> org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:134)  
> at  
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)  
> at  
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)  
> at java.lang.Thread.run(Thread.java:745)
> 
> May be a timeout somewhere?
> 
> I see the warning when starting the cluster, but also when rerouting a  
> shard from one node to another.
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/9972730b-b862-4a2c-aed4-4da2ad85ec6d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/9972730b-b862-4a2c-aed4-4da2ad85ec6d%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/9972730b-b862-4a2c-aed4-4da2ad85ec6d%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/9972730b-b862-4a2c-aed4-4da2ad85ec6d%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGWeZeH\_kvThexchDSoH8rB3rc%2B%2BXdThLi3J%3DUvFdiYwg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGWeZeH_kvThexchDSoH8rB3rc%2B%2BXdThLi3J%3DUvFdiYwg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Bernd\_Fehling\_2](https://avatars.discourse-cdn.com/v4/letter/b/d07c76/32.png) [@Bernd\_Fehling\_2](https://discuss.elastic.co/u/Bernd_Fehling_2)\
**Post date:** [November 21, 2014, 1:49pm UTC](https://discuss.elastic.co/t/warning-about-failed-to-invoke-before-shard-closed-callback/20888/3 "2014-11-21T13:49:41Z")

</div>

Yeah, could also be the cause when starting the cluster node after node.

Any source code somewhere around where I can see how to make my  
SuggestService  
aware for moved shards?

Bernd

Am Freitag, 21. November 2014 14:28:02 UTC+1 schrieb Jörg Prante:

> It seems there is a bug in
> 
> de.ubbielefeld.elasticsearch.service.suggest.SuggestService
> 
> which is not aware of a moved shard.
> 
> Jörg
> 
> On Fri, Nov 21, 2014 at 2:14 PM, Bernd Fehling \<[bernd....@gmail.com](mailto:bernd....@gmail.com)  
> \<javascript:\>\> wrote:
> 
> > I have a cluster with four shards with one replica.  
> > Each master is with one replica in one java instance.
> > 
> > Any idea what can cause this warning?  
> > [WARN][indices] [node\_01] [myindex][0] failed to  
> > invoke before shard closed callback  
> > org.elasticsearch.index.IndexShardMissingException: [myindex][0] missing  
> > at  
> > org.elasticsearch.index.service.InternalIndexService.shardInjectorSafe(InternalIndexService.java:292)  
> > at  
> > de.ubbielefeld.elasticsearch.service.suggest.SuggestService$2.beforeIndexShardClosed(SuggestService.java:74)  
> > at  
> > org.elasticsearch.indices.InternalIndicesLifecycle.beforeIndexShardClosed(InternalIndicesLifecycle.java:148)  
> > at  
> > org.elasticsearch.index.service.InternalIndexService.removeShard(InternalIndexService.java:376)  
> > at  
> > org.elasticsearch.indices.cluster.IndicesClusterStateService.applyDeletedShards(IndicesClusterStateService.java:287)  
> > at  
> > org.elasticsearch.indices.cluster.IndicesClusterStateService.clusterChanged(IndicesClusterStateService.java:183)  
> > at  
> > org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:424)  
> > at  
> > org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:134)  
> > at  
> > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)  
> > at  
> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)  
> > at java.lang.Thread.run(Thread.java:745)
> > 
> > May be a timeout somewhere?
> > 
> > I see the warning when starting the cluster, but also when rerouting a  
> > shard from one node to another.
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/9972730b-b862-4a2c-aed4-4da2ad85ec6d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/9972730b-b862-4a2c-aed4-4da2ad85ec6d%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/9972730b-b862-4a2c-aed4-4da2ad85ec6d%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/9972730b-b862-4a2c-aed4-4da2ad85ec6d%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/8505ed9e-c175-4f1c-bd87-35ddf478b1cd%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8505ed9e-c175-4f1c-bd87-35ddf478b1cd%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 12:48am UTC](https://discuss.elastic.co/t/warning-about-failed-to-invoke-before-shard-closed-callback/20888/4 "2017-07-06T00:48:27Z")

</div>


