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

Include ES_CLASSPATH in provided SysV init script? #9303

Closed
bflad opened this issue Jan 14, 2015 · 3 comments
Closed

Include ES_CLASSPATH in provided SysV init script? #9303

bflad opened this issue Jan 14, 2015 · 3 comments
Assignees
Labels
:Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts Team:Delivery Meta label for Delivery team

Comments

@bflad
Copy link

bflad commented Jan 14, 2015

Hi Folks,

We're currently using the official elasticsearch/elasticsearch-repository-hdfs/2.0.2-light plugin to support HDFS snapshots. In our environment we use Cloudera Distribution Hadoop, so we need to supply these jars on startup into the Elasticsearch Java classpath.
https://github.com/elasticsearch/elasticsearch-hadoop/tree/master/repository-hdfs

As another point of reference, we're also using the official Puppet module in our environment so this problem would apply to both the supplied RPM files here as well as the Puppet file templates.
https://github.com/elasticsearch/puppet-elasticsearch/blob/master/templates/etc/init.d/elasticsearch.RedHat.erb

Currently, I provide ES_CLASSPATH="$ES_CLASSPATH:/path/to/hadoop/jars" in our /etc/sysconfig/elasticsearch and add an additional line in /etc/init.d/elasticsearch export ES_CLASSPATH (since the official Puppet module doesn't support export ES_CLASSPATH="..." directly).

Should the SysV init script include export ES_CLASSPATH like the other export ES_JAVA_OPTS, export ES_HEAP_SIZE, etc. environments variables in there for consistency? I wouldn't mind submitting a pull request to add this if it makes sense.

Thanks!
Brian

@tlrx tlrx added the :Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts label Jan 15, 2015
@tlrx
Copy link
Member

tlrx commented Jan 15, 2015

Thanks for reporting @bflad

We are currently updating SysV/system/init.d script to make them more consistent. I label this issue with "packaging" so that we keep it in mind when we reshape the scripts.

@tlrx tlrx self-assigned this Jan 15, 2015
@bflad
Copy link
Author

bflad commented Jan 19, 2015

Thanks, @tlrx - please let me know if I can help with anything.

@costin
Copy link
Member

costin commented Dec 3, 2015

Hi,

The security and packaging changes in ES (such as Jar hell) don't play well with Hadoop. Or rather expose some issues in Hadoop which are outside our control. However there are solutions.

Currently the plan is to move the plugin in ES core (see #15191). The plugin takes care of loading the Hadoop libraries from a dedicated folder to avoid jar hell (clashes of classes with the same name/package available in different jars) and also use the proper permissions (and do so in a way that makes the code use them).
The best solution in this case, when using a distro is to package/link the necessary jars in the plugin folder so they get picked up. If they are available in the bootstrapping classpath the plugin can't really do much there and it's up to you to handle that. Typically by enabling the needed permissions to the entire JVM (which is more or less the same as disabling the JVM security) and taking care of any duplicate jars ....

@costin costin closed this as completed Dec 3, 2015
@mark-vieira mark-vieira added the Team:Delivery Meta label for Delivery team label Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts Team:Delivery Meta label for Delivery team
Projects
None yet
Development

No branches or pull requests

4 participants