# Elasticsearch-cli

**URL:** <https://discuss.elastic.co/t/elasticsearch-cli/346847>\
**Category:** User Experience\
**Tags:** elastic-stack-monitoring, fleet\
**Created:** [November 10, 2023, 8:07am UTC](https://discuss.elastic.co/t/elasticsearch-cli/346847 "2023-11-10T08:07:03Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![VijayIQA](https://avatars.discourse-cdn.com/v4/letter/v/e19b73/32.png) [@VijayIQA](https://discuss.elastic.co/u/VijayIQA)\
**Post date:** [November 10, 2023, 8:07am UTC](https://discuss.elastic.co/t/elasticsearch-cli/346847/1 "2023-11-10T08:07:03Z")

</div>

Hi Team, while installing plugin or else using Elasticsearch-cli command getting an error. screenshot attached here.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/a/7aad6de550e319bb71e80623245ca36adb8cc062.png)

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 10, 2023, 2:00pm UTC](https://discuss.elastic.co/t/elasticsearch-cli/346847/2 "2023-11-10T14:00:31Z")

</div>

Please don't post images of text as they are hard to read, may not display correctly for everyone, and are not searchable.

Instead, paste the text and format it with `</>` icon or pairs of triple backticks (```), and check the preview window to make sure it's properly formatted before posting it. This makes it more likely that your question will receive a useful answer.

It would be great if you could update your post to solve this.

Could you also tell which version are you exactly using, how you exactly installed it and specifically if you changed the default settings?

---

<div class="post-metadata">

**Author:** ![VijayIQA](https://avatars.discourse-cdn.com/v4/letter/v/e19b73/32.png) [@VijayIQA](https://discuss.elastic.co/u/VijayIQA)\
**Post date:** [November 13, 2023, 3:33am UTC](https://discuss.elastic.co/t/elasticsearch-cli/346847/3 "2023-11-13T03:33:35Z")

</div>

Thank you @dadoonet I will do that, Elasticsearch version 8.8.1 installed on docker. I haven't changed default setting its running with x-pack authentication.

```plaintext
-> Downloading https://github.com/hashicorp/vault-plugin-database-elasticsearch
Exception in thread "main" java.nio.file.NoSuchFileException: /usr/share/elasticsearch/plugins/.installing-17429742378198882369/plugin-descriptor.properties
        at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
        at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
        at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
        at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:219)
        at java.base/java.nio.file.Files.newByteChannel(Files.java:373)
        at java.base/java.nio.file.Files.newByteChannel(Files.java:424)
        at java.base/java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:420)
        at java.base/java.nio.file.Files.newInputStream(Files.java:158)
        at org.elasticsearch.plugins.PluginInfo.readFromProperties(PluginInfo.java:156)
        at org.elasticsearch.plugins.InstallPluginCommand.loadPluginInfo(InstallPluginCommand.java:714)
        at org.elasticsearch.plugins.InstallPluginCommand.installPlugin(InstallPluginCommand.java:793)
        at org.elasticsearch.plugins.InstallPluginCommand.install(InstallPluginCommand.java:776)
        at org.elasticsearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:231)
        at org.elasticsearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:216)
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)
        at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:77)
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)
        at org.elasticsearch.cli.Command.main(Command.java:90)
        at org.elasticsearch.plugins.PluginCli.main(PluginCli.java:47)'''
```

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 13, 2023, 5:14am UTC](https://discuss.elastic.co/t/elasticsearch-cli/346847/4 "2023-11-13T05:14:34Z")

</div>

How are you running your Docker instance?  
What exact command are you running to install the plugin?

---

<div class="post-metadata">

**Author:** ![VijayIQA](https://avatars.discourse-cdn.com/v4/letter/v/e19b73/32.png) [@VijayIQA](https://discuss.elastic.co/u/VijayIQA)\
**Post date:** [November 13, 2023, 5:27am UTC](https://discuss.elastic.co/t/elasticsearch-cli/346847/5 "2023-11-13T05:27:21Z")

</div>

elasticsearch-plugin install [GitHub - hashicorp/vault-plugin-database-elasticsearch: Provides short-lived credentials for Elasticsearch that are unique to each user or application.](https://github.com/hashicorp/vault-plugin-database-elasticsearch)

```auto
sudo docker run --name elastic -p 9600:9400 -p 9500:9400 \
  --env http.host=x.x.x.x \
  --env transport.host=x.x.x.x \
  --env transport.port=9500 \
  --env http.port=9400 \
  --env discovery.type=single-node \
  --env xpack.security.enabled=true \
  --env "ES_JAVA_OPTS=-Xms512m -Xmx512m" \
  --env cluster.name=docker-cluster \
  --env bootstrap.memory_lock=true \
  --volume /data/new_es/:/usr/share/elasticsearch/data \
  --detach docker.elastic.co/elasticsearch/elasticsearch:8.8.1

```

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 13, 2023, 5:56am UTC](https://discuss.elastic.co/t/elasticsearch-cli/346847/6 "2023-11-13T05:56:14Z")

</div>

You can not run this command outside the container.

So how do you run this command?

---

<div class="post-metadata">

**Author:** ![VijayIQA](https://avatars.discourse-cdn.com/v4/letter/v/e19b73/32.png) [@VijayIQA](https://discuss.elastic.co/u/VijayIQA)\
**Post date:** [November 13, 2023, 6:02am UTC](https://discuss.elastic.co/t/elasticsearch-cli/346847/8 "2023-11-13T06:02:29Z")

</div>

exec into the container and used this command elasticsearch-plugin install [https://github.com/hashicorp/vault-plugin-database-elasticsearc](https://github.com/hashicorp/vault-plugin-database-elasticsearc)

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 13, 2023, 10:19am UTC](https://discuss.elastic.co/t/elasticsearch-cli/346847/9 "2023-11-13T10:19:37Z")

</div>

I think it needs to be a URL which specifies the exact version to download and not a github repository.

But where did you see that plugin and how this needs to be installed?

I mean that looking at the docs, it does not seem that you have to install something on elasticsearch side?

> **[GitHub - hashicorp/vault-plugin-database-elasticsearch: Provides short-lived...](https://github.com/hashicorp/vault-plugin-database-elasticsearch#example-walkthrough)**
>
> Provides short-lived credentials for Elasticsearch that are unique to each user or application. - GitHub - hashicorp/vault-plugin-database-elasticsearch: Provides short-lived credentials for Elasti...

So where this line is coming from?

```auto
elasticsearch-plugin install https://github.com/hashicorp/vault-plugin-database-elasticsearch

```

---

<div class="post-metadata">

**Author:** ![VijayIQA](https://avatars.discourse-cdn.com/v4/letter/v/e19b73/32.png) [@VijayIQA](https://discuss.elastic.co/u/VijayIQA)\
**Post date:** [November 13, 2023, 10:25am UTC](https://discuss.elastic.co/t/elasticsearch-cli/346847/10 "2023-11-13T10:25:58Z")

</div>

here is the reference link

> **[Elasticsearch - Database - Secrets Engines | Vault | HashiCorp Developer](https://developer.hashicorp.com/vault/docs/secrets/databases/elasticdb)**
>
> Elasticsearch is one of the supported plugins for the database secrets engine. This
> plugin generates database credentials dynamically based on configured roles
> for Elasticsearch.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 13, 2023, 10:35am UTC](https://discuss.elastic.co/t/elasticsearch-cli/346847/11 "2023-11-13T10:35:18Z")

</div>

And where do you see this install command in the doc?

---

<div class="post-metadata">

**Author:** ![VijayIQA](https://avatars.discourse-cdn.com/v4/letter/v/e19b73/32.png) [@VijayIQA](https://discuss.elastic.co/u/VijayIQA)\
**Post date:** [November 13, 2023, 10:40am UTC](https://discuss.elastic.co/t/elasticsearch-cli/346847/12 "2023-11-13T10:40:19Z")

</div>

@dadoonet I tried with elasticsearh-plugin.yml file as well install command

![image](https://us1.discourse-cdn.com/elastic/original/3X/f/d/fd495ee7371aa6957ce4d45c1833206c256370ce.png)

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 13, 2023, 11:06am UTC](https://discuss.elastic.co/t/elasticsearch-cli/346847/13 "2023-11-13T11:06:35Z")

</div>

I'm repeating my question in case you did not really read it:

> where do you see this install command in the doc?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 11, 2023, 11:07am UTC](https://discuss.elastic.co/t/elasticsearch-cli/346847/14 "2023-12-11T11:07:03Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
