# How to install and setup x-pack on two node with one cluster?

**URL:** <https://discuss.elastic.co/t/how-to-install-and-setup-x-pack-on-two-node-with-one-cluster/125116>\
**Category:** Elasticsearch\
**Created:** [March 22, 2018, 7:11am UTC](https://discuss.elastic.co/t/how-to-install-and-setup-x-pack-on-two-node-with-one-cluster/125116 "2018-03-22T07:11:27Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karthik\_Saravanan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/karthik_saravanan/32/28858_2.png) [@Karthik\_Saravanan](https://discuss.elastic.co/u/Karthik_Saravanan)\
**Post date:** [March 22, 2018, 7:11am UTC](https://discuss.elastic.co/t/how-to-install-and-setup-x-pack-on-two-node-with-one-cluster/125116/1 "2018-03-22T07:11:27Z")

</div>

I have configured one cluster with two nodes, one is master node and another one is a data node. Now, have to install and configure xpack on these nodes,

**Master Node:**  
cluster.name: ELK\_master  
node.name: node-master  
node.data: false  
node.ingest: false  
node.master: true  
network.host: 172.xx.xx.16

**Data Node:**  
cluster.name: ELK\_master  
node.name: node-data  
node.data: true  
node.ingest: false  
node.master: false  
network.host: 110.xx.xx.108

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 22, 2018, 7:22am UTC](https://discuss.elastic.co/t/how-to-install-and-setup-x-pack-on-two-node-with-one-cluster/125116/2 "2018-03-22T07:22:04Z")

</div>

Have you been through [https://www.elastic.co/guide/en/elasticsearch/reference/6.2/setup-xpack.html](https://www.elastic.co/guide/en/elasticsearch/reference/6.2/setup-xpack.html)?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 22, 2018, 7:29am UTC](https://discuss.elastic.co/t/how-to-install-and-setup-x-pack-on-two-node-with-one-cluster/125116/3 "2018-03-22T07:29:18Z")

</div>

Why would you set up a cluster this way? With this setup you now have two points of failure instead of one.

---

<div class="post-metadata">

**Author:** ![Karthik\_Saravanan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/karthik_saravanan/32/28858_2.png) [@Karthik\_Saravanan](https://discuss.elastic.co/u/Karthik_Saravanan)\
**Post date:** [March 22, 2018, 7:31am UTC](https://discuss.elastic.co/t/how-to-install-and-setup-x-pack-on-two-node-with-one-cluster/125116/4 "2018-03-22T07:31:23Z")

</div>

I know the xpack installation on ELK. My question is how do I configure one cluster name with two nodes, these nodes from the different ec2 machine. do you understand what im asking?

---

<div class="post-metadata">

**Author:** ![Karthik\_Saravanan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/karthik_saravanan/32/28858_2.png) [@Karthik\_Saravanan](https://discuss.elastic.co/u/Karthik_Saravanan)\
**Post date:** [March 22, 2018, 7:42am UTC](https://discuss.elastic.co/t/how-to-install-and-setup-x-pack-on-two-node-with-one-cluster/125116/5 "2018-03-22T07:42:16Z")

</div>

I'm learning ELK with multiple nodes. please, can you explain to me what I made mistake?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 22, 2018, 7:48am UTC](https://discuss.elastic.co/t/how-to-install-and-setup-x-pack-on-two-node-with-one-cluster/125116/6 "2018-03-22T07:48:53Z")

</div>

You have provided very little information about what is not working. Have you configured [discovery settings](https://www.elastic.co/guide/en/elasticsearch/reference/current/discovery-settings.html) so the nodes can find eachother?

---

<div class="post-metadata">

**Author:** ![Karthik\_Saravanan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/karthik_saravanan/32/28858_2.png) [@Karthik\_Saravanan](https://discuss.elastic.co/u/Karthik_Saravanan)\
**Post date:** [March 22, 2018, 8:21am UTC](https://discuss.elastic.co/t/how-to-install-and-setup-x-pack-on-two-node-with-one-cluster/125116/7 "2018-03-22T08:21:14Z")

</div>

This is my live code, working fine  
**Master Node:**  
cluster.name: ELK\_master  
node.name: node-master  
node.data: false  
node.ingest: false  
node.master: true  
bootstrap.memory\_lock: true  
network.host: 172.xx.xx.16  
http.port: 9200  
transport.tcp.port: 9300  
path.data: D:/ELK/elasticsearch-6.2.2/data  
path.logs: D:/ELK/elasticsearch-6.2.2/logs  
discovery.zen.ping.unicast.hosts: ["110.xx.xx.108:9300"]

**Data Node:**  
cluster.name: ELK\_master  
node.name: node-data  
node.data: true  
node.ingest: false  
node.master: false  
bootstrap.memory\_lock: true  
network.host: 110.xx.xx.108  
http.port: 9200  
transport.tcp.port: 9300  
path.data: D:/ELK/elasticsearch-6.2.2/data  
path.logs: D:/ELK/elasticsearch-6.2.2/logs  
discovery.zen.ping.unicast.hosts: ["172.xx.xx.16:9300"]

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 22, 2018, 9:09am UTC](https://discuss.elastic.co/t/how-to-install-and-setup-x-pack-on-two-node-with-one-cluster/125116/8 "2018-03-22T09:09:20Z")

</div>

That looks fine. If this is working well, what is the problem?

---

<div class="post-metadata">

**Author:** ![Karthik\_Saravanan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/karthik_saravanan/32/28858_2.png) [@Karthik\_Saravanan](https://discuss.elastic.co/u/Karthik_Saravanan)\
**Post date:** [March 22, 2018, 9:16am UTC](https://discuss.elastic.co/t/how-to-install-and-setup-x-pack-on-two-node-with-one-cluster/125116/9 "2018-03-22T09:16:44Z")

</div>

If I install xpack to those two nodes, how it will communicate with each other nodes?  
For example:

1. **Master** node protected with username **elastic** and password **master**
2. **Data** node protected with username **elastic** and password **datanode**

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 22, 2018, 9:18am UTC](https://discuss.elastic.co/t/how-to-install-and-setup-x-pack-on-two-node-with-one-cluster/125116/10 "2018-03-22T09:18:41Z")

</div>

Security is managed cluster wide, so all nodes would have the same users and passwords. You do not have different credentials per node.

---

<div class="post-metadata">

**Author:** ![Karthik\_Saravanan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/karthik_saravanan/32/28858_2.png) [@Karthik\_Saravanan](https://discuss.elastic.co/u/Karthik_Saravanan)\
**Post date:** [March 22, 2018, 9:24am UTC](https://discuss.elastic.co/t/how-to-install-and-setup-x-pack-on-two-node-with-one-cluster/125116/11 "2018-03-22T09:24:46Z")

</div>

So, have to set same username and password for all nodes while installing xpack(elasticsearch and kibana), right?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 22, 2018, 9:27am UTC](https://discuss.elastic.co/t/how-to-install-and-setup-x-pack-on-two-node-with-one-cluster/125116/12 "2018-03-22T09:27:20Z")

</div>

When you create users and roles in Kibana or [through the APIs](https://www.elastic.co/guide/en/x-pack/current/security-getting-started.html), these are stored in the cluster state and distributed to all nodes in the cluster. You therefore just set up each user/role once.

---

<div class="post-metadata">

**Author:** ![Karthik\_Saravanan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/karthik_saravanan/32/28858_2.png) [@Karthik\_Saravanan](https://discuss.elastic.co/u/Karthik_Saravanan)\
**Post date:** [March 23, 2018, 11:08am UTC](https://discuss.elastic.co/t/how-to-install-and-setup-x-pack-on-two-node-with-one-cluster/125116/13 "2018-03-23T11:08:03Z")

</div>

Step 1: install elasticsearch on master and data node  
Step 2: install x-pack on Master node  
Step 3: **Master Node -** Restart elasticsearch and set up x-pack password

```
D:\ELK\elasticsearch-6.2.3\bin\x-pack>setup-passwords auto
Initiating the setup of passwords for reserved users elastic,kibana,logstash_system.
The passwords will be randomly generated and printed to the console.
Please confirm that you would like to continue [y/N]y
Connection failure to: http://34.xx.xx.xx:9200/_xpack/security/user/kibana/_password?pretty failed: Read timed out 
ERROR: Failed to set password for user [kibana].

```

Step 4: **Data Node -** Restart elasticsearch and install x-pack, again restart elasticsearch and setup password

```
D:\ELK\elasticsearch-6.2.3\bin\x-pack>setup-passwords auto
Initiating the setup of passwords for reserved users elastic,kibana,logstash_system.

Changed password for user kibana
PASSWORD kibana = LIXWOpQvVXRAsSjwe8ob

Changed password for user logstash_system
PASSWORD logstash_system = dJLYCTi9ZrHT34azxmms

Changed password for user elastic
PASSWORD elastic = C7hOKNU4Kol1hGc0DmRj

```

Reffered from [here](https://discuss.elastic.co/t/unable-to-run-set-password-in-6-x/117382/3#post_4) and point 1 to 4, How do i fix step 3 issue?

---

<div class="post-metadata">

**Author:** ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)\
**Post date:** [March 23, 2018, 9:23pm UTC](https://discuss.elastic.co/t/how-to-install-and-setup-x-pack-on-two-node-with-one-cluster/125116/14 "2018-03-23T21:23:48Z")

</div>

You don't run `setup-passwords` on each node individually, you run it once for the whole cluster. You don't need to fix step 3, because you've already run step 4.

The reason step 3 is failing is because you only have a master node online, and no data nodes. The password change cannot be processed if there are no data nodes available to store the new passwords.

Your cluster topology is very strange, and is going to cause these sorts of problems. Why are you trying to run a dedicated master in a 2 node cluster?

---

<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:** [April 20, 2018, 9:24pm UTC](https://discuss.elastic.co/t/how-to-install-and-setup-x-pack-on-two-node-with-one-cluster/125116/15 "2018-04-20T21:24:33Z")

</div>

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