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

Plugin installation script ignores path.plugins #10673

Closed
orweinberger opened this issue Apr 20, 2015 · 9 comments · Fixed by #10721
Closed

Plugin installation script ignores path.plugins #10673

orweinberger opened this issue Apr 20, 2015 · 9 comments · Fixed by #10721
Assignees
Labels
:Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts Team:Delivery Meta label for Delivery team

Comments

@orweinberger
Copy link

Custom directory that is defined in the elasticsearch.yml under the path.plugins settings is being ignored by the bin/plugin script when installing new plugins.

It attempts to install the plugin to the default directory and there is no way of manually setting the plugin script to install a plugin to a different location.

@tlrx
Copy link
Member

tlrx commented Apr 20, 2015

@orweinberger thanks for reporting. Yes this is a known problem and I'm on it :)

@tlrx tlrx added the :Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts label Apr 20, 2015
@tlrx tlrx self-assigned this Apr 20, 2015
@ppf2
Copy link
Member

ppf2 commented Apr 21, 2015

+1

tlrx added a commit to tlrx/elasticsearch that referenced this issue Apr 22, 2015
The bin/plugin script now uses the default CONF_DIR & CONF_FILE environment vars. This allows to install a plugin even if Elasticsearch has been installed with a RPM or a DEB package. This commit also adds testing files for TAR archive and plugins installation.

Closes elastic#10673
tlrx added a commit to tlrx/elasticsearch that referenced this issue Apr 29, 2015
The bin/plugin script now uses the default CONF_DIR & CONF_FILE environment vars. This allows to install a plugin even if Elasticsearch has been installed with a RPM or a DEB package. This commit also adds testing files for TAR archive and plugins installation.

Closes elastic#10673
tlrx added a commit to tlrx/elasticsearch that referenced this issue May 25, 2015
The bin/plugin script now uses the default CONF_DIR & CONF_FILE environment vars. This allows to install a plugin even if Elasticsearch has been installed with a RPM or a DEB package. This commit also adds testing files for TAR archive and plugins installation.

Closes elastic#10673
tlrx added a commit that referenced this issue May 25, 2015
The bin/plugin script now uses the default CONF_DIR & CONF_FILE environment vars. This allows to install a plugin even if Elasticsearch has been installed with a RPM or a DEB package. This commit also adds testing files for TAR archive and plugins installation.

Closes #10673
@markwalkom
Copy link
Contributor

Just wanted to check what version this fix was released in, I'm still seeing the same problem in 1.7.

@tlrx
Copy link
Member

tlrx commented Jul 27, 2015

@markwalkom I just tested with the cloud-azure plugin and ES 1.7, it seems OK. Can you please elaborate on your issue (paths, privileges, plugins, type of ES installation etc)? Thanks

My output:
 

cd elasticsearch-1.7.0  

cat config/elasticsearch.yml | grep path.plugins
  path.plugins: /tmp/my-plugins

bin/plugin install elasticsearch/elasticsearch-cloud-azure/2.8.0
  -> Installing elasticsearch/elasticsearch-cloud-azure/2.8.0...
  Trying http://download.elasticsearch.org/elasticsearch/elasticsearch-cloud-azure/elasticsearch-cloud-  azure-2.8.0.zip...
  Downloading...DONE
  Installed elasticsearch/elasticsearch-cloud-azure/2.8.0 into /tmp/my-plugins/cloud-azure

@markwalkom
Copy link
Contributor

This is ES 1.7.0 (tar.gz) on OS X.

I installed all of our commercial plugins;

$ grep plugins Confs/ES/elasticsearch.yml
path.plugins: /Users/markw/Workspace/elastic/Data/ES/plugins

$ elasticsearch-1.7.0/bin/plugin install elasticsearch/shield/latest
-> Installing elasticsearch/shield/latest...
Trying http://download.elasticsearch.org/elasticsearch/shield/shield-latest.zip...
Downloading .................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................DONE
Installed elasticsearch/shield/latest into /Users/markw/Workspace/elastic/elasticsearch-1.7.0/plugins/shield
$ elasticsearch-1.7.0/bin/plugin install elasticsearch/license/latest
-> Installing elasticsearch/license/latest...
Trying http://download.elasticsearch.org/elasticsearch/license/license-latest.zip...
Downloading ..........................................DONE
Installed elasticsearch/license/latest into /Users/markw/Workspace/elastic/elasticsearch-1.7.0/plugins/license
$ elasticsearch-1.7.0/bin/plugin install elasticsearch/watcher/latest
-> Installing elasticsearch/watcher/latest...
Trying http://download.elasticsearch.org/elasticsearch/watcher/watcher-latest.zip...
Downloading .............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................DONE
Installed elasticsearch/watcher/latest into /Users/markw/Workspace/elastic/elasticsearch-1.7.0/plugins/watcher

As you can see they just installed to $ES_HOME. Then when I checked what was installed;

$ elasticsearch-1.7.0/bin/plugin -l
Installed plugins:
    - No plugin detected in /Users/markw/Workspace/elastic/elasticsearch-1.7.0/plugins
$ ll /Users/markw/Workspace/elastic/Data/ES/plugins
total 0
drwxr-xr-x   3 markw  staff   102B  4 May 16:37 bigdesk
drwxr-xr-x  15 markw  staff   510B  4 May 16:37 inquisitor
drwxr-xr-x   3 markw  staff   102B  4 May 16:37 kibana3
drwxr-xr-x   3 markw  staff   102B  4 May 16:37 kopf
drwxr-xr-x   3 markw  staff   102B 27 Jul 08:05 license
drwxr-xr-x   5 markw  staff   170B  4 May 16:37 marvel
drwxr-xr-x   8 markw  staff   272B 27 Jul 08:05 shield
drwxr-xr-x   7 markw  staff   238B 27 Jul 08:05 watcher

@tlrx
Copy link
Member

tlrx commented Jul 28, 2015

@markwalkom thanks for the description. I think it doesn't work when executing from outside the elasticsearch directory (ie elasticsearch-1.7.0/bin/plugin) but cd elasticsearch-1.7.0 && bin/plugin should work.

@markwalkom I could not reproduce it on Ubuntu or OSX. In your example, I think that the configuration file is not correctly resolved by the bin/plugin script and thus the custom path.plugins is not used.

Can you edit the elasticsearch-1.7.0/config/elasticsearch.yml file instead of Confs/ES/elasticsearch.yml ?

You can also pass the CONF_DIR and/or CONF_FILE as env vars like CONF_DIR="Confs/ES/" elasticsearch-1.7.0/bin/plugin install elasticsearch/shield/latest

@trekr5
Copy link

trekr5 commented Jan 14, 2016

Hi,

I get a CONF_FILE error when I now attempt to install any plugin in ES 2.1.1.

I'm upgrading from 1.7.3 (where all my plugins worked fine) to 2.1.1 where they now don't.

Can you help?

Thanks

@markwalkom
Copy link
Contributor

@trekr5 please ask on https://discuss.elastic.co.

@trekr5
Copy link

trekr5 commented Jan 14, 2016

Hi,

I've asked the question here on discuss https://discuss.elastic.co/t/upgrading-elasticsearch-from-1-7-3-to-2-1-1/39281/2 with this same config issue that has stopped elasticsearch service from running properly on upgraded nodes and prevents correct install of plugins

@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

Successfully merging a pull request may close this issue.

7 participants