I always start Elasticsearch from within my own wrapper script, es.sh.

Inside this wrapper script is the following incantation:

NODE_OPT="-D*es.node.name*=$(uname -n | cut -d'.' -f1)"

This is verified to work on Linux, Mac OS X, and Solaris (at least).

I then pass $NODE_OPT as a command-line argument to the elasticsearchstart-up 
script.

BTW, I seem to recall reading that the "*es.*" prefix on the node.namevariable 
is no longer needed for 1.0 GA. But it still works fine, so I have 
left it there.

This has always worked since ES 0.19.4 (the very first version I installed 
and started using). I worked closely with our deployment engineer, and we 
settled on a set of wrapper scripts that let me start everything on my 
laptop in exactly the same way that it all starts on a production server.

Brian

On Tuesday, February 25, 2014 10:21:29 AM UTC-5, Tony Su wrote:
>
> One other issue.
>  
> I have never been able to deploy an elasticsearch.yml which names the 
> cluster node the same as the machine hostname despite the suggestions in 
> another thread. It just won't work, and based on another thread I strongly 
> suspect the underlying Java code implements single quotes instead of double 
> quotes when evaluating the variable. 
>  
> So, because it's a unique variable that needs to be set on each machine, 
> that part of the config won't allow simply pointing all nodes to the same 
> config script.
>  
> Is why, short of looking for the error in the Java code I've been looking 
> at various simple and more enterprise tools that write individual config 
> files to each node.
>  
> Tony
>

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/5af309d0-22b5-4809-907d-92b099b36632%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to