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

Error message when running start script #48

Closed
maf23 opened this issue Jan 16, 2013 · 2 comments
Closed

Error message when running start script #48

maf23 opened this issue Jan 16, 2013 · 2 comments

Comments

@maf23
Copy link

maf23 commented Jan 16, 2013

I get an error message when I run the start script manually:

 root@es-6246b:~# /etc/init.d/elasticsearch start
 Starting elasticsearch...
 -su: /root/.bash_profile: Permission denied

I traced this down to the -m flag to su in the init script. This causes the elasticsearch process to try to read ~root/.bash_profile, but it does not have read access to ~root. The simplest solution I can think of is to remove the -m flag, but I do not know if that would have any bad consequences.

@karmi
Copy link
Contributor

karmi commented Jan 16, 2013

Hi, there's been a similar discussion at karmi/cookbook-elasticsearch#31 in the past. I've been never able to consistently reproduce this issue. The -m flag is used so the environment is preserved (namely ES_INCLUDE, PIDFILE, etc).

I can now see the issue:

root@precise64:/home/vagrant# /etc/init.d/elasticsearch start
Starting elasticsearch...
-su: /root/.bash_profile: Permission denied

It's really a warning only, as far as I understand? Anyway, running the command as root is pretty rare, actually, apart from some bootstrapping sequence and such?


Note, there's been a regression in the init script, where the PIDFILE was set incorrectly, it's now fixed as part of karmi/cookbook-elasticsearch@52c2632

[EDITED]

@karmi
Copy link
Contributor

karmi commented Jan 28, 2013

Closed by f875a35

@karmi karmi closed this as completed Jan 28, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants