# Master node refuse to accept its role

**URL:** <https://discuss.elastic.co/t/master-node-refuse-to-accept-its-role/23359>\
**Category:** Elasticsearch\
**Created:** [April 22, 2015, 10:41am UTC](https://discuss.elastic.co/t/master-node-refuse-to-accept-its-role/23359 "2015-04-22T10:41:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![redserpent7](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/redserpent7/32/467_2.png) [@redserpent7](https://discuss.elastic.co/u/redserpent7)\
**Post date:** [April 22, 2015, 10:41am UTC](https://discuss.elastic.co/t/master-node-refuse-to-accept-its-role/23359/1 "2015-04-22T10:41:07Z")

</div>

Hi,

I am starting a new cluster and I want it to be set with two nodes. One is  
a data only node and the other is a master only node. Both nodes are hosted  
on Amazon EC2 and are in the same region

Here is my configuration for both nodes.

Master Node:

cluster.name: testingelastic  
cloud.aws.access\_key: \<ACCESS\_KEY\>  
cloud.aws.secret\_key: \<SECRET\_KEY\>  
cloud.aws.protocol: http  
discovery.type: ec2  
discovery.ec2.tag.Search: Elastic  
discovery.ec2.ping\_timeout: 90s  
discovery.zen.ping.multicast.enabled: false  
node.name: "node\_m"  
node.master: true  
node.data: false  
index.number\_of\_shards: 1  
index.number\_of\_replicas: 1  
network.publish\_host: \<STATIC\_IP\_ADDRESS\>  
http.enabled: true  
http.cors.enables: true  
http.cors.allow-origin: "\*"  
discovery.zen.ping.timeout: 600s

Data Node:

cluster.name: testingelastic  
cloud.aws.access\_key: \<ACCESS\_KEY\>  
cloud.aws.secret\_key: \<SECRET\_KEY\>  
cloud.aws.protocol: http  
discovery.type: ec2  
discovery.ec2.tag.Search: Elastic  
discovery.ec2.ping\_timeout: 90s  
discovery.zen.ping.multicast.enabled: false  
node.name: "node\_d"  
path.data: /elasticdata/data/  
node.master: false  
node.data: true  
index.number\_of\_shards: 1  
index.number\_of\_replicas: 1  
network.publish\_host: \<STATIC\_IP\_ADDRESS\>  
http.enabled: true  
http.cors.enables: true  
http.cors.allow-origin: "\*"  
iscovery.zen.ping.timeout: 600s

Now when I start the elasticsearch service on the Master Node, the service  
starts fine with now errors in the logs. Yet it keeps giving me a 503  
whenever I try to connect to it.

Calling: \*curl -XGET localhost:9200/\_stats \*on the master node gives the  
following exception:

{

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

}

So it seems for some weird reason that it does not elect itself as a master  
node.

When checking the logs on the data node, it seems that it is able to detect  
the master node yet cannot connect to it with the following error in the  
logs:

_[2015-04-22 10:38:03,604][INFO][discovery.ec2] [node\_d]  
failed to send join request to master  
[[node\_m][][][inet[]]{data=false, master=t$_

I removed the IP addresses for security but I assure you they are correct.

So what is going on here, and why is my master node failing to see itself  
as a master node?

--  
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/c5466db8-f614-4d52-a245-bd361b6953ad%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c5466db8-f614-4d52-a245-bd361b6953ad%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 22, 2015, 11:29am UTC](https://discuss.elastic.co/t/master-node-refuse-to-accept-its-role/23359/2 "2015-04-22T11:29:19Z")

</div>

Which versions for:

Elasticsearch  
Cloud-aws-plugin

?

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

> Le 22 avr. 2015 à 12:41, Zaid Amir [redserpent7@gmail.com](mailto:redserpent7@gmail.com) a écrit :
> 
> Hi,
> 
> I am starting a new cluster and I want it to be set with two nodes. One is a data only node and the other is a master only node. Both nodes are hosted on Amazon EC2 and are in the same region
> 
> Here is my configuration for both nodes.
> 
> Master Node:
> 
> cluster.name: testingelastic  
> cloud.aws.access\_key: \<ACCESS\_KEY\>  
> cloud.aws.secret\_key: \<SECRET\_KEY\>  
> cloud.aws.protocol: http  
> discovery.type: ec2  
> discovery.ec2.tag.Search: Elastic  
> discovery.ec2.ping\_timeout: 90s  
> discovery.zen.ping.multicast.enabled: false  
> node.name: "node\_m"  
> node.master: true  
> node.data: false  
> index.number\_of\_shards: 1  
> index.number\_of\_replicas: 1  
> network.publish\_host: \<STATIC\_IP\_ADDRESS\>  
> http.enabled: true  
> http.cors.enables: true  
> http.cors.allow-origin: "\*"  
> discovery.zen.ping.timeout: 600s
> 
> Data Node:
> 
> cluster.name: testingelastic  
> cloud.aws.access\_key: \<ACCESS\_KEY\>  
> cloud.aws.secret\_key: \<SECRET\_KEY\>  
> cloud.aws.protocol: http  
> discovery.type: ec2  
> discovery.ec2.tag.Search: Elastic  
> discovery.ec2.ping\_timeout: 90s  
> discovery.zen.ping.multicast.enabled: false  
> node.name: "node\_d"  
> path.data: /elasticdata/data/  
> node.master: false  
> node.data: true  
> index.number\_of\_shards: 1  
> index.number\_of\_replicas: 1  
> network.publish\_host: \<STATIC\_IP\_ADDRESS\>  
> http.enabled: true  
> http.cors.enables: true  
> http.cors.allow-origin: "\*"  
> iscovery.zen.ping.timeout: 600s
> 
> Now when I start the elasticsearch service on the Master Node, the service starts fine with now errors in the logs. Yet it keeps giving me a 503 whenever I try to connect to it.
> 
> Calling: curl -XGET localhost:9200/\_stats on the master node gives the following exception:
> 
> {  
> "error": "ClusterBlockException[blocked by: [SERVICE\_UNAVAILABLE/1/state not recovered / initialized];[SERVICE\_UNAVAILABLE/2/no master];]","status":503  
> }
> 
> So it seems for some weird reason that it does not elect itself as a master node.
> 
> When checking the logs on the data node, it seems that it is able to detect the master node yet cannot connect to it with the following error in the logs:
> 
> [2015-04-22 10:38:03,604][INFO][discovery.ec2] [node\_d] failed to send join request to master [[node\_m][][][inet[]]{data=false, master=t$
> 
> I removed the IP addresses for security but I assure you they are correct.
> 
> So what is going on here, and why is my master node failing to see itself as a master node?
> 
> --  
> 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/c5466db8-f614-4d52-a245-bd361b6953ad%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c5466db8-f614-4d52-a245-bd361b6953ad%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/1328C370-7431-4006-B7F6-C717D9AF36C6%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/1328C370-7431-4006-B7F6-C717D9AF36C6%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![redserpent7](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/redserpent7/32/467_2.png) [@redserpent7](https://discuss.elastic.co/u/redserpent7)\
**Post date:** [April 22, 2015, 11:33am UTC](https://discuss.elastic.co/t/master-node-refuse-to-accept-its-role/23359/3 "2015-04-22T11:33:21Z")

</div>

Both nodes have:

Elasticsearch: 1.5.0  
Cloud-AWS: 2.5.0

On Wednesday, April 22, 2015 at 2:29:39 PM UTC+3, David Pilato wrote:

> Which versions for:
> 
> Elasticsearch  
> Cloud-aws-plugin
> 
> ?
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 22 avr. 2015 à 12:41, Zaid Amir \<[redse...@gmail.com](mailto:redse...@gmail.com) \<javascript:\>\> a  
> écrit :
> 
> Hi,
> 
> I am starting a new cluster and I want it to be set with two nodes. One is  
> a data only node and the other is a master only node. Both nodes are hosted  
> on Amazon EC2 and are in the same region
> 
> Here is my configuration for both nodes.
> 
> Master Node:
> 
> cluster.name: testingelastic  
> cloud.aws.access\_key: \<ACCESS\_KEY\>  
> cloud.aws.secret\_key: \<SECRET\_KEY\>  
> cloud.aws.protocol: http  
> discovery.type: ec2  
> discovery.ec2.tag.Search: Elastic  
> discovery.ec2.ping\_timeout: 90s  
> discovery.zen.ping.multicast.enabled: false  
> node.name: "node\_m"  
> node.master: true  
> node.data: false  
> index.number\_of\_shards: 1  
> index.number\_of\_replicas: 1  
> network.publish\_host: \<STATIC\_IP\_ADDRESS\>  
> http.enabled: true  
> http.cors.enables: true  
> http.cors.allow-origin: "\*"  
> discovery.zen.ping.timeout: 600s
> 
> Data Node:
> 
> cluster.name: testingelastic  
> cloud.aws.access\_key: \<ACCESS\_KEY\>  
> cloud.aws.secret\_key: \<SECRET\_KEY\>  
> cloud.aws.protocol: http  
> discovery.type: ec2  
> discovery.ec2.tag.Search: Elastic  
> discovery.ec2.ping\_timeout: 90s  
> discovery.zen.ping.multicast.enabled: false  
> node.name: "node\_d"  
> path.data: /elasticdata/data/  
> node.master: false  
> node.data: true  
> index.number\_of\_shards: 1  
> index.number\_of\_replicas: 1  
> network.publish\_host: \<STATIC\_IP\_ADDRESS\>  
> http.enabled: true  
> http.cors.enables: true  
> http.cors.allow-origin: "\*"  
> iscovery.zen.ping.timeout: 600s
> 
> Now when I start the elasticsearch service on the Master Node, the service  
> starts fine with now errors in the logs. Yet it keeps giving me a 503  
> whenever I try to connect to it.
> 
> Calling: \*curl -XGET localhost:9200/\_stats \*on the master node gives the  
> following exception:
> 
> {
> 
> "error": "ClusterBlockException[blocked by: [SERVICE\_UNAVAILABLE/1/state  
> not recovered / initialized];[SERVICE\_UNAVAILABLE/2/no  
> master];]","status":503
> 
> }
> 
> So it seems for some weird reason that it does not elect itself as a  
> master node.
> 
> When checking the logs on the data node, it seems that it is able to  
> detect the master node yet cannot connect to it with the following error in  
> the logs:
> 
> _[2015-04-22 10:38:03,604][INFO][discovery.ec2] [node\_d]  
> failed to send join request to master  
> [[node\_m][][][inet[]]{data=false, master=t$_
> 
> I removed the IP addresses for security but I assure you they are correct.
> 
> So what is going on here, and why is my master node failing to see itself  
> as a master node?
> 
> --  
> 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/c5466db8-f614-4d52-a245-bd361b6953ad%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c5466db8-f614-4d52-a245-bd361b6953ad%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/c5466db8-f614-4d52-a245-bd361b6953ad%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/c5466db8-f614-4d52-a245-bd361b6953ad%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/30ee9166-5590-434b-8fc2-d8b1196e4650%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/30ee9166-5590-434b-8fc2-d8b1196e4650%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 22, 2015, 1:00pm UTC](https://discuss.elastic.co/t/master-node-refuse-to-accept-its-role/23359/4 "2015-04-22T13:00:53Z")

</div>

I just ran a small test on a ec2 instance.

I just set

node.master: true  
node.data: false

on a node without and then with cloud-aws-plugin and it worked well in both cases.

Could you try to simplify your settings to see what setting is actually causing this?

cluster.name: testingelastic  
cloud.aws.access\_key: \<ACCESS\_KEY\>  
cloud.aws.secret\_key: \<SECRET\_KEY\>  
discovery.type: ec2  
node.master: true  
node.data: false

--  
David Pilato - Developer | Evangelist

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co/)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

@dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr [https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr) | @scrutmydocs [https://twitter.com/scrutmydocs](https://twitter.com/scrutmydocs)

> Le 22 avr. 2015 à 13:33, Zaid Amir [redserpent7@gmail.com](mailto:redserpent7@gmail.com) a écrit :
> 
> Both nodes have:
> 
> Elasticsearch: 1.5.0  
> Cloud-AWS: 2.5.0
> 
> On Wednesday, April 22, 2015 at 2:29:39 PM UTC+3, David Pilato wrote:  
> Which versions for:
> 
> Elasticsearch  
> Cloud-aws-plugin
> 
> ?
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 22 avr. 2015 à 12:41, Zaid Amir \<[redse...@gmail.com](mailto:redse...@gmail.com) \<javascript:\>\> a écrit :
> 
> > Hi,
> > 
> > I am starting a new cluster and I want it to be set with two nodes. One is a data only node and the other is a master only node. Both nodes are hosted on Amazon EC2 and are in the same region
> > 
> > Here is my configuration for both nodes.
> > 
> > Master Node:
> > 
> > cluster.name [http://cluster.name/](http://cluster.name/): testingelastic  
> > cloud.aws.access\_key: \<ACCESS\_KEY\>  
> > cloud.aws.secret\_key: \<SECRET\_KEY\>  
> > cloud.aws.protocol: http  
> > discovery.type: ec2  
> > discovery.ec2.tag.Search: Elastic  
> > discovery.ec2.ping\_timeout: 90s  
> > discovery.zen.ping.multicast.enabled: false  
> > node.name [http://node.name/](http://node.name/): "node\_m"  
> > node.master: true  
> > node.data: false  
> > index.number\_of\_shards: 1  
> > index.number\_of\_replicas: 1  
> > network.publish\_host: \<STATIC\_IP\_ADDRESS\>  
> > http.enabled: true  
> > http.cors.enables: true  
> > http.cors.allow-origin: "\*"  
> > discovery.zen.ping.timeout: 600s
> > 
> > Data Node:
> > 
> > cluster.name [http://cluster.name/](http://cluster.name/): testingelastic  
> > cloud.aws.access\_key: \<ACCESS\_KEY\>  
> > cloud.aws.secret\_key: \<SECRET\_KEY\>  
> > cloud.aws.protocol: http  
> > discovery.type: ec2  
> > discovery.ec2.tag.Search: Elastic  
> > discovery.ec2.ping\_timeout: 90s  
> > discovery.zen.ping.multicast.enabled: false  
> > node.name [http://node.name/](http://node.name/): "node\_d"  
> > path.data: /elasticdata/data/  
> > node.master: false  
> > node.data: true  
> > index.number\_of\_shards: 1  
> > index.number\_of\_replicas: 1  
> > network.publish\_host: \<STATIC\_IP\_ADDRESS\>  
> > http.enabled: true  
> > http.cors.enables: true  
> > http.cors.allow-origin: "\*"  
> > iscovery.zen.ping.timeout: 600s
> > 
> > Now when I start the elasticsearch service on the Master Node, the service starts fine with now errors in the logs. Yet it keeps giving me a 503 whenever I try to connect to it.
> > 
> > Calling: curl -XGET localhost:9200/\_stats on the master node gives the following exception:
> > 
> > {  
> > "error": "ClusterBlockException[blocked by: [SERVICE\_UNAVAILABLE/1/state not recovered / initialized];[SERVICE\_UNAVAILABLE/2/no master];]","status":503  
> > }
> > 
> > So it seems for some weird reason that it does not elect itself as a master node.
> > 
> > When checking the logs on the data node, it seems that it is able to detect the master node yet cannot connect to it with the following error in the logs:
> > 
> > [2015-04-22 10:38:03,604][INFO][discovery.ec2] [node\_d] failed to send join request to master [[node\_m][][][inet[]]{data=false, master=t$
> > 
> > I removed the IP addresses for security but I assure you they are correct.
> > 
> > So what is going on here, and why is my master node failing to see itself as a master node?
> > 
> > --  
> > 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/c5466db8-f614-4d52-a245-bd361b6953ad%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c5466db8-f614-4d52-a245-bd361b6953ad%40googlegroups.com) [https://groups.google.com/d/msgid/elasticsearch/c5466db8-f614-4d52-a245-bd361b6953ad%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/c5466db8-f614-4d52-a245-bd361b6953ad%40googlegroups.com?utm_medium=email&utm_source=footer).  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout) [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) [mailto:elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/30ee9166-5590-434b-8fc2-d8b1196e4650%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/30ee9166-5590-434b-8fc2-d8b1196e4650%40googlegroups.com) [https://groups.google.com/d/msgid/elasticsearch/30ee9166-5590-434b-8fc2-d8b1196e4650%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/30ee9166-5590-434b-8fc2-d8b1196e4650%40googlegroups.com?utm_medium=email&utm_source=footer).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout) [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/862D11C0-116C-48ED-8948-AE99A25B0520%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/862D11C0-116C-48ED-8948-AE99A25B0520%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![redserpent7](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/redserpent7/32/467_2.png) [@redserpent7](https://discuss.elastic.co/u/redserpent7)\
**Post date:** [April 23, 2015, 7:17am UTC](https://discuss.elastic.co/t/master-node-refuse-to-accept-its-role/23359/5 "2015-04-23T07:17:33Z")

</div>

I tried your configuration and though the master node was able to start.  
Now the nodes are unable to see each other. So the data node is now  
reporting that it cannot see any master nodes and its failing to start.

On Wednesday, April 22, 2015 at 4:01:12 PM UTC+3, David Pilato wrote:

> I just ran a small test on a ec2 instance.
> 
> I just set
> 
> node.master: true  
> node.data: false
> 
> on a node without and then with cloud-aws-plugin and it worked well in  
> both cases.
> 
> Could you try to simplify your settings to see what setting is actually  
> causing this?
> 
> cluster.name: testingelastic  
> cloud.aws.access\_key: \<ACCESS\_KEY\>  
> cloud.aws.secret\_key: \<SECRET\_KEY\>  
> discovery.type: ec2  
> node.master: true  
> node.data: false
> 
> --  
> _David Pilato_ - Developer | Evangelist  
> _[elastic.co](http://elastic.co) [http://elastic.co](http://elastic.co)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr  
> [https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr) | @scrutmydocs  
> [https://twitter.com/scrutmydocs](https://twitter.com/scrutmydocs)
> 
> Le 22 avr. 2015 à 13:33, Zaid Amir \<[redse...@gmail.com](mailto:redse...@gmail.com) \<javascript:\>\> a  
> écrit :
> 
> Both nodes have:
> 
> Elasticsearch: 1.5.0  
> Cloud-AWS: 2.5.0
> 
> On Wednesday, April 22, 2015 at 2:29:39 PM UTC+3, David Pilato wrote:
> 
> > Which versions for:
> > 
> > Elasticsearch  
> > Cloud-aws-plugin
> > 
> > ?
> > 
> > --  
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > 
> > Le 22 avr. 2015 à 12:41, Zaid Amir [redse...@gmail.com](mailto:redse...@gmail.com) a écrit :
> > 
> > Hi,
> > 
> > I am starting a new cluster and I want it to be set with two nodes. One  
> > is a data only node and the other is a master only node. Both nodes are  
> > hosted on Amazon EC2 and are in the same region
> > 
> > Here is my configuration for both nodes.
> > 
> > Master Node:
> > 
> > cluster.name: testingelastic  
> > cloud.aws.access\_key: \<ACCESS\_KEY\>  
> > cloud.aws.secret\_key: \<SECRET\_KEY\>  
> > cloud.aws.protocol: http  
> > discovery.type: ec2  
> > discovery.ec2.tag.Search: Elastic  
> > discovery.ec2.ping\_timeout: 90s  
> > discovery.zen.ping.multicast.enabled: false  
> > node.name: "node\_m"  
> > node.master: true  
> > node.data: false  
> > index.number\_of\_shards: 1  
> > index.number\_of\_replicas: 1  
> > network.publish\_host: \<STATIC\_IP\_ADDRESS\>  
> > http.enabled: true  
> > http.cors.enables: true  
> > http.cors.allow-origin: "\*"  
> > discovery.zen.ping.timeout: 600s
> > 
> > Data Node:
> > 
> > cluster.name: testingelastic  
> > cloud.aws.access\_key: \<ACCESS\_KEY\>  
> > cloud.aws.secret\_key: \<SECRET\_KEY\>  
> > cloud.aws.protocol: http  
> > discovery.type: ec2  
> > discovery.ec2.tag.Search: Elastic  
> > discovery.ec2.ping\_timeout: 90s  
> > discovery.zen.ping.multicast.enabled: false  
> > node.name: "node\_d"  
> > path.data: /elasticdata/data/  
> > node.master: false  
> > node.data: true  
> > index.number\_of\_shards: 1  
> > index.number\_of\_replicas: 1  
> > network.publish\_host: \<STATIC\_IP\_ADDRESS\>  
> > http.enabled: true  
> > http.cors.enables: true  
> > http.cors.allow-origin: "\*"  
> > iscovery.zen.ping.timeout: 600s
> > 
> > Now when I start the elasticsearch service on the Master Node, the  
> > service starts fine with now errors in the logs. Yet it keeps giving me a  
> > 503 whenever I try to connect to it.
> > 
> > Calling: \*curl -XGET localhost:9200/\_stats \*on the master node gives the  
> > following exception:
> > 
> > {
> > 
> > "error": "ClusterBlockException[blocked by: [SERVICE\_UNAVAILABLE/1/state  
> > not recovered / initialized];[SERVICE\_UNAVAILABLE/2/no  
> > master];]","status":503
> > 
> > }
> > 
> > So it seems for some weird reason that it does not elect itself as a  
> > master node.
> > 
> > When checking the logs on the data node, it seems that it is able to  
> > detect the master node yet cannot connect to it with the following error in  
> > the logs:
> > 
> > _[2015-04-22 10:38:03,604][INFO][discovery.ec2] [node\_d]  
> > failed to send join request to master  
> > [[node\_m][][][inet[]]{data=false, master=t$_
> > 
> > I removed the IP addresses for security but I assure you they are correct.
> > 
> > So what is going on here, and why is my master node failing to see itself  
> > as a master node?
> > 
> > --  
> > 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/msgid/elasticsearch/c5466db8-f614-4d52-a245-bd361b6953ad%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c5466db8-f614-4d52-a245-bd361b6953ad%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/c5466db8-f614-4d52-a245-bd361b6953ad%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/c5466db8-f614-4d52-a245-bd361b6953ad%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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/30ee9166-5590-434b-8fc2-d8b1196e4650%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/30ee9166-5590-434b-8fc2-d8b1196e4650%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/30ee9166-5590-434b-8fc2-d8b1196e4650%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/30ee9166-5590-434b-8fc2-d8b1196e4650%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/408f2654-5617-49fc-b04c-f4aa5c961990%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/408f2654-5617-49fc-b04c-f4aa5c961990%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 23, 2015, 7:20am UTC](https://discuss.elastic.co/t/master-node-refuse-to-accept-its-role/23359/6 "2015-04-23T07:20:59Z")

</div>

So could you then add one by one the other settings you defined and report here which setting is causing your initial issue?

David

> Le 23 avr. 2015 à 09:17, Zaid Amir [redserpent7@gmail.com](mailto:redserpent7@gmail.com) a écrit :
> 
> I tried your configuration and though the master node was able to start. Now the nodes are unable to see each other. So the data node is now reporting that it cannot see any master nodes and its failing to start.
> 
> > On Wednesday, April 22, 2015 at 4:01:12 PM UTC+3, David Pilato wrote:  
> > I just ran a small test on a ec2 instance.
> > 
> > I just set
> > 
> > node.master: true  
> > node.data: false
> > 
> > on a node without and then with cloud-aws-plugin and it worked well in both cases.
> > 
> > Could you try to simplify your settings to see what setting is actually causing this?
> > 
> > cluster.name: testingelastic  
> > cloud.aws.access\_key: \<ACCESS\_KEY\>  
> > cloud.aws.secret\_key: \<SECRET\_KEY\>  
> > discovery.type: ec2  
> > node.master: true  
> > node.data: false
> > 
> > --  
> > David Pilato - Developer | Evangelist  
> > [elastic.co](http://elastic.co)  
> > @dadoonet | @elasticsearchfr | @scrutmydocs
> > 
> > > Le 22 avr. 2015 à 13:33, Zaid Amir [redse...@gmail.com](mailto:redse...@gmail.com) a écrit :
> > > 
> > > Both nodes have:
> > > 
> > > Elasticsearch: 1.5.0  
> > > Cloud-AWS: 2.5.0
> > > 
> > > > On Wednesday, April 22, 2015 at 2:29:39 PM UTC+3, David Pilato wrote:  
> > > > Which versions for:
> > > > 
> > > > Elasticsearch  
> > > > Cloud-aws-plugin
> > > > 
> > > > ?
> > > > 
> > > > --  
> > > > David 😉  
> > > > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > > > 
> > > > > Le 22 avr. 2015 à 12:41, Zaid Amir [redse...@gmail.com](mailto:redse...@gmail.com) a écrit :
> > > > > 
> > > > > Hi,
> > > > > 
> > > > > I am starting a new cluster and I want it to be set with two nodes. One is a data only node and the other is a master only node. Both nodes are hosted on Amazon EC2 and are in the same region
> > > > > 
> > > > > Here is my configuration for both nodes.
> > > > > 
> > > > > Master Node:
> > > > > 
> > > > > cluster.name: testingelastic  
> > > > > cloud.aws.access\_key: \<ACCESS\_KEY\>  
> > > > > cloud.aws.secret\_key: \<SECRET\_KEY\>  
> > > > > cloud.aws.protocol: http  
> > > > > discovery.type: ec2  
> > > > > discovery.ec2.tag.Search: Elastic  
> > > > > discovery.ec2.ping\_timeout: 90s  
> > > > > discovery.zen.ping.multicast.enabled: false  
> > > > > node.name: "node\_m"  
> > > > > node.master: true  
> > > > > node.data: false  
> > > > > index.number\_of\_shards: 1  
> > > > > index.number\_of\_replicas: 1  
> > > > > network.publish\_host: \<STATIC\_IP\_ADDRESS\>  
> > > > > http.enabled: true  
> > > > > http.cors.enables: true  
> > > > > http.cors.allow-origin: "\*"  
> > > > > discovery.zen.ping.timeout: 600s
> > > > > 
> > > > > Data Node:
> > > > > 
> > > > > cluster.name: testingelastic  
> > > > > cloud.aws.access\_key: \<ACCESS\_KEY\>  
> > > > > cloud.aws.secret\_key: \<SECRET\_KEY\>  
> > > > > cloud.aws.protocol: http  
> > > > > discovery.type: ec2  
> > > > > discovery.ec2.tag.Search: Elastic  
> > > > > discovery.ec2.ping\_timeout: 90s  
> > > > > discovery.zen.ping.multicast.enabled: false  
> > > > > node.name: "node\_d"  
> > > > > path.data: /elasticdata/data/  
> > > > > node.master: false  
> > > > > node.data: true  
> > > > > index.number\_of\_shards: 1  
> > > > > index.number\_of\_replicas: 1  
> > > > > network.publish\_host: \<STATIC\_IP\_ADDRESS\>  
> > > > > http.enabled: true  
> > > > > http.cors.enables: true  
> > > > > http.cors.allow-origin: "\*"  
> > > > > iscovery.zen.ping.timeout: 600s
> > > > > 
> > > > > Now when I start the elasticsearch service on the Master Node, the service starts fine with now errors in the logs. Yet it keeps giving me a 503 whenever I try to connect to it.
> > > > > 
> > > > > Calling: curl -XGET localhost:9200/\_stats on the master node gives the following exception:
> > > > > 
> > > > > {  
> > > > > "error": "ClusterBlockException[blocked by: [SERVICE\_UNAVAILABLE/1/state not recovered / initialized];[SERVICE\_UNAVAILABLE/2/no master];]","status":503  
> > > > > }
> > > > > 
> > > > > So it seems for some weird reason that it does not elect itself as a master node.
> > > > > 
> > > > > When checking the logs on the data node, it seems that it is able to detect the master node yet cannot connect to it with the following error in the logs:
> > > > > 
> > > > > [2015-04-22 10:38:03,604][INFO][discovery.ec2] [node\_d] failed to send join request to master [[node\_m][][][inet[]]{data=false, master=t$
> > > > > 
> > > > > I removed the IP addresses for security but I assure you they are correct.
> > > > > 
> > > > > So what is going on here, and why is my master node failing to see itself as a master node?
> > > > > 
> > > > > --  
> > > > > 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/msgid/elasticsearch/c5466db8-f614-4d52-a245-bd361b6953ad%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c5466db8-f614-4d52-a245-bd361b6953ad%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).  
> > > To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/30ee9166-5590-434b-8fc2-d8b1196e4650%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/30ee9166-5590-434b-8fc2-d8b1196e4650%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/408f2654-5617-49fc-b04c-f4aa5c961990%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/408f2654-5617-49fc-b04c-f4aa5c961990%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/57809FAD-4A2A-45AF-8349-C093A8D6FF99%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/57809FAD-4A2A-45AF-8349-C093A8D6FF99%40pilato.fr).  
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:18am UTC](https://discuss.elastic.co/t/master-node-refuse-to-accept-its-role/23359/7 "2017-07-06T00:18:08Z")

</div>


