# Cannot generate syskeygen

**URL:** <https://discuss.elastic.co/t/cannot-generate-syskeygen/70530>\
**Category:** Elasticsearch\
**Created:** [January 4, 2017, 9:31am UTC](https://discuss.elastic.co/t/cannot-generate-syskeygen/70530 "2017-01-04T09:31:37Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dixon\_Almeida](https://avatars.discourse-cdn.com/v4/letter/d/ccd318/32.png) [@Dixon\_Almeida](https://discuss.elastic.co/u/Dixon_Almeida)\
**Post date:** [January 4, 2017, 9:31am UTC](https://discuss.elastic.co/t/cannot-generate-syskeygen/70530/1 "2017-01-04T09:31:37Z")

</div>

/bin/x-pack/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(UnixException.java:86)  
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 java.nio.file.Files.write(Files.java:3292)  
at org.elasticsearch.xpack.security.crypto.tool.SystemKeyTool.execute(SystemKeyTool.java:88)  
at org.elasticsearch.cli.SettingCommand.execute(SettingCommand.java:54)  
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:96)  
at org.elasticsearch.cli.Command.main(Command.java:62)  
at org.elasticsearch.xpack.security.crypto.tool.SystemKeyTool.main(SystemKeyTool.java:65)  
at org.elasticsearch.xpack.security.crypto.tool.SystemKeyTool.main(SystemKeyTool.java:58)

---

<div class="post-metadata">

**Author:** ![jaymode](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jaymode/32/50103_2.png) [@jaymode](https://discuss.elastic.co/u/jaymode)\
**Post date:** [January 4, 2017, 11:37am UTC](https://discuss.elastic.co/t/cannot-generate-syskeygen/70530/2 "2017-01-04T11:37:55Z")

</div>

HI,

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

---

<div class="post-metadata">

**Author:** ![Dixon\_Almeida](https://avatars.discourse-cdn.com/v4/letter/d/ccd318/32.png) [@Dixon\_Almeida](https://discuss.elastic.co/u/Dixon_Almeida)\
**Post date:** [January 5, 2017, 4:11am UTC](https://discuss.elastic.co/t/cannot-generate-syskeygen/70530/3 "2017-01-05T04:11:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [January 5, 2017, 11:01am UTC](https://discuss.elastic.co/t/cannot-generate-syskeygen/70530/4 "2017-01-05T11:01:17Z")

</div>

Hey,

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?

--Alex

---

<div class="post-metadata">

**Author:** ![Dixon\_Almeida](https://avatars.discourse-cdn.com/v4/letter/d/ccd318/32.png) [@Dixon\_Almeida](https://discuss.elastic.co/u/Dixon_Almeida)\
**Post date:** [January 5, 2017, 12:21pm UTC](https://discuss.elastic.co/t/cannot-generate-syskeygen/70530/5 "2017-01-05T12:21:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jaymode](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jaymode/32/50103_2.png) [@jaymode](https://discuss.elastic.co/u/jaymode)\
**Post date:** [January 5, 2017, 12:59pm UTC](https://discuss.elastic.co/t/cannot-generate-syskeygen/70530/6 "2017-01-05T12:59:13Z")

</div>

> [@Dixon\_Almeida](#):
>
> I have installed elasticsearch using the tar.gz package.

> [@Dixon\_Almeida](#):
>
> 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).

---

<div class="post-metadata">

**Author:** ![Dixon\_Almeida](https://avatars.discourse-cdn.com/v4/letter/d/ccd318/32.png) [@Dixon\_Almeida](https://discuss.elastic.co/u/Dixon_Almeida)\
**Post date:** [January 6, 2017, 4:35am UTC](https://discuss.elastic.co/t/cannot-generate-syskeygen/70530/7 "2017-01-06T04:35:24Z")

</div>

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

---

<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:** [February 3, 2017, 4:35am UTC](https://discuss.elastic.co/t/cannot-generate-syskeygen/70530/8 "2017-02-03T04:35:43Z")

</div>

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