Node is not joining to the cluster on ubuntu 18.04. Error: master not ready yet

I am trying to create 2 node elastic search cluster. In node 1 cluster is created but while adding node 2 as data node to the cluster i am facing error:master not decided yet. Here is the yml file for adding node 2 to cluster.

version: '2.2'
services:
es02:
image: docker.elastic.co/elasticsearch/elasticsearch:7.0.1
container_name: es02
environment:
- node.name=10.x.x.2
- discovery.seed_hosts=10.x.x.1(master node for cluster)
- discovery.zen.minimum_master_nodes=1
- cluster.initial_master_nodes=10.x.x.1
- cluster.name=docker-cluster
- node.master=false
- node.data=true
- bootstrap.memory_lock=true
#- bootstrap.system_call_filter: false
#- http.cors.enabled=true
#- http.cors.allow-origin=*
#- transport.profiles.default.port=9200
#- transport.tcp.port=9200
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
#- "discovery.zen.ping.unicast.hosts=10.x.x.1:9200"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- esdata02:/usr/share/elasticsearch/data
#ports:
#- 9200:9200
#- 9300:9300
networks:
- esnet
volumes:
esdata02:
driver: local
networks:
esnet:

Could you please help me out from this. Thanks in advance.

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