Elasticsearch 6.4.0 won't start on RHEL7

Hi Elastic team,

I am trying to install and run Elasticsearch 6.4.0 on RHEL 7 with JAVA:
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)

However, upon running rpm --install elasticsearch-6.4.0.rpm, I get this error:

Exception in thread "main" java.nio.file.FileAlreadyExistsException: /etc/elasticsearch/elasticsearch.keystore.tmp
        at sun.nio.fs.UnixException.translateToIOException(UnixException.java:88)
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
        at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
        at java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:434)
        at java.nio.file.Files.newOutputStream(Files.java:216)
        at org.apache.lucene.store.FSDirectory$FSIndexOutput.<init>(FSDirectory.java:411)
        at org.apache.lucene.store.FSDirectory$FSIndexOutput.<init>(FSDirectory.java:407)
        at org.apache.lucene.store.FSDirectory.createOutput(FSDirectory.java:255)
        at org.elasticsearch.common.settings.KeyStoreWrapper.save(KeyStoreWrapper.java:467)
        at org.elasticsearch.common.settings.CreateKeyStoreCommand.execute(CreateKeyStoreCommand.java:58)
        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.common.settings.KeyStoreCli.main(KeyStoreCli.java:40)
chown: cannot access ‘/etc/elasticsearch/elasticsearch.keystore’: No such file or directory
chmod: cannot access ‘/etc/elasticsearch/elasticsearch.keystore’: No such file or directory
md5sum: /etc/elasticsearch/elasticsearch.keystore: No such file or directory

It seems that there is no elasticsearch.keystore under /etc/elasticsearch. I only manage to see elasticsearch.keystore.tmp. I tried to find elasticsearch-keystore under /bin as suggested in some related articles but couldn't also find it.

How/where can I generate this elasticsearch.keystore?

Thanks in advance.

Hi @Jason_Almonte ,

I would recommend to proceed as follows:

  • Create a copy of /etc/elasticsearch/elasticsearch.keystore.tmp
  • Delete /etc/elasticsearch/elasticsearch.keystore.tmp

Then:

  1. Try to start Elasticsearch. If it starts: Done
  2. If Elasticsearch does not start: (i) locate elasticsearch-keystore (the location depends on your distribution: this will be in your Elasticsearch installation directory; for me, that is /usr/share/elasticsearch); (ii) create the keystore

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