# Deployment stuck on "Waiting until master instances are elected"

**URL:** <https://discuss.elastic.co/t/deployment-stuck-on-waiting-until-master-instances-are-elected/266445>\
**Category:** Elastic Cloud Enterprise (ECE)\
**Created:** [March 6, 2021, 2:23pm UTC](https://discuss.elastic.co/t/deployment-stuck-on-waiting-until-master-instances-are-elected/266445 "2021-03-06T14:23:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmitryyankowski](https://avatars.discourse-cdn.com/v4/letter/d/c77e96/32.png) [@dmitryyankowski](https://discuss.elastic.co/u/dmitryyankowski)\
**Post date:** [March 6, 2021, 2:23pm UTC](https://discuss.elastic.co/t/deployment-stuck-on-waiting-until-master-instances-are-elected/266445/1 "2021-03-06T14:23:57Z")

</div>

Hi guys, i'm trying to deploy another "allocator" instance to my deployment.. and it's currently stuck on " **Waiting until master instances are elected**". What am I doing wrong here. Is deploying 2 instances not allowed because of quorum rules or something? Is there some other configuration I should be adding to the deployment to specify which instance is my master?

The command I used to add the new allocator was:  
`bash <(curl -fsSL https://download.elastic.co/cloud/elastic-cloud-enterprise.sh) install --coordinator-host IP_ADDRESS --roles-token TOKEN --availability-zone ece-zone-2 --roles "allocator"`

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/b/7/b7b8fe48d891cb94dc95a939ae681c3b7c772653.png)

Any help would be appreciated!

Also seeing this error!

There was a problem applying this configuration change!

> Plan change failed: [ClusterFailure:MasterNotDetectedInTime]: Failed to detect that a master was elected. Check thee health of the cluster, and look at the instance logs to determine if there were any issues with cluster formation or leadership election. Details: [{"details":"The state did not become the desired one before [5 minutes] elapsed. Last error was: [Instance [instance-0000000017] has no master.]"}]

---

<div class="post-metadata">

**Author:** ![dmitryyankowski](https://avatars.discourse-cdn.com/v4/letter/d/c77e96/32.png) [@dmitryyankowski](https://discuss.elastic.co/u/dmitryyankowski)\
**Post date:** [March 8, 2021, 7:44am UTC](https://discuss.elastic.co/t/deployment-stuck-on-waiting-until-master-instances-are-elected/266445/2 "2021-03-08T07:44:07Z")

</div>

I've run into this issue on multiple different cloud hosts now. Tried with bare metal servers I operate locally and on AWS EC2. There's got to be something i'm missing here.

According to [High availability | Elastic Cloud Enterprise Reference [2.8] | Elastic](https://www.elastic.co/guide/en/cloud-enterprise/2.8/ece-ha.html) it says:

> The main difference between Elastic Cloud Enterprise installations that include two or three availability zones is that three availability zones enable Elastic Cloud Enterprise to create clusters with a _tiebreaker_ .

However when I try to make this change:

 ![](https://us1.discourse-cdn.com/elastic/original/3X/8/f/8fae1eaee48f17a80ef668cd98412934e75c1606.png)

On my activity feed it just says: **Waiting until master instances are elected** for like 5 minutes, and then ends up failing with the following error:

> Plan change failed: [ClusterFailure:MasterNotDetectedInTime]: Failed to detect that a master was elected. Check thee health of the cluster, and look at the instance logs to determine if there were any issues with cluster formation or leadership election. Details: [{"details":"The state did not become the desired one before [5 minutes] elapsed. Last error was: [Instance [instance-0000000017] has no master.]"}]

Is there a step im missing somewhere? I figured deploying Elasticsearch to 2 zones would be pretty simple.. as everything else is. It doesn't create a Tiebreaker node in the 3rd zone.. like it does in Elastic Cloud (Non self hosted).

**Note** : This is my current setup:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/5/0586531eb590ba0eb110546f0eb7dc4799899ca2.png)

I'm assuming other people have run into this as well... since it's not just tied to 1 cloud provider.

---

<div class="post-metadata">

**Author:** ![dmitryyankowski](https://avatars.discourse-cdn.com/v4/letter/d/c77e96/32.png) [@dmitryyankowski](https://discuss.elastic.co/u/dmitryyankowski)\
**Post date:** [March 8, 2021, 8:54am UTC](https://discuss.elastic.co/t/deployment-stuck-on-waiting-until-master-instances-are-elected/266445/3 "2021-03-08T08:54:15Z")

</div>

Look's like the issue was with the security group inside EC2. One of my EC2 instances didn't have the inbound ports open. Derp me! 😄 Works just fine now!

---

<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:** [March 22, 2021, 8:54am UTC](https://discuss.elastic.co/t/deployment-stuck-on-waiting-until-master-instances-are-elected/266445/4 "2021-03-22T08:54:25Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
