# 3 node cluster setup

**URL:** <https://discuss.elastic.co/t/3-node-cluster-setup/177032>\
**Category:** Elasticsearch\
**Created:** [April 16, 2019, 8:53am UTC](https://discuss.elastic.co/t/3-node-cluster-setup/177032 "2019-04-16T08:53:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Timshs](https://avatars.discourse-cdn.com/v4/letter/t/958977/32.png) [@Timshs](https://discuss.elastic.co/u/Timshs)\
**Post date:** [April 16, 2019, 8:53am UTC](https://discuss.elastic.co/t/3-node-cluster-setup/177032/1 "2019-04-16T08:53:08Z")

</div>

Hi  
I have 3 nodes setup in my cluster.  
One node.master = true and two node.data = true

Is this the right way to avoid split brain ?

I seem to get:  
[WARN][o.e.x.s.t.n.SecurityNetty4ServerTransport] [rg-app-prod-masterNode1] send message failed [channel: NettyTcpChannel{localAddress=0.0.0.0/0.0.0.0:9300, remoteAddress=/xx.x.xxx.13:41604}]  
java.nio.channels.ClosedChannelException: null  
at io.netty.channel.AbstractChannel$AbstractUnsafe.write(...)(Unknown Source) ~[?:?]

also see this:  
[2019-04-15T12:36:02,819][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [rg-app-prod-masterNode1] fatal error in thread [Thread-51236], exiting  
java.lang.OutOfMemoryError: Java heap space

and

[WARN][o.e.c.a.s.ShardStateAction] [rg-app-prod-masterNode1] unexpected failure while sending request [internal:cluster/shard/failure] to [{rg-app-prod-dataNode2}{LbFMQnQgS0OZk2c-3XKOPw}{EtCHBmXSTwuY9QJmlMpx-g}{xx.x.xx.14}{xx.x.xxx.14:9300}{ml.machine\_memory=8340840448, ml.max\_open\_jobs=20, xpack.installed=true, ml.enabled=true}] for shard entry [shard id [[indice-2019.04.15][2]], allocation id [2mq4o\_T2TQWlbqjhsyhASw], primary term [2], message [failed to perform indices:data/write/bulk[s] on replica [indice-2019.04.15][2], node[LbFMQnQgS0OZk2c-3XKOPw], [R], s[STARTED], a[id=2mq4o\_T2TQWlbqjhsyhASw]], failure [RemoteTransportException[[rg-app-prod-dataNode2][xx.x.xxx.14:9300][indices:data/write/bulk[s][r]]]; nested: IllegalStateException[active primary shard [indice-2019.04.15][2], node[LbFMQnQgS0OZk2c-3XKOPw], [P], s[STARTED], a[id=2mq4o\_T2TQWlbqjhsyhASw] cannot be a replication target before relocation hand off, state is [STARTED]]; ], markAsStale [true]]  
org.elasticsearch.transport.RemoteTransportException: [rg-app-prod-dataNode2][xx.x.xxx.14:9300][internal:cluster/shard/failure]  
Caused by: org.elasticsearch.cluster.action.shard.ShardStateAction$NoLongerPrimaryShardException: primary term [2] did not match current primary term [3]

Do I need to set node.data = false - on master, and node.master = false on data nodes ?

---

<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:** [April 16, 2019, 8:54am UTC](https://discuss.elastic.co/t/3-node-cluster-setup/177032/2 "2019-04-16T08:54:49Z")

</div>

What version are you on?

---

<div class="post-metadata">

**Author:** ![Timshs](https://avatars.discourse-cdn.com/v4/letter/t/958977/32.png) [@Timshs](https://discuss.elastic.co/u/Timshs)\
**Post date:** [May 1, 2019, 9:23am UTC](https://discuss.elastic.co/t/3-node-cluster-setup/177032/3 "2019-05-01T09:23:09Z")

</div>

Hi.  
Thanks for replying and sorry for the delay. The version is 6.4.2 😊

---

<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:** [May 29, 2019, 9:23am UTC](https://discuss.elastic.co/t/3-node-cluster-setup/177032/4 "2019-05-29T09:23:12Z")

</div>

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