ElasticSearch (2.3.1) didn't start in case of duplicate variables in elasticsearch.yml

Hi Team

I recently figured out that if somehow i define same variable twice in elasticsearch.yml, My Elasticsearch server doesn't come up after restart. Strange part is that we don't get anything in /var/log/elasticsearch/cluster_name.log and service gets fail.

* Starting Elasticsearch Server [fail]

Here is my faulty configuration file :-
# Cluster name
cluster.name: my_es_cluster

node.name:  "node2"
node.master: true
node.data: true
node.rack_id: "A"
# run only 1 copy of ES in this machine
node.max_local_storage_nodes: 1

# run only 1 copy of ES in this machine
node.max_local_storage_nodes: 1

# take all memory even if not using it
bootstrap.mlockall: true

# number of master nodes
discovery.zen.minimum_master_nodes: 1

# other nodes
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: [] 

After deleting below mentioned duplicate part, I got it fixed -
# run only 1 copy of ES in this machine
node.max_local_storage_nodes: 1

What i expect? - Is there any way to get details of such errors as I had to figure it out by myself and wasted like 2 hrs.

Any suggestions/comment would be appreciable.

hey,

for future reference, a quick overview over your configuration (without the comments, and thus duplicates are easier to spot) can be achieved by using grep "^[^#]" config/elasticsearch.yml. In addition, the next major version of elasticsearch will have strict setting parsing and return an error on start up if this happens.

--Alex