Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Init script in Debian package ignores some options in elasticsearch.yml #1765

Closed
erikrose opened this issue Mar 7, 2012 · 5 comments
Closed

Comments

@erikrose
Copy link

erikrose commented Mar 7, 2012

In the line…

DAEMON_OPTS="-p $PID_FILE -Des.config=$CONF_FILE -Des.path.home=$ES_HOME -Des.path.logs=$LOG_DIR -Des.path.data=$DATA_DIR -Des.path.work=$WORK_DIR -Des.path.conf=$CONF_DIR"

…in /etc/init.d/elasticsearch, several options, like es.path.data, get paved over by the defaults from /etc/default/elasticsearch or by env vars. Any path.data option in elasticsearch.yml is ignored.

@kimchy
Copy link
Member

kimchy commented Mar 7, 2012

Yes, that happens because the parameters provided in the command line override the ones in the config file (they have precedence). Why not change it using the relevant env vars?

@erikrose
Copy link
Author

erikrose commented Mar 7, 2012

Yes, that happens because the parameters provided in the command line override the ones in the config file (they have precedence). Why not change it using the relevant env vars?

It's weird that things like the data path are never obeyed in the config file.

Also, there's not really an opportunity to set env vars before the init.d script runs.

@pierrre
Copy link

pierrre commented Jun 11, 2012

+1 this behavior is really weird
I tried to change the data directory in elasticsearch.yml, and it didn't work...
You should remove parameters in /etc/init.d/elasticsearch

@kimchy
Copy link
Member

kimchy commented Jun 11, 2012

I added #2016, which will allow to solve this problem, will push a fix for this soon.

@kimchy kimchy closed this as completed in 53be815 Jun 11, 2012
@pierrre
Copy link

pierrre commented Jun 11, 2012

Thank you! :)

hibnico pushed a commit to hibnico/elasticsearch that referenced this issue Jun 25, 2012
mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants