# ElasticSearch Keystore Setup up error when deploying Docker image 7:10:2 to pod

**URL:** https://discuss.elastic.co/t/elasticsearch-keystore-setup-up-error-when-deploying-docker-image-72-to-pod/276402
**Category:** Elasticsearch
**Tags:** elastic-stack-security, docker
**Created:** [June 18, 2021, 3:21pm UTC](https://discuss.elastic.co/t/elasticsearch-keystore-setup-up-error-when-deploying-docker-image-72-to-pod/276402 "2021-06-18T15:21:32Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![patelsop78](https://avatars.discourse-cdn.com/v4/letter/p/22d042/32.png) [@patelsop78](https://discuss.elastic.co/u/patelsop78)
#### Post date: [June 18, 2021, 3:21pm UTC](https://discuss.elastic.co/t/elasticsearch-keystore-setup-up-error-when-deploying-docker-image-72-to-pod/276402/1 "2021-06-18T15:21:32Z")

</div>

Getting below error when deploying pod using Docker 7.10.2 image.

Exception in thread "main" java.io.IOException: Is a directory: SimpleFSIndexInput(path="/usr/share/elasticsearch/config/elasticsearch.keystore")  
at org.apache.lucene.store.SimpleFSDirectory$SimpleFSIndexInput.readInternal(SimpleFSDirectory.java:172)  
at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:315)  
at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:56)  
at org.apache.lucene.store.BufferedChecksumIndexInput.readByte(BufferedChecksumIndexInput.java:41)  
at org.apache.lucene.store.DataInput.readInt(DataInput.java:102)  
at org.apache.lucene.codecs.CodecUtil.checkHeader(CodecUtil.java:194)  
at org.elasticsearch.common.settings.KeyStoreWrapper.load(KeyStoreWrapper.java:224)  
at org.elasticsearch.common.settings.HasPasswordKeyStoreCommand.execute(HasPasswordKeyStoreCommand.java:42)  
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)  
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127)  
at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:91)  
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127)  
at org.elasticsearch.cli.Command.main(Command.java:90)  
at org.elasticsearch.common.settings.KeyStoreCli.main(KeyStoreCli.java:43)  
Caused by: java.io.IOException: Is a directory  
at java.base/sun.nio.ch.FileDispatcherImpl.read0(Native Method)  
at java.base/sun.nio.ch.FileDispatcherImpl.read(FileDispatcherImpl.java:48)  
at java.base/sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:276)  
at java.base/sun.nio.ch.IOUtil.read(IOUtil.java:245)  
at java.base/sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:229)  
at org.apache.lucene.store.SimpleFSDirectory$SimpleFSIndexInput.readInternal(SimpleFSDirectory.java:162)  
... 13 more

Here is details

Try to add elasticsearch.keystore when creating Statefulset of elastic data or master node. I am using 7.10.2 elastic search docker image for deployment of Pod. Here are my ymal snip it for elasticsearch.keystore.

volumeMounts:

```
    - name: data
      mountPath: /usr/share/elasticsearch/data
    - name: elasticsearch-keystore
      mountPath: /usr/share/elasticsearch/config/elasticsearch.keystore
      subPath: elasticsearch.keystore

```

volumes:  
- name: config  
configMap:  
name: masternode-config  
- name: elasticsearch-keystore  
secret:  
secretName: elasticsearch-keystore

And i create temp AKS secrets using below yaml

apiVersion: v1  
kind: Secret  
metadata:  
name: elasticsearch-keystore  
type: Opaque  
stringData:  
test: "XXXX"

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [June 21, 2021, 1:05am UTC](https://discuss.elastic.co/t/elasticsearch-keystore-setup-up-error-when-deploying-docker-image-72-to-pod/276402/2 "2021-06-21T01:05:22Z")

</div>

Welcome to our community! 😃  
Please format your code/logs/config using the `</>` button, or markdown style back ticks. It helps to make things easy to read which helps us help you 🙂

Are you using ECK for this deployment?

---

<div class="post-metadata">

### Author: ![patelsop78](https://avatars.discourse-cdn.com/v4/letter/p/22d042/32.png) [@patelsop78](https://discuss.elastic.co/u/patelsop78)
#### Post date: [June 21, 2021, 2:40pm UTC](https://discuss.elastic.co/t/elasticsearch-keystore-setup-up-error-when-deploying-docker-image-72-to-pod/276402/3 "2021-06-21T14:40:20Z")

</div>

Here I add \< /\> for code and log. I am not using ECK. I used self managed Elastic cluster at AKS.

[quote="patelsop78, post:1, topic:276402, full:true"]  
Getting below error when deploying pod using Docker 7.10.2 image.

```auto
Exception in thread "main" java.io.IOException: Is a directory: SimpleFSIndexInput(path="/usr/share/elasticsearch/config/elasticsearch.keystore")
at org.apache.lucene.store.SimpleFSDirectory$SimpleFSIndexInput.readInternal(SimpleFSDirectory.java:172)
at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:315)
at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:56)
at org.apache.lucene.store.BufferedChecksumIndexInput.readByte(BufferedChecksumIndexInput.java:41)
at org.apache.lucene.store.DataInput.readInt(DataInput.java:102)
at org.apache.lucene.codecs.CodecUtil.checkHeader(CodecUtil.java:194)
at org.elasticsearch.common.settings.KeyStoreWrapper.load(KeyStoreWrapper.java:224)
at org.elasticsearch.common.settings.HasPasswordKeyStoreCommand.execute(HasPasswordKeyStoreCommand.java:42)
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127)
at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:91)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127)
at org.elasticsearch.cli.Command.main(Command.java:90)
at org.elasticsearch.common.settings.KeyStoreCli.main(KeyStoreCli.java:43)
Caused by: java.io.IOException: Is a directory
at java.base/sun.nio.ch.FileDispatcherImpl.read0(Native Method)
at java.base/sun.nio.ch.FileDispatcherImpl.read(FileDispatcherImpl.java:48)
at java.base/sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:276)
at java.base/sun.nio.ch.IOUtil.read(IOUtil.java:245)
at java.base/sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:229)
at org.apache.lucene.store.SimpleFSDirectory$SimpleFSIndexInput.readInternal(SimpleFSDirectory.java:162)
... 13 more

```

Here is details

Try to add elasticsearch.keystore when creating Statefulset of elastic data or master node. I am using 7.10.2 elastic search docker image for deployment of Pod. Here are my ymal snip it for elasticsearch.keystore.

```auto
volumeMounts:
    - name: data
      mountPath: /usr/share/elasticsearch/data
    - name: elasticsearch-keystore
      mountPath: /usr/share/elasticsearch/config/elasticsearch.keystore
      subPath: elasticsearch.keystore
.
.
.
volumes:
- name: config
configMap:
name: masternode-config
- name: elasticsearch-keystore
secret:
secretName: elasticsearch-keystore

```

And i create temp AKS secrets using below yaml

```auto
apiVersion: v1
kind: Secret
metadata:
name: elasticsearch-keystore
type: Opaque
stringData:
test: "XXXX"

```

---

<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: [July 19, 2021, 2:40pm UTC](https://discuss.elastic.co/t/elasticsearch-keystore-setup-up-error-when-deploying-docker-image-72-to-pod/276402/4 "2021-07-19T14:40:52Z")

</div>

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