Cannot get nodes to join same cluster

Ive been going in circles for days now cannot get these two nodes to join the same cluster, any help would be appreciated:

config for node 1:

cluster.name: my-elastic
node.name: node-1
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
network.host: 0.0.0.0
discovery.seed_hosts:
   - 598717Ubuntu1
   - 598717Ubuntu2
cluster.initial_master_nodes:
  - 598717Ubuntu1
  - 598717Ubuntu2
xpack.security.enabled: true
xpack.security.authc.realms.native.native1.order: 1

config for node 2:

cluster.name: my-elastic
node.name: node-2
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
network.host: 0.0.0.0
discovery.seed_hosts:
   - 598717Ubuntu1
   - 598717Ubuntu2
cluster.initial_master_nodes:
  - 598717Ubuntu1
  - 598717Ubuntu2
xpack.security.enabled: true
xpack.security.authc.realms.native.native1.order: 1

Its so strange. They can curl each other and bring up cluster info, so I know they can communicate. I even telnet'd using 9300. Is there something I'm missing?

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:

```
CODE
```

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 as the configuration is not really readable here.

This sounds like a duplicate of this recent post:

thank you, that was exactly the problem. I wiped the data dir (actually I removed it entirely and had to recreate it and put the permissions back because it errored out), so for anyone else clear the dir contents dont actually remove the dir itself. once I did that, it attached to the cluster.

1 Like

I have two other posts where I did actually do what you said, didn't think it was necessary for this one because it was just lines from my config file, ill do it in the future.

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