# I'm facing .elasticsearch.bootstrap.StartupException: java.lang.IllegalArgumentException: you cannot specify a keystore and key file

**URL:** <https://discuss.elastic.co/t/im-facing-elasticsearch-bootstrap-startupexception-java-lang-illegalargumentexception-you-cannot-specify-a-keystore-and-key-file/350942>\
**Category:** Elasticsearch\
**Created:** [January 12, 2024, 12:25pm UTC](https://discuss.elastic.co/t/im-facing-elasticsearch-bootstrap-startupexception-java-lang-illegalargumentexception-you-cannot-specify-a-keystore-and-key-file/350942 "2024-01-12T12:25:50Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [January 12, 2024, 1:30pm UTC](https://discuss.elastic.co/t/im-facing-elasticsearch-bootstrap-startupexception-java-lang-illegalargumentexception-you-cannot-specify-a-keystore-and-key-file/350942/2 "2024-01-12T13:30:49Z")

</div>

Hi @bshiwanand,

> [@bshiwanand](#):
>
> `you cannot specify a keystore and key file`

Looking at your config and [this similar issue](https://discuss.elastic.co/t/you-cannot-specify-a-keystore-and-key-file/322561) I think the main problem is you have key and keystore configuration both set and should choose one or the other.

Hope that helps!

---

_[View the full topic](https://discuss.elastic.co/t/im-facing-elasticsearch-bootstrap-startupexception-java-lang-illegalargumentexception-you-cannot-specify-a-keystore-and-key-file/350942)._
