Thanks to the advice of @AlexeyPrudnikov about watching logs I was able to fix it, the problem was discovery.zen. modules not present, second problem was memory lock which was fixed by setting it to false.
I also set network.host to 0.0.0.0
So here is the elasticsearch.yml for master node:
cluster.name: myCluster
node.name: "ESNode1"
node.master: true
node.data: true
#network.host: 10.103.1.121
#xpack.security.enabled: false
#http.host: 10.103.1.121
network.host: 0.0.0.0
http.port: 9200
#discovery.zen.ping.multicast.enabled: false
#discovery.zen.ping.unicast.hosts: ["10.103.1.121:9300", "10.103.2.62:9300"]
discovery.seed_hosts: ["10.103.1.121:9300", "10.103.2.62:9300"]
cluster.initial_master_nodes: ["ESNode1"]
#discover.zen.ping.timeout: 20s
transport.tcp.port: 9300
transport.host: 10.103.1.121
bootstrap.memory_lock: false
#cluster.initial_master_nodes: node-1
#discovery.seed_hosts: ["10.103.1.121"]
And for the slave
cluster.name: myCluster
node.name: "ESNode2"
node.master: false
node.data: true
#network.host: 10.103.1.121
#xpack.security.enabled: false
#http.host: 10.103.1.121
network.host: 0.0.0.0
http.port: 9200
#discovery.zen.ping.multicast.enabled: false
#discovery.zen.ping.unicast.hosts: ["10.103.1.121:9300", "10.103.2.62:9300"]
discovery.seed_hosts: ["10.103.1.121:9300", "10.103.2.62:9300"]
#discover.zen.ping.timeout: 20s
transport.tcp.port: 9300
transport.host: 10.103.2.62
cluster.initial_master_nodes: ["ESNode1"]
bootstrap.memory_lock: false
#cluster.initial_master_nodes: node-1
#discovery.seed_hosts: ["10.103.1.121"]
Thank you @AlexeyPrudnikov for your advice
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…