Set up elasticsearch cluster for 2 machines

I am trying to cluster two system as an elastic cluster

I have two system running on ubuntu where elasticsearch is set .The following are the config files with the lines that i have modified or uncommented from the default

Config file(system 1): elastic-cluster-attempt "es-node-1"
node.master: false true
http.port: 9200
transport.tcp.port: 9300 ["",""]

Config file (system 2): elastic-cluster-attempt "es-node-2"
node.master: true true
http.port: 9200
transport.tcp.port: 9300 ["",""]

When i run elastic search with these configurations
sytem 1elasticsearch does not start and throws error : "not enough master nodes discovered during pinging (found [[]], but needed [-1]), pinging again
System 2 starts but does not ping the other system

I want to combine these two systems as a cluster please let me know the mistakes and the right way to do it

Please format your code, logs or configuration files using </> icon as explained in this guide and not the citation button. It will make your post more readable.

Or use markdown style like:


This is the icon to use if you are not using markdown format:

There's a live preview panel for exactly this reasons.

Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.
Please update your post.

Here I think that is wrong and should be
Also it does not make sense to have only one master eligible node.
So actually write: elastic-cluster-attempt "es-node-1" ["",""]

And elastic-cluster-attempt "es-node-2" ["",""]

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