We are using Elasticsearch version 2.3.3.  
https://www.elastic.co/guide/en/elasticsearch/reference/2.3/modules-node.html 
is very clear that the value of node.data in 2.3 should be either “true” or 
“false” (as the Boolean, not a quoted string).

 

The default (and necessary) value of node.master in 
https://github.com/apache/metron/blob/master/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/ELASTICSEARCH/2.3.3/package/templates/elasticsearch.master.yaml.j2
 demonstrates that the value “true” without quotes works correctly in the yaml 
file, so the same should work for node.data, which is derived from 

“{{ masters_also_are_datanodes }}”

 

However, the tooltip for masters_also_are_datanodes in 
https://github.com/apache/metron/blob/master/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/ELASTICSEARCH/2.3.3/configuration/elastic-site.xml
 says ‘Set this to "true" if you want the ES master nodes to serve as combined 
master/datanodes. Note: surround value in quotes.’

 

I wrote that myself, altho it was long enough ago I don’t remember exactly the 
experience that made me do so, but in all probability I found that without 
quotes it didn’t traverse its way thru the multiple levels of scripting 
correctly.  And indeed, the default value in that xml file is “false” with 
quotes – but it is also stated to be type string, so that may be important also 
in the way it is transmitted through the xml-python-j2-yaml sequence.

 

Mike, the yaml references I found are pretty clear that “1” is not considered a 
Boolean true.  But who knows.  I’ll be interested to see what you find about 
Elasticsearch working on full dev single-node.  As you know, full-dev does have 
its own parameters that bypass the interactive Ambari setup files.

 

Now, Laurens, two question for you:   First, please confirm: Are you setting 
the value of masters_also_are_datanodes via the masters_also_are_datanodes 
field in the Ambari configuration GUI?  Or directly editing files?

 

Second, do you set it at the initial install time, or afterward?  I’m pretty 
sure it needs to be set at initial install time, before you ever launch the 
Elasticsearch nodes.  I’m dubious about whether an Elasticsearch master can 
learn to be a datanode if it first wakes up and configures itself to not be 
one.  But I’m not an Elasticsearch expert, so if someone else knows different, 
please say so.

 

 Hope this helps more than obfuscates.

--Matt

 

 

 

From: Michael Miklavcic <[email protected]>
Date: Tuesday, September 12, 2017 at 4:54 PM
To: "[email protected]" <[email protected]>
Cc: Matt Foley <[email protected]>
Subject: Re: Elasticsearch masters_also_are_datanodes doesn't work.

 

At the very least, the value provided by default seems to have changed to a "1" 
instead of "true" without the tooltip having been updated to match. 

 

On Tue, Sep 12, 2017 at 4:00 PM, Michael Miklavcic 
<[email protected]> wrote:

I think this is our default setup for full dev. It's only a 1-node VM, so I'm 
pretty sure that it would not work otherwise. I'm spinning up full dev now and 
will look into it also. 

 

 

On Tue, Sep 12, 2017 at 3:04 PM, Laurens Vets <[email protected]> wrote:

https://issues.apache.org/jira/browse/METRON-1181

I'll also spin up a full-dev environment and see what happens there. 



On 2017-09-10 21:50, Matt Foley wrote:

Laurens, please open a jira.  Altho it may seem obvious, please
include full repro.
This may be a showstopper, as it presumably (?) prevents ES from
working on a single-node deployment?

On 9/10/17, 4:01 PM, "Laurens Vets" <[email protected]> wrote:

    Another issue I noticed. Setting "masters_also_are_datanodes" in Ambari
    to "true" does not work.
    The settings in /etc/elasticsearch/elasticsearch.yml will always be
    false when restarting elasticsearch...

 

 

Reply via email to