We have 2 Ubuntu machines on VMware hypervisor and those attached to the same virtual switch. I installed same version of ElasticSearch (7.6) on them and you can find configurations right bellow:
node-1:
cluster.name: my_elk
node.name: node-1
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
bootstrap.memory_lock: true
transport.host: 192.168.30.14
network.host: [_local_,_site_,_global_]
discovery.seed_hosts: ["192.168.30.15","192.168.30.14"]
cluster.initial_master_nodes: ["node-1", "node-2"]
node-2:
cluster.name: my_elk
node.name: node-2
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
bootstrap.memory_lock: true
transport.host: 192.168.30.15
network.host: [_local_,_site_,_global_]
discovery.seed_hosts: ["192.168.30.15","192.168.30.14"]
cluster.initial_master_nodes: ["node-1", "node-2"]
when starting them they work separately and both have a single active node, I have tried these configurations on one Linux machine with 2 containers and work correctly with the auto-discovery module. What is wrong with my configuration?
Update: log_file
If your two nodes are both working on their own then they have each formed a one-node cluster, which means that the first time they started up they were not configured as you have shown. You cannot merge these two one-node clusters into a two-node cluster. Instead, you should start again: wipe their data paths, and then they will form a brand-new two-node cluster.
There is a note at the bottom of this page of the reference manual that covers this problem:
Elasticsearch will not merge separate clusters together after they have formed, even if you subsequently try and configure all the nodes into a single cluster. This is because there is no way to merge these separate clusters together without a risk of data loss. You can tell that you have formed separate clusters by checking the cluster UUID reported by GET / on each node. If you intended to form a single cluster then you should start again: