Code Monkey home page Code Monkey logo

Comments (14)

wgriffiths avatar wgriffiths commented on May 18, 2024 26

Heres an example of how I installed the head plugin

  1. Start container with volume for plugins and es as its name
docker run -d -P  -p 9200:9200 -p 9300:9300 --name "es" -v "$PWD/es/plugins":/usr/share/elasticsearch/plugins elasticsearch 
  1. Install head plugin
docker exec es /usr/share/elasticsearch/bin/plugin -install mobz/elasticsearch-head

Hope this helps

from elasticsearch.

Gwill avatar Gwill commented on May 18, 2024 18

So how to install plugin?

from elasticsearch.

ibraheeamm avatar ibraheeamm commented on May 18, 2024 9

@wgriffiths the second command depends on your elasticsearch version
if you are using 2.0 then use the same command without the dash character before install
docker exec es /usr/share/elasticsearch/bin/plugin install mobz/elasticsearch-head

Hope this helps

Update

Edited the command after this comment

So I think the command becomes docker exec es /usr/share/elasticsearch/bin/elasticsearch-plugin install mobz/elasticsearch-head

Thanks everyone and hopes it helps

from elasticsearch.

lambdaq avatar lambdaq commented on May 18, 2024 8

In case anyone else is running the latest container

docker pull elasticsearch

Somehow the command was changed to /usr/share/elasticsearch/bin/elasticsearch-plugin

5.2 breaks tons of plugins including their own "Marvel" plugin.

from elasticsearch.

henrywallace avatar henrywallace commented on May 18, 2024 3

I ran into this same problem with elasticsearch:5.6. And #32 (comment) indeed was the solution.

For prosperities sake, here's how I debugged the problem:

I had a docker file

FROM elasticsearch:5.6

COPY my-plugin.zip /
RUN /usr/share/elasticsearch/bin/plugin install file:///my-plugin.zip

But, I would get the following

$ docker build . -t elasticsearch:my-plugin
Sending build context to Docker daemon  24.37MB
Step 1/5 : FROM elasticsearch:5.6
 ---> 9b44bde11dd8
Step 2/5 : COPY my-plugin.zip /
 ---> Using cache
 ---> a27fd93eddb0
Step 3/5 : RUN /usr/share/elasticsearch/bin/plugin install file:///my-plugin.zip
 ---> Running in 78ccd46dcc6b
/bin/sh: 1: /usr/share/elasticsearch/bin/plugin: not found
The command '/bin/sh -c /usr/share/elasticsearch/bin/plugin install file:///my-plugin.zip' returned a non-zero code: 127

So I took the intermediate hash a27fd93eddb0 and did the following:

$ docker run --rm --it a27fd93eddb0 bash
[root@43211f8792a3:/usr/share/elasticsearch]# ls -h /usr/share/elasticsearch/bin/
elasticsearch			elasticsearch-plugin			elasticsearch-translog
elasticsearch-keystore	elasticsearch-systemd-pre-exec	elasticsearch.in.sh

Thar she blows! It's elasticsearch-plugin not plugin.

See also: https://stackoverflow.com/a/26222636/2601179

from elasticsearch.

nuest avatar nuest commented on May 18, 2024 2

After the last comment here, an official blog post was published:

https://www.elastic.co/blog/elasticsearch-docker-plugin-management

Hope this helps

from elasticsearch.

worldsayshi avatar worldsayshi commented on May 18, 2024 2

In later versions /usr/share/elasticsearch/bin/plugin has been changed to /usr/share/elasticsearch/bin/elasticsearch-plugin.

from elasticsearch.

yosifkit avatar yosifkit commented on May 18, 2024 1

Looks like the change from plugin -> elasticsearch-plugin was back in 5.0. Note that /usr/share/elasticsearch/bin/ is in the PATH on all of the images, so you can use plugin on the 1 and 2 series and elasticsearch-plugin on 5 and up.

from elasticsearch.

olidaver avatar olidaver commented on May 18, 2024 1

@wgriffiths the second command depends on your elasticsearch version
if you are using 2.0 then use the same command without the dash character before install
docker exec es /usr/share/elasticsearch/bin/plugin install mobz/elasticsearch-head

Hope this helps

Thank you, vefy helpful for me.

from elasticsearch.

yosifkit avatar yosifkit commented on May 18, 2024

That walkthrough is for dockerfile/elasticsearch, not the official image elasticsearch. You will probably just need to change all the container paths from /data to /usr/share/elasticsearch/data. I am not entirely sure on the config file placement since there is a /usr/share/elasticsearch/config directory.

from elasticsearch.

ebuildy avatar ebuildy commented on May 18, 2024

You can use docker exec or create your own Docker image, that overrides this one.

Then refer to traditional elastic documentation to see the plugin installation syntax.

from elasticsearch.

Gwill avatar Gwill commented on May 18, 2024

@wgriffiths , Thanks!

from elasticsearch.

harobed avatar harobed commented on May 18, 2024

I'm suggest to append this link ( https://www.elastic.co/blog/elasticsearch-docker-plugin-management ) in README

from elasticsearch.

dixon1e avatar dixon1e commented on May 18, 2024

The executable path is correct, but the plugins themselves are not found. Docs say these plugins were moved into X-Pack: https://www.elastic.co/guide/en/marvel/current/installing-marvel.html

from elasticsearch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.