# ClusterBlockException during integration test

**URL:** https://discuss.elastic.co/t/clusterblockexception-during-integration-test/4125
**Category:** Elasticsearch
**Created:** [March 18, 2011, 9:28am UTC](https://discuss.elastic.co/t/clusterblockexception-during-integration-test/4125 "2011-03-18T09:28:24Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Alois\_Cochard](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alois_cochard/32/3176_2.png) [@Alois\_Cochard](https://discuss.elastic.co/u/Alois_Cochard)
#### Post date: [March 18, 2011, 9:28am UTC](https://discuss.elastic.co/t/clusterblockexception-during-integration-test/4125/1 "2011-03-18T09:28:24Z")

</div>

Hey all !

I've some simple integration test (add an entry then get it, or simple  
stuff like that) that start a node, from time to time ([pseudo]-  
randomly) I've got the following exception:

org.elasticsearch.cluster.block.ClusterBlockException: blocked by: [1/  
not recovered from gateway];  
at  
org.elasticsearch.cluster.block.ClusterBlocks.indexBlockedRaiseException(ClusterBlocks.java:  
112)  
at  
org.elasticsearch.action.admin.indices.create.TransportCreateIndexAction.checkBlock(TransportCreateIndexAction.java:  
65)  
at  
org.elasticsearch.action.admin.indices.create.TransportCreateIndexAction.checkBlock(TransportCreateIndexAction.java:  
42)  
at  
org.elasticsearch.action.support.master.TransportMasterNodeOperationAction  
$1.run(TransportMasterNodeOperationAction.java:91)  
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:619)

Does anyone experimented the same issue ? any idea why this happen ?

Thanks a lot,

Alois Cochard

> **[Alois Cochard's Blog](http://aloiscochard.blogspot.com)**
>
> Computer Development

  
[http://twitter.com/aloiscochard](http://twitter.com/aloiscochard)

---

<div class="post-metadata">

### Author: ![Alois\_Cochard](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alois_cochard/32/3176_2.png) [@Alois\_Cochard](https://discuss.elastic.co/u/Alois_Cochard)
#### Post date: [March 18, 2011, 9:30am UTC](https://discuss.elastic.co/t/clusterblockexception-during-integration-test/4125/2 "2011-03-18T09:30:59Z")

</div>

Didn't made a search before posting (shame on me) so I found that:  
[http://groups.google.com/a/elasticsearch.com/group/users/browse\_thread/thread/6d37daf47d667874/8a18be1d4760b18a?lnk=gst&q=ClusterBlockException#8a18be1d4760b18a](http://groups.google.com/a/elasticsearch.com/group/users/browse_thread/thread/6d37daf47d667874/8a18be1d4760b18a?lnk=gst&q=ClusterBlockException#8a18be1d4760b18a)

But... that's look a bit tricky, any advice Shay ?

On Mar 18, 10:28 am, Alois Cochard [alois.coch...@gmail.com](mailto:alois.coch...@gmail.com) wrote:

> Hey all !
> 
> I've some simple integration test (add an entry then get it, or simple  
> stuff like that) that start a node, from time to time ([pseudo]-  
> randomly) I've got the following exception:
> 
> org.elasticsearch.cluster.block.ClusterBlockException: blocked by: [1/  
> not recovered from gateway];  
> at  
> org.elasticsearch.cluster.block.ClusterBlocks.indexBlockedRaiseException(Cl usterBlocks.java:  
> 112)  
> at  
> org.elasticsearch.action.admin.indices.create.TransportCreateIndexAction.ch eckBlock(TransportCreateIndexAction.java:  
> 65)  
> at  
> org.elasticsearch.action.admin.indices.create.TransportCreateIndexAction.ch eckBlock(TransportCreateIndexAction.java:  
> 42)  
> at  
> org.elasticsearch.action.support.master.TransportMasterNodeOperationAction  
> $1.run(TransportMasterNodeOperationAction.java:91)  
> 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:619)
> 
> Does anyone experimented the same issue ? any idea why this happen ?
> 
> Thanks a lot,
> 
> Alois Cochardhttp://aloiscochard.blogspot.comhttp://twitter.com/aloiscochard

---

<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: [March 18, 2011, 9:37pm UTC](https://discuss.elastic.co/t/clusterblockexception-during-integration-test/4125/3 "2011-03-18T21:37:59Z")

</div>

Which version are you using? the create index API will now automatically retry if its blocked. In any case, you can also wait for yellow cluster state.  
On Friday, March 18, 2011 at 11:30 AM, Alois Cochard wrote:

> Didn't made a search before posting (shame on me) so I found that:  
> [http://groups.google.com/a/elasticsearch.com/group/users/browse\_thread/thread/6d37daf47d667874/8a18be1d4760b18a?lnk=gst&q=ClusterBlockException#8a18be1d4760b18a](http://groups.google.com/a/elasticsearch.com/group/users/browse_thread/thread/6d37daf47d667874/8a18be1d4760b18a?lnk=gst&q=ClusterBlockException#8a18be1d4760b18a)
> 
> But... that's look a bit tricky, any advice Shay ?
> 
> On Mar 18, 10:28 am, Alois Cochard [alois.coch...@gmail.com](mailto:alois.coch...@gmail.com) wrote:
> 
> > Hey all !
> > 
> > I've some simple integration test (add an entry then get it, or simple  
> > stuff like that) that start a node, from time to time ([pseudo]-  
> > randomly) I've got the following exception:
> > 
> > org.elasticsearch.cluster.block.ClusterBlockException: blocked by: [1/  
> > not recovered from gateway];  
> > at  
> > org.elasticsearch.cluster.block.ClusterBlocks.indexBlockedRaiseException(Cl usterBlocks.java:  
> > 112)  
> > at  
> > org.elasticsearch.action.admin.indices.create.TransportCreateIndexAction.ch eckBlock(TransportCreateIndexAction.java:  
> > 65)  
> > at  
> > org.elasticsearch.action.admin.indices.create.TransportCreateIndexAction.ch eckBlock(TransportCreateIndexAction.java:  
> > 42)  
> > at  
> > org.elasticsearch.action.support.master.TransportMasterNodeOperationAction  
> > $1.run(TransportMasterNodeOperationAction.java:91)  
> > 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:619)
> > 
> > Does anyone experimented the same issue ? any idea why this happen ?
> > 
> > Thanks a lot,
> > 
> > Alois Cochardhttp://aloiscochard.blogspot.comhttp://twitter.com/aloiscochard

---

<div class="post-metadata">

### Author: ![Alois\_Cochard](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alois_cochard/32/3176_2.png) [@Alois\_Cochard](https://discuss.elastic.co/u/Alois_Cochard)
#### Post date: [March 21, 2011, 1:16pm UTC](https://discuss.elastic.co/t/clusterblockexception-during-integration-test/4125/4 "2011-03-21T13:16:43Z")

</div>

Ok,

Was using version 0.14.0, I'll update ASAP and see if problem still  
occure.

Thanks a lot !

On Mar 18, 10:37 pm, Shay Banon [shay.ba...@elasticsearch.com](mailto:shay.ba...@elasticsearch.com) wrote:

> Which version are you using? the create index API will now automatically retry if its blocked. In any case, you can also wait for yellow cluster state.
> 
> On Friday, March 18, 2011 at 11:30 AM, Alois Cochard wrote:
> 
> > Didn't made a search before posting (shame on me) so I found that:  
> > [http://groups.google.com/a/elasticsearch.com/group/users/browse\_threa](http://groups.google.com/a/elasticsearch.com/group/users/browse_threa)...
> 
> > But... that's look a bit tricky, any advice Shay ?
> 
> > On Mar 18, 10:28 am, Alois Cochard [alois.coch...@gmail.com](mailto:alois.coch...@gmail.com) wrote:
> > 
> > > Hey all !
> 
> > > I've some simple integration test (add an entry then get it, or simple  
> > > stuff like that) that start a node, from time to time ([pseudo]-  
> > > randomly) I've got the following exception:
> 
> > > org.elasticsearch.cluster.block.ClusterBlockException: blocked by: [1/  
> > > not recovered from gateway];  
> > > at  
> > > org.elasticsearch.cluster.block.ClusterBlocks.indexBlockedRaiseException(Cl usterBlocks.java:  
> > > 112)  
> > > at  
> > > org.elasticsearch.action.admin.indices.create.TransportCreateIndexAction.ch eckBlock(TransportCreateIndexAction.java:  
> > > 65)  
> > > at  
> > > org.elasticsearch.action.admin.indices.create.TransportCreateIndexAction.ch eckBlock(TransportCreateIndexAction.java:  
> > > 42)  
> > > at  
> > > org.elasticsearch.action.support.master.TransportMasterNodeOperationAction  
> > > $1.run(TransportMasterNodeOperationAction.java:91)  
> > > 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:619)
> 
> > > Does anyone experimented the same issue ? any idea why this happen ?
> 
> > > Thanks a lot,
> 
> > > Alois Cochardhttp://aloiscochard.blogspot.comhttp://twitter.com/aloiscochard

---

<div class="post-metadata">

### Author: ![Alois\_Cochard](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alois_cochard/32/3176_2.png) [@Alois\_Cochard](https://discuss.elastic.co/u/Alois_Cochard)
#### Post date: [March 25, 2011, 9:24am UTC](https://discuss.elastic.co/t/clusterblockexception-during-integration-test/4125/5 "2011-03-25T09:24:29Z")

</div>

Just for information was still falling pseudo-randomly with last  
version (0.15.2), don't know how many retry create index does...

But after adding the cluster health everything rock...

Cheers,

On Mar 21, 2:16 pm, Alois Cochard [alois.coch...@gmail.com](mailto:alois.coch...@gmail.com) wrote:

> Ok,
> 
> Was using version 0.14.0, I'll update ASAP and see if problem still  
> occure.
> 
> Thanks a lot !
> 
> On Mar 18, 10:37 pm, Shay Banon [shay.ba...@elasticsearch.com](mailto:shay.ba...@elasticsearch.com) wrote:
> 
> > Which version are you using? the create index API will now automatically retry if its blocked. In any case, you can also wait for yellow cluster state.
> 
> > On Friday, March 18, 2011 at 11:30 AM, Alois Cochard wrote:
> > 
> > > Didn't made a search before posting (shame on me) so I found that:  
> > > [http://groups.google.com/a/elasticsearch.com/group/users/browse\_threa](http://groups.google.com/a/elasticsearch.com/group/users/browse_threa)...
> 
> > > But... that's look a bit tricky, any advice Shay ?
> 
> > > On Mar 18, 10:28 am, Alois Cochard [alois.coch...@gmail.com](mailto:alois.coch...@gmail.com) wrote:
> > > 
> > > > Hey all !
> 
> > > > I've some simple integration test (add an entry then get it, or simple  
> > > > stuff like that) that start a node, from time to time ([pseudo]-  
> > > > randomly) I've got the following exception:
> 
> > > > org.elasticsearch.cluster.block.ClusterBlockException: blocked by: [1/  
> > > > not recovered from gateway];  
> > > > at  
> > > > org.elasticsearch.cluster.block.ClusterBlocks.indexBlockedRaiseException(Cl usterBlocks.java:  
> > > > 112)  
> > > > at  
> > > > org.elasticsearch.action.admin.indices.create.TransportCreateIndexAction.ch eckBlock(TransportCreateIndexAction.java:  
> > > > 65)  
> > > > at  
> > > > org.elasticsearch.action.admin.indices.create.TransportCreateIndexAction.ch eckBlock(TransportCreateIndexAction.java:  
> > > > 42)  
> > > > at  
> > > > org.elasticsearch.action.support.master.TransportMasterNodeOperationAction  
> > > > $1.run(TransportMasterNodeOperationAction.java:91)  
> > > > 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:619)
> 
> > > > Does anyone experimented the same issue ? any idea why this happen ?
> 
> > > > Thanks a lot,
> 
> > > > Alois Cochardhttp://aloiscochard.blogspot.comhttp://twitter.com/aloiscochard

---

<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: [March 25, 2011, 7:05pm UTC](https://discuss.elastic.co/t/clusterblockexception-during-integration-test/4125/6 "2011-03-25T19:05:51Z")

</div>

If you can recreate a simple testcase, I can give it a spin.  
On Friday, March 25, 2011 at 11:24 AM, Alois Cochard wrote:

> Just for information was still falling pseudo-randomly with last  
> version (0.15.2), don't know how many retry create index does...
> 
> But after adding the cluster health everything rock...
> 
> Cheers,
> 
> On Mar 21, 2:16 pm, Alois Cochard [alois.coch...@gmail.com](mailto:alois.coch...@gmail.com) wrote:
> 
> > Ok,
> > 
> > Was using version 0.14.0, I'll update ASAP and see if problem still  
> > occure.
> > 
> > Thanks a lot !
> > 
> > On Mar 18, 10:37 pm, Shay Banon [shay.ba...@elasticsearch.com](mailto:shay.ba...@elasticsearch.com) wrote:
> > 
> > > Which version are you using? the create index API will now automatically retry if its blocked. In any case, you can also wait for yellow cluster state.
> > 
> > > On Friday, March 18, 2011 at 11:30 AM, Alois Cochard wrote:
> > > 
> > > > Didn't made a search before posting (shame on me) so I found that:  
> > > > [http://groups.google.com/a/elasticsearch.com/group/users/browse\_threa](http://groups.google.com/a/elasticsearch.com/group/users/browse_threa)...
> > 
> > > > But... that's look a bit tricky, any advice Shay ?
> > 
> > > > On Mar 18, 10:28 am, Alois Cochard [alois.coch...@gmail.com](mailto:alois.coch...@gmail.com) wrote:
> > > > 
> > > > > Hey all !
> > 
> > > > > I've some simple integration test (add an entry then get it, or simple  
> > > > > stuff like that) that start a node, from time to time ([pseudo]-  
> > > > > randomly) I've got the following exception:
> > 
> > > > > org.elasticsearch.cluster.block.ClusterBlockException: blocked by: [1/  
> > > > > not recovered from gateway];  
> > > > > at  
> > > > > org.elasticsearch.cluster.block.ClusterBlocks.indexBlockedRaiseException(Cl usterBlocks.java:  
> > > > > 112)  
> > > > > at  
> > > > > org.elasticsearch.action.admin.indices.create.TransportCreateIndexAction.ch eckBlock(TransportCreateIndexAction.java:  
> > > > > 65)  
> > > > > at  
> > > > > org.elasticsearch.action.admin.indices.create.TransportCreateIndexAction.ch eckBlock(TransportCreateIndexAction.java:  
> > > > > 42)  
> > > > > at  
> > > > > org.elasticsearch.action.support.master.TransportMasterNodeOperationAction  
> > > > > $1.run(TransportMasterNodeOperationAction.java:91)  
> > > > > 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:619)
> > 
> > > > > Does anyone experimented the same issue ? any idea why this happen ?
> > 
> > > > > Thanks a lot,
> > 
> > > > > Alois Cochardhttp://aloiscochard.blogspot.comhttp://twitter.com/aloiscochard

---

<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, 4:09am UTC](https://discuss.elastic.co/t/clusterblockexception-during-integration-test/4125/7 "2017-07-06T04:09:16Z")

</div>


