Cannot generate syskeygen

Storing generated key in [/etc/elasticsearch/x-pack/system_key]...
Exception in thread "main" java.nio.file.NoSuchFileException: /etc/elasticsearch/x-pack/system_key
at sun.nio.fs.UnixException.translateToIOException(
at sun.nio.fs.UnixException.rethrowAsIOException(
at sun.nio.fs.UnixException.rethrowAsIOException(
at sun.nio.fs.UnixFileSystemProvider.newByteChannel(
at java.nio.file.spi.FileSystemProvider.newOutputStream(
at java.nio.file.Files.newOutputStream(
at java.nio.file.Files.write(
at org.elasticsearch.cli.SettingCommand.execute(
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(
at org.elasticsearch.cli.Command.main(


Can you provide more information such as how you installed elasticsearch, what os, what version of elasticsearch/xpack?

I have installed elasticsearch using the tar.gz package. and i am using ubuntu 14.04 , Elasticsearch-5.1 and Xpack 5.1


what is the exact path of the syskeygen binary? You can find out using the command which. The path mentioned in the error /etc/elasticsearch/x-pack/system_key - was that created by yourself? Or are you using the debian package or may have a leftover of that installation?


Hi Alex
path of syskeygen is elasticsearch-5.1.1/bin/syskeygen
/etc/elasticsearch/x-pack/system_key this is not created by me and not created also.
yes i used debian package for installation

These statements seem to conflict a bit. Do you still have the installation from the debian package? If not, can you remove or rename the /etc/default/elasticsearch file (assuming that it exists).

1 Like

i deleted /etc/elasticsearch folder . and then generated syskeygen . now its working . Thank you for the help :slight_smile:

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