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

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"

Welcome to our community! :smiley:
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 :slight_smile:

Are you using ECK for this deployment?

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.

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"

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