# Elasticsearch deploy on ec2

**URL:** <https://discuss.elastic.co/t/elasticsearch-deploy-on-ec2/22196>\
**Category:** Elasticsearch\
**Created:** [February 16, 2015, 6:11pm UTC](https://discuss.elastic.co/t/elasticsearch-deploy-on-ec2/22196 "2015-02-16T18:11:46Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eliran\_Shlomo](https://avatars.discourse-cdn.com/v4/letter/e/e95f7d/32.png) [@Eliran\_Shlomo](https://discuss.elastic.co/u/Eliran_Shlomo)\
**Post date:** [February 16, 2015, 6:11pm UTC](https://discuss.elastic.co/t/elasticsearch-deploy-on-ec2/22196/1 "2015-02-16T18:11:46Z")

</div>

Hi,

I'm trying to deploy new elasticsearch environment on aws and the cluster  
is always at red and i get the following message

{  
"error": "ClusterBlockException[blocked by: [SERVICE\_UNAVAILABLE/1/state  
not recovered / initialized];]",  
"status": 503  
}

I'm trying to deploy 3 master nodes, 3 data nodes, and 2 client nodes.  
when i check cluster health:  
{  
"cluster\_name": "stress\_new",  
"status": "red",  
"timed\_out": false,  
"number\_of\_nodes": 8,  
"number\_of\_data\_nodes": 3,  
"active\_primary\_shards": 0,  
"active\_shards": 0,  
"relocating\_shards": 0,  
"initializing\_shards": 0,  
"unassigned\_shards": 0  
}

please adivce

this is the configuration i used with changes by node role ( node.master &  
node.data ):

cluster.name: stress\_new  
plugin.mandatory: cloud-aws  
cloud.aws.access\_key: \*\*\*\*\*\*\*\*  
cloud.aws.secret\_key: \*\*\*\*\*\*\*\*\*  
cloud.aws.region: us-west-2  
discovery.type: ec2  
discovery.ec2.groups: stress\_new\_elasticsearch  
discovery.ec2.host\_type: private\_ip  
discovery.ec2.ping\_timeout: 30s  
discovery.ec2.tag.elasticsearch: stress\_new

node.name: 172.\*\*\*\*\*\*

node.master: false  
node.data: false

index.number\_of\_shards: 1  
index.number\_of\_replicas: 0  
path.data: /mnt/elasticsearch

path.logs: /var/log/elasticsearch

bootstrap.mlockall: true

http.enabled: true

gateway.recover\_after\_nodes: 8  
gateway.expected\_nodes: 8  
discovery.zen.minimum\_master\_nodes: 3  
discovery.zen.ping.timeout: 10s  
discovery.zen.ping.multicast.enabled: false

index.search.slowlog.threshold.query.warn: 500ms  
index.search.slowlog.threshold.query.info: 200ms  
index.search.slowlog.threshold.query.debug: 100ms  
index.search.slowlog.threshold.query.trace: 50ms

index.search.slowlog.threshold.fetch.warn: 500ms  
index.search.slowlog.threshold.fetch.info: 200ms  
index.search.slowlog.threshold.fetch.debug: 100ms  
index.search.slowlog.threshold.fetch.trace: 50ms

index.indexing.slowlog.threshold.index.warn: 500ms  
index.indexing.slowlog.threshold.index.info: 200ms  
index.indexing.slowlog.threshold.index.debug: 1000ms  
index.indexing.slowlog.threshold.index.trace: 50ms

script.disable\_dynamic: false  
script.native.socialScoreCalc.type: \*\*\*\*\*.SocialScriptFactory  
script.default\_lang: native

action.disable\_delete\_all\_indices: true  
action.auto\_create\_index: .marvel-\*  
indices.fielddata.cache.size: 30%  
indices.fielddata.cache.expire: 15s  
marvel.agent.enabled: false  
allow\_leading\_wildcard: false  
script.groovy.sandbox.enabled: false

--  
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/843e39bd-842a-4301-899d-7a1bb1d119a9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/843e39bd-842a-4301-899d-7a1bb1d119a9%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Itamar\_Syn\_Hershko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/itamar_syn_hershko/32/725_2.png) [@Itamar\_Syn\_Hershko](https://discuss.elastic.co/u/Itamar_Syn_Hershko)\
**Post date:** [February 16, 2015, 6:16pm UTC](https://discuss.elastic.co/t/elasticsearch-deploy-on-ec2/22196/2 "2015-02-16T18:16:08Z")

</div>

Can you describe your deployment process? the cluster can't be _always_ red

- it should be green when you first deploy

Other than that, check the obvious - that AWS securty groups are properly  
defined for those machines (all of them under the same named security group)

--

Itamar Syn-Hershko  
[http://code972.com](http://code972.com) | @synhershko [https://twitter.com/synhershko](https://twitter.com/synhershko)  
Freelance Developer & Consultant  
[Lucene.NET](http://Lucene.NET) committer and PMC member

On Mon, Feb 16, 2015 at 8:11 PM, Eliran Shlomo [eliran@whipclip.com](mailto:eliran@whipclip.com) wrote:

> Hi,
> 
> I'm trying to deploy new elasticsearch environment on aws and the cluster  
> is always at red and i get the following message
> 
> {  
> "error": "ClusterBlockException[blocked by:  
> [SERVICE\_UNAVAILABLE/1/state not recovered / initialized];]",  
> "status": 503  
> }
> 
> I'm trying to deploy 3 master nodes, 3 data nodes, and 2 client nodes.  
> when i check cluster health:  
> {  
> "cluster\_name": "stress\_new",  
> "status": "red",  
> "timed\_out": false,  
> "number\_of\_nodes": 8,  
> "number\_of\_data\_nodes": 3,  
> "active\_primary\_shards": 0,  
> "active\_shards": 0,  
> "relocating\_shards": 0,  
> "initializing\_shards": 0,  
> "unassigned\_shards": 0  
> }
> 
> please adivce
> 
> this is the configuration i used with changes by node role ( node.master &  
> node.data ):
> 
> cluster.name: stress\_new  
> plugin.mandatory: cloud-aws  
> cloud.aws.access\_key: \*\*\*\*\*\*\*\*  
> cloud.aws.secret\_key: \*\*\*\*\*\*\*\*\*  
> cloud.aws.region: us-west-2  
> discovery.type: ec2  
> discovery.ec2.groups: stress\_new\_elasticsearch  
> discovery.ec2.host\_type: private\_ip  
> discovery.ec2.ping\_timeout: 30s  
> discovery.ec2.tag.elasticsearch: stress\_new
> 
> node.name: 172.\*\*\*\*\*\*
> 
> node.master: false  
> node.data: false
> 
> index.number\_of\_shards: 1  
> index.number\_of\_replicas: 0  
> path.data: /mnt/elasticsearch
> 
> path.logs: /var/log/elasticsearch
> 
> bootstrap.mlockall: true
> 
> http.enabled: true
> 
> gateway.recover\_after\_nodes: 8  
> gateway.expected\_nodes: 8  
> discovery.zen.minimum\_master\_nodes: 3  
> discovery.zen.ping.timeout: 10s  
> discovery.zen.ping.multicast.enabled: false
> 
> index.search.slowlog.threshold.query.warn: 500ms  
> index.search.slowlog.threshold.query.info: 200ms  
> index.search.slowlog.threshold.query.debug: 100ms  
> index.search.slowlog.threshold.query.trace: 50ms
> 
> index.search.slowlog.threshold.fetch.warn: 500ms  
> index.search.slowlog.threshold.fetch.info: 200ms  
> index.search.slowlog.threshold.fetch.debug: 100ms  
> index.search.slowlog.threshold.fetch.trace: 50ms
> 
> index.indexing.slowlog.threshold.index.warn: 500ms  
> index.indexing.slowlog.threshold.index.info: 200ms  
> index.indexing.slowlog.threshold.index.debug: 1000ms  
> index.indexing.slowlog.threshold.index.trace: 50ms
> 
> script.disable\_dynamic: false  
> script.native.socialScoreCalc.type: \*\*\*\*\*.SocialScriptFactory  
> script.default\_lang: native
> 
> action.disable\_delete\_all\_indices: true  
> action.auto\_create\_index: .marvel-\*  
> indices.fielddata.cache.size: 30%  
> indices.fielddata.cache.expire: 15s  
> marvel.agent.enabled: false  
> allow\_leading\_wildcard: false  
> script.groovy.sandbox.enabled: false
> 
> --  
> 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/843e39bd-842a-4301-899d-7a1bb1d119a9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/843e39bd-842a-4301-899d-7a1bb1d119a9%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/843e39bd-842a-4301-899d-7a1bb1d119a9%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/843e39bd-842a-4301-899d-7a1bb1d119a9%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/CAHTr4ZstAUwTELHxOx%3DqWBuOjByEn3mhgdd93-kG3M%3DxQMSS7g%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAHTr4ZstAUwTELHxOx%3DqWBuOjByEn3mhgdd93-kG3M%3DxQMSS7g%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Eliran\_Shlomo](https://avatars.discourse-cdn.com/v4/letter/e/e95f7d/32.png) [@Eliran\_Shlomo](https://discuss.elastic.co/u/Eliran_Shlomo)\
**Post date:** [February 16, 2015, 6:22pm UTC](https://discuss.elastic.co/t/elasticsearch-deploy-on-ec2/22196/3 "2015-02-16T18:22:02Z")

</div>

Hi,  
Since the first moment the cluster in in red  
The servers are under the same security group and inside the security group i allow any/any between the servers.

--  
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/ed1d0f69-93cc-4467-a0ad-bffe4b5175df%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ed1d0f69-93cc-4467-a0ad-bffe4b5175df%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Itamar\_Syn\_Hershko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/itamar_syn_hershko/32/725_2.png) [@Itamar\_Syn\_Hershko](https://discuss.elastic.co/u/Itamar_Syn_Hershko)\
**Post date:** [February 16, 2015, 6:28pm UTC](https://discuss.elastic.co/t/elasticsearch-deploy-on-ec2/22196/4 "2015-02-16T18:28:06Z")

</div>

Wait a second, you should use gateway.expected\_data\_nodes: 3 and  
gateway.expected\_master\_nodes: 3 instead of what you have there now. Also  
min master nodes should be 2 in your case.

--

Itamar Syn-Hershko  
[http://code972.com](http://code972.com) | @synhershko [https://twitter.com/synhershko](https://twitter.com/synhershko)  
Freelance Developer & Consultant  
[Lucene.NET](http://Lucene.NET) committer and PMC member

On Mon, Feb 16, 2015 at 8:22 PM, Eliran Shlomo [eliran@whipclip.com](mailto:eliran@whipclip.com) wrote:

> Hi,  
> Since the first moment the cluster in in red  
> The servers are under the same security group and inside the security  
> group i allow any/any between the servers.
> 
> --  
> 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/ed1d0f69-93cc-4467-a0ad-bffe4b5175df%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ed1d0f69-93cc-4467-a0ad-bffe4b5175df%40googlegroups.com)  
> .  
> 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/CAHTr4ZtJEVnyXCDkEX7Hj%3DR%3Dvyy%3DUsUiiDSXC0EVhBMU2PaYXQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAHTr4ZtJEVnyXCDkEX7Hj%3DR%3Dvyy%3DUsUiiDSXC0EVhBMU2PaYXQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Eliran\_Shlomo](https://avatars.discourse-cdn.com/v4/letter/e/e95f7d/32.png) [@Eliran\_Shlomo](https://discuss.elastic.co/u/Eliran_Shlomo)\
**Post date:** [February 16, 2015, 6:31pm UTC](https://discuss.elastic.co/t/elasticsearch-deploy-on-ec2/22196/5 "2015-02-16T18:31:43Z")

</div>

"Wait a second, you should use gateway.expected\_data\_nodes: 3 and gateway.expected\_master\_nodes: 3 instead of what you have there now. Also min master nodes should be 2 in your case."

Those settings should be in the configuration of all nodes or only in the external gateway?(client)

--  
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/e6914e16-28ac-4d00-96b7-b3b007538aba%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e6914e16-28ac-4d00-96b7-b3b007538aba%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Itamar\_Syn\_Hershko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/itamar_syn_hershko/32/725_2.png) [@Itamar\_Syn\_Hershko](https://discuss.elastic.co/u/Itamar_Syn_Hershko)\
**Post date:** [February 16, 2015, 6:52pm UTC](https://discuss.elastic.co/t/elasticsearch-deploy-on-ec2/22196/6 "2015-02-16T18:52:59Z")

</div>

Master eligible nodes and Data nodes need to have this setting

--

Itamar Syn-Hershko  
[http://code972.com](http://code972.com) | @synhershko [https://twitter.com/synhershko](https://twitter.com/synhershko)  
Freelance Developer & Consultant  
[Lucene.NET](http://Lucene.NET) committer and PMC member

On Mon, Feb 16, 2015 at 8:31 PM, Eliran Shlomo [eliran@whipclip.com](mailto:eliran@whipclip.com) wrote:

> "Wait a second, you should use gateway.expected\_data\_nodes: 3 and  
> gateway.expected\_master\_nodes: 3 instead of what you have there now. Also  
> min master nodes should be 2 in your case."
> 
> Those settings should be in the configuration of all nodes or only in the  
> external gateway?(client)
> 
> --  
> 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/e6914e16-28ac-4d00-96b7-b3b007538aba%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e6914e16-28ac-4d00-96b7-b3b007538aba%40googlegroups.com)  
> .  
> 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/CAHTr4ZtzjXeHrzHiRAitfOHASpXrvzXza8JPVObtjMwCHqMrVA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAHTr4ZtzjXeHrzHiRAitfOHASpXrvzXza8JPVObtjMwCHqMrVA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Eliran\_Shlomo](https://avatars.discourse-cdn.com/v4/letter/e/e95f7d/32.png) [@Eliran\_Shlomo](https://discuss.elastic.co/u/Eliran_Shlomo)\
**Post date:** [February 16, 2015, 6:56pm UTC](https://discuss.elastic.co/t/elasticsearch-deploy-on-ec2/22196/7 "2015-02-16T18:56:01Z")

</div>

Hi, made the changes.  
no change in the cluster status and the same response from the servers

{  
"cluster\_name": "stress\_new",  
"status": "red",  
"timed\_out": false,  
"number\_of\_nodes": 8,  
"number\_of\_data\_nodes": 3,  
"active\_primary\_shards": 0,  
"active\_shards": 0,  
"relocating\_shards": 0,  
"initializing\_shards": 0,  
"unassigned\_shards": 0  
}

get \_status

{  
"error": "ClusterBlockException[blocked by: [SERVICE\_UNAVAILABLE/1/state  
not recovered / initialized];]",  
"status": 503  
}

On Monday, February 16, 2015 at 8:53:11 PM UTC+2, Itamar Syn-Hershko wrote:

> Master eligible nodes and Data nodes need to have this setting
> 
> --
> 
> Itamar Syn-Hershko  
> [http://code972.com](http://code972.com) | @synhershko [https://twitter.com/synhershko](https://twitter.com/synhershko)  
> Freelance Developer & Consultant  
> [Lucene.NET](http://Lucene.NET) committer and PMC member
> 
> On Mon, Feb 16, 2015 at 8:31 PM, Eliran Shlomo \<[eli...@whipclip.com](mailto:eli...@whipclip.com)  
> \<javascript:\>\> wrote:
> 
> > "Wait a second, you should use gateway.expected\_data\_nodes: 3 and  
> > gateway.expected\_master\_nodes: 3 instead of what you have there now. Also  
> > min master nodes should be 2 in your case."
> > 
> > Those settings should be in the configuration of all nodes or only in the  
> > external gateway?(client)
> > 
> > --  
> > 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/e6914e16-28ac-4d00-96b7-b3b007538aba%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e6914e16-28ac-4d00-96b7-b3b007538aba%40googlegroups.com)  
> > .  
> > 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/cd40be93-9b10-4bf1-ac9a-eafe8b98c8fe%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/cd40be93-9b10-4bf1-ac9a-eafe8b98c8fe%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Itamar\_Syn\_Hershko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/itamar_syn_hershko/32/725_2.png) [@Itamar\_Syn\_Hershko](https://discuss.elastic.co/u/Itamar_Syn_Hershko)\
**Post date:** [February 16, 2015, 6:59pm UTC](https://discuss.elastic.co/t/elasticsearch-deploy-on-ec2/22196/8 "2015-02-16T18:59:37Z")

</div>

Remove the number of nodes setting, if that doesn't help start looking at  
the logs. I seen clusters on AWS that took some time to discover and  
stabilize, it may also be that.

--

Itamar Syn-Hershko  
[http://code972.com](http://code972.com) | @synhershko [https://twitter.com/synhershko](https://twitter.com/synhershko)  
Freelance Developer & Consultant  
[Lucene.NET](http://Lucene.NET) committer and PMC member

On Mon, Feb 16, 2015 at 8:56 PM, Eliran Shlomo [eliran@whipclip.com](mailto:eliran@whipclip.com) wrote:

> Hi, made the changes.  
> no change in the cluster status and the same response from the servers
> 
> {  
> "cluster\_name": "stress\_new",  
> "status": "red",  
> "timed\_out": false,  
> "number\_of\_nodes": 8,  
> "number\_of\_data\_nodes": 3,  
> "active\_primary\_shards": 0,  
> "active\_shards": 0,  
> "relocating\_shards": 0,  
> "initializing\_shards": 0,  
> "unassigned\_shards": 0  
> }
> 
> get \_status
> 
> {  
> "error": "ClusterBlockException[blocked by:  
> [SERVICE\_UNAVAILABLE/1/state not recovered / initialized];]",  
> "status": 503  
> }
> 
> On Monday, February 16, 2015 at 8:53:11 PM UTC+2, Itamar Syn-Hershko wrote:
> 
> > Master eligible nodes and Data nodes need to have this setting
> > 
> > --
> > 
> > Itamar Syn-Hershko  
> > [http://code972.com](http://code972.com) | @synhershko [https://twitter.com/synhershko](https://twitter.com/synhershko)  
> > Freelance Developer & Consultant  
> > [Lucene.NET](http://Lucene.NET) committer and PMC member
> > 
> > On Mon, Feb 16, 2015 at 8:31 PM, Eliran Shlomo [eli...@whipclip.com](mailto:eli...@whipclip.com)  
> > wrote:
> > 
> > > "Wait a second, you should use gateway.expected\_data\_nodes: 3 and  
> > > gateway.expected\_master\_nodes: 3 instead of what you have there now. Also  
> > > min master nodes should be 2 in your case."
> > > 
> > > Those settings should be in the configuration of all nodes or only in  
> > > the external gateway?(client)
> > > 
> > > --  
> > > 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).  
> > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > msgid/elasticsearch/e6914e16-28ac-4d00-96b7-b3b007538aba%  
> > > [40googlegroups.com](http://40googlegroups.com).  
> > > 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/cd40be93-9b10-4bf1-ac9a-eafe8b98c8fe%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/cd40be93-9b10-4bf1-ac9a-eafe8b98c8fe%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/cd40be93-9b10-4bf1-ac9a-eafe8b98c8fe%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/cd40be93-9b10-4bf1-ac9a-eafe8b98c8fe%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/CAHTr4Zsa0DgkCJuuLrhyrssM%2BEFMQ4jcZwECWmq%3Dq0GFyqHVEg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAHTr4Zsa0DgkCJuuLrhyrssM%2BEFMQ4jcZwECWmq%3Dq0GFyqHVEg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Eliran\_Shlomo](https://avatars.discourse-cdn.com/v4/letter/e/e95f7d/32.png) [@Eliran\_Shlomo](https://discuss.elastic.co/u/Eliran_Shlomo)\
**Post date:** [February 17, 2015, 6:35am UTC](https://discuss.elastic.co/t/elasticsearch-deploy-on-ec2/22196/9 "2015-02-17T06:35:02Z")

</div>

Tnx for the help Itamar.  
solved by changing gateway.recover\_after\_nodes value from 8 to 6  
i guess client node shouldn't be count for recover

On Monday, February 16, 2015 at 8:59:48 PM UTC+2, Itamar Syn-Hershko wrote:

> Remove the number of nodes setting, if that doesn't help start looking at  
> the logs. I seen clusters on AWS that took some time to discover and  
> stabilize, it may also be that.
> 
> --
> 
> Itamar Syn-Hershko  
> [http://code972.com](http://code972.com) | @synhershko [https://twitter.com/synhershko](https://twitter.com/synhershko)  
> Freelance Developer & Consultant  
> [Lucene.NET](http://Lucene.NET) committer and PMC member
> 
> On Mon, Feb 16, 2015 at 8:56 PM, Eliran Shlomo \<[eli...@whipclip.com](mailto:eli...@whipclip.com)  
> \<javascript:\>\> wrote:
> 
> > Hi, made the changes.  
> > no change in the cluster status and the same response from the servers
> > 
> > {  
> > "cluster\_name": "stress\_new",  
> > "status": "red",  
> > "timed\_out": false,  
> > "number\_of\_nodes": 8,  
> > "number\_of\_data\_nodes": 3,  
> > "active\_primary\_shards": 0,  
> > "active\_shards": 0,  
> > "relocating\_shards": 0,  
> > "initializing\_shards": 0,  
> > "unassigned\_shards": 0  
> > }
> > 
> > get \_status
> > 
> > {  
> > "error": "ClusterBlockException[blocked by:  
> > [SERVICE\_UNAVAILABLE/1/state not recovered / initialized];]",  
> > "status": 503  
> > }
> > 
> > On Monday, February 16, 2015 at 8:53:11 PM UTC+2, Itamar Syn-Hershko  
> > wrote:
> > 
> > > Master eligible nodes and Data nodes need to have this setting
> > > 
> > > --
> > > 
> > > Itamar Syn-Hershko  
> > > [http://code972.com](http://code972.com) | @synhershko [https://twitter.com/synhershko](https://twitter.com/synhershko)  
> > > Freelance Developer & Consultant  
> > > [Lucene.NET](http://Lucene.NET) committer and PMC member
> > > 
> > > On Mon, Feb 16, 2015 at 8:31 PM, Eliran Shlomo [eli...@whipclip.com](mailto:eli...@whipclip.com)  
> > > wrote:
> > > 
> > > > "Wait a second, you should use gateway.expected\_data\_nodes: 3 and  
> > > > gateway.expected\_master\_nodes: 3 instead of what you have there now. Also  
> > > > min master nodes should be 2 in your case."
> > > > 
> > > > Those settings should be in the configuration of all nodes or only in  
> > > > the external gateway?(client)
> > > > 
> > > > --  
> > > > 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).  
> > > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > msgid/elasticsearch/e6914e16-28ac-4d00-96b7-b3b007538aba%  
> > > > [40googlegroups.com](http://40googlegroups.com).  
> > > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/elasticsearch/cd40be93-9b10-4bf1-ac9a-eafe8b98c8fe%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/cd40be93-9b10-4bf1-ac9a-eafe8b98c8fe%40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/cd40be93-9b10-4bf1-ac9a-eafe8b98c8fe%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/cd40be93-9b10-4bf1-ac9a-eafe8b98c8fe%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/9473e8bf-def6-4f04-89f3-b957394b4cf4%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/9473e8bf-def6-4f04-89f3-b957394b4cf4%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:32am UTC](https://discuss.elastic.co/t/elasticsearch-deploy-on-ec2/22196/10 "2017-07-06T00:32:17Z")

</div>


