From your first post:
Now you've changed the configuration, but you only changed the cluster name on one of the nodes (you have cluster.name: prod
commented versus uncommented in the two configuration files. The nodes will not join if their cluster names do not match.
I think that you're making this harder than it is. Let's start two nodes, one that is master eligible, the other that is not. The master will bind to 192.168.1.232, the non-master node will bind to 192.168.1.218. Let's start with the simplest configuration that achieves this:
master node (on 192.168.1.232):
$ cat ~/elasticsearch/elasticsearch-5.3.0/config/elasticsearch.yml
node.master: true
network.host: 192.168.1.232
non-master node (on 192.168.1.218):
$ cat ~/elasticsearch/elasticsearch-5.3.0/config/elasticsearch.yml
node.master: false
network.host: 192.168.1.218
discovery.zen.ping.unicast.hosts: [ "192.168.1.232" ]
These nodes start fine, and the non-master node joins the master. From the non-master node:
[2017-04-18T08:30:36,829][INFO ][o.e.c.s.ClusterService ] [j52qxt4] detected_master {IZnpRfC}{IZnpRfCWR-y9Fsz8HnOOxw}{iEUhEOSmTyKEfCe5EpTAuA}{192.168.1.232}{192.168.1.232:9300}, added {{IZnpRfC}{IZnpRfCWR-y9Fsz8HnOOxw}{iEUhEOSmTyKEfCe5EpTAuA}{192.168.1.232}{192.168.1.232:9300},}, reason: zen-disco-receive(from master [master {IZnpRfC}{IZnpRfCWR-y9Fsz8HnOOxw}{iEUhEOSmTyKEfCe5EpTAuA}{192.168.1.232}{192.168.1.232:9300} committed version [3]])
From the master node:
[2017-04-18T08:30:36,823][INFO ][o.e.c.s.ClusterService ] [IZnpRfC] added {{j52qxt4}{j52qxt45R4SBYnlg1g_cIQ}{RGYLtoWWR7q-TT0RH9ddsA}{192.168.1.218}{192.168.1.218:9300},}, reason: zen-disco-node-join[{j52qxt4}{j52qxt45R4SBYnlg1g_cIQ}{RGYLtoWWR7q-TT0RH9ddsA}{192.168.1.218}{192.168.1.218:9300}]
From /_cat/nodes
:
$ curl -XGET 192.168.1.232:9200/_cat/nodes
192.168.1.232 22 95 1 0.21 0.14 0.05 mdi * IZnpRfC
192.168.1.218 21 100 8 2.85 di - j52qxt4
From here, you can add more configuration, taking one step at a time.