You can just download the tar.gz, unpack it, and start ES with
./bin/elasticsearch -Des.node.name=... or set ES_JAVA_OPTS to -
Des.node.name=..., in any startup script you prefer.
There is no need to build from source. ES behaves just like any Java app I
know of that uses Java system properties,
Hello Jorg,
I was not aware of this page, but after skimming the page it is not what I
need in this situation.
The majority of the commands on this page are invoked as attributes of
systemctl which is the command line tool to inspect, modify and manage
systemd in a running system.
I'm not sure
OK,
I ran each of your tests, but because I'm invoking elasticsearch as a
service and not from the CLI, I interactively ran the command you wanted
prepended, then started the elasticsearch service, then reloaded
elasticsearch-head pointing to the elasticsearch node.
So, as follows, I first
yep, my setup is a little bit different from yours
i actually downloaded elasticsearch as tar.gz file
probably the problem you are experiencing is related more to the fact that
systemctl is not passing environment variables to executed script
i had similar problem with upstart (which is
After posting my last, I noticed that auto-correct modified systemd to
system
Should read
I noticed that a number of similar -Des commands are implemented in the
systemd Unit file referencing variables.
Tony
On Monday, December 23, 2013 2:19:46 PM UTC-8, Tony Su wrote:
Additional minor
Note, if you are using systemd, you must set environment vars with
systemctl http://www.freedesktop.org/software/systemd/man/systemctl.html
Not sure what -Des commands are. If you mean the elasticsearch command
line, many ES config variables can be prefixed with es., the -D flag is
Java.
Jörg
On Linux/Solaris:
./bin/elasticsearch -Des.node.name=`hostname`
or
ES_JAVA_OPTS=-Des.node.name=`hostname` ./bin/elasticsearch
Jörg
--
You received this message because you are subscribed to the Google Groups
elasticsearch group.
To unsubscribe from this group and stop receiving emails from
Thx jorg, unfortunately your suggestions only configure actual strings, like my
original example I'm hoping to automatically retrieve and insert the hostname
of the machine. BTW if your suggestion is used in a config I've determined the
./bin/elasticsearch should be omitted.
Karol,
That looks
You can easily use ES_JAVA_OPTS in your favorite startup script, for
automatic retrieving and inserting the hostname.
Jörg
--
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
Take a look at default elasticsearch.yml:
https://github.com/elasticsearch/elasticsearch/blob/master/config/elasticsearch.yml
especially this part:
# Any element in the configuration can be replaced with environment variables
# by placing them in ${...} notation. For example:
#
# node.rack:
System:
Java openJDK 1.7
elasticsearch 0.90.7
Following some old instructions, I modified
/etc/sysconfig/elasticsearch
ES_JAVA_OPTS=-Des.node.name=$(name -n cut -d'.' -f1)
But, that crashes the elasticsearch service on start.
I've tried the entry both with and without the double-quotes.
elasticsearch config file supports environment variables (and java system
properties) substitution
for example (elasticsearch.yml):
*node.name: ${name}*
*${name}* will be replaced with environment variable (export
name=hostname) or system property (ES_JAVA_OPTS=-Dname=hostname)
On
12 matches
Mail list logo