# Elasticsearch not starting problem

**URL:** <https://discuss.elastic.co/t/elasticsearch-not-starting-problem/278496>\
**Category:** Elasticsearch\
**Tags:** windows\
**Created:** [July 13, 2021, 7:27am UTC](https://discuss.elastic.co/t/elasticsearch-not-starting-problem/278496 "2021-07-13T07:27:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SRIGURU\_VEL](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sriguru_vel/32/88656_2.png) [@SRIGURU\_VEL](https://discuss.elastic.co/u/SRIGURU_VEL)\
**Post date:** [July 13, 2021, 7:27am UTC](https://discuss.elastic.co/t/elasticsearch-not-starting-problem/278496/1 "2021-07-13T07:27:42Z")

</div>

Hello experts,

I am using elk 7.12.0 in my local machine.

I enabled Xpack and generated some certificates for securing purpose.  
But when I start my Elasticsearch i got an error.

the error is:

[2021-07-13T12:48:08,924][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [localhost] uncaught exception in thread [main]  
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalArgumentException: you cannot specify a keystore and key file  
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:163) ~[elasticsearch-7.12.0.jar:7.12.0]  
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150) ~[elasticsearch-7.12.0.jar:7.12.0]  
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:75) ~[elasticsearch-7.12.0.jar:7.12.0]  
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:116) ~[elasticsearch-cli-7.12.0.jar:7.12.0]  
at org.elasticsearch.cli.Command.main(Command.java:79) ~[elasticsearch-cli-7.12.0.jar:7.12.0]  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115) ~[elasticsearch-7.12.0.jar:7.12.0]  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:81) ~[elasticsearch-7.12.0.jar:7.12.0]  
Caused by: java.lang.IllegalArgumentException: you cannot specify a keystore and key file  
at org.elasticsearch.xpack.core.ssl.CertParsingUtils.createKeyConfig(CertParsingUtils.java:223) ~[?:?]  
at org.elasticsearch.xpack.core.ssl.SSLConfiguration.createKeyConfig(SSLConfiguration.java:159) ~[?:?]  
at org.elasticsearch.xpack.core.ssl.SSLConfiguration.(SSLConfiguration.java:52) ~[?:?]  
at org.elasticsearch.xpack.core.ssl.SSLService.lambda$getSSLConfigurations$4(SSLService.java:504) ~[?:?]  
at java.util.HashMap.forEach(HashMap.java:1289) ~[?:1.8.0\_291]  
at java.util.Collections$UnmodifiableMap.forEach(Collections.java:1507) ~[?:1.8.0\_291]  
at org.elasticsearch.xpack.core.ssl.SSLService.getSSLConfigurations(SSLService.java:499) ~[?:?]  
at org.elasticsearch.xpack.core.XPackPlugin.createSSLService(XPackPlugin.java:459) ~[?:?]  
at org.elasticsearch.xpack.core.XPackPlugin.createComponents(XPackPlugin.java:292) ~[?:?]  
at org.elasticsearch.node.Node.lambda$new$17(Node.java:567) ~[elasticsearch-7.12.0.jar:7.12.0]  
at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:267) ~[?:1.8.0\_291]  
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1384) ~[?:1.8.0\_291]  
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[?:1.8.0\_291]  
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) ~[?:1.8.0\_291]  
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[?:1.8.0\_291]  
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0\_291]  
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[?:1.8.0\_291]  
at org.elasticsearch.node.Node.(Node.java:571) ~[elasticsearch-7.12.0.jar:7.12.0]  
at org.elasticsearch.node.Node.(Node.java:278) ~[elasticsearch-7.12.0.jar:7.12.0]  
at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:217) ~[elasticsearch-7.12.0.jar:7.12.0]  
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:217) ~[elasticsearch-7.12.0.jar:7.12.0]  
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:397) ~[elasticsearch-7.12.0.jar:7.12.0]  
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-7.12.0.jar:7.12.0]  
... 6 more

my Elasticsearch.yml file is:

# ======================== Elasticsearch Configuration =========================

# 

# NOTE: Elasticsearch comes with reasonable defaults for most settings.

# Before you set out to tweak and tune the configuration, make sure you

# understand what are you trying to accomplish and the consequences.

# 

# The primary way of configuring a node is via this file. This template lists

# the most important settings you may want to configure for a production cluster.

# 

# Please consult the documentation for further information on configuration options:

# [Elasticsearch Guide | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/index.html)

# 

# ---------------------------------- Cluster -----------------------------------

# 

# Use a descriptive name for your cluster:

# 

#cluster.name: my-application

# 

# ------------------------------------ Node ------------------------------------

# 

# Use a descriptive name for the node:

# 

#node.name: node-1

# 

# Add custom attributes to the node:

# 

#node.attr.rack: r1

# 

# ----------------------------------- Paths ------------------------------------

# 

# Path to directory where to store the data (separate multiple locations by comma):

# 

#path.data: /path/to/data

# 

# Path to log files:

# 

#path.logs: /path/to/logs

# 

# ----------------------------------- Memory -----------------------------------

# 

# Lock the memory on startup:

# 

#bootstrap.memory\_lock: true

# 

# Make sure that the heap size is set to about half the memory available

# on the system and that the owner of the process is allowed to use this

# limit.

# 

# Elasticsearch performs poorly when the system is swapping the memory.

# 

# ---------------------------------- Network -----------------------------------

# 

# By default Elasticsearch is only accessible on localhost. Set a different

# address here to expose this node on the network:

# 

#network.host: 192.168.0.1

# 

# By default Elasticsearch listens for HTTP traffic on the first free port it

# finds starting at 9200. Set a specific HTTP port here:

# 

#http.port: 9200

# 

# For more information, consult the network module documentation.

# 

# --------------------------------- Discovery ----------------------------------

# 

# Pass an initial list of hosts to perform discovery when this node is started:

# The default list of hosts is ["127.0.0.1", "[::1]"]

# 

#discovery.seed\_hosts: ["host1", "host2"]

# 

# Bootstrap the cluster using an initial set of master-eligible nodes:

# 

#cluster.initial\_master\_nodes: ["node-1", "node-2"]

# 

# For more information, consult the discovery and cluster formation module documentation.

# 

# ---------------------------------- Various -----------------------------------

# 

# Require explicit names when deleting indices:

# 

#action.destructive\_requires\_name: true  
cluster.name: elasticsearch  
node.name: localhost  
xpack.security.transport.ssl.enabled: true  
xpack.security.transport.ssl.verification\_mode: certificate  
xpack.security.transport.ssl.client\_authentication: required  
xpack.security.transport.ssl.keystore.path: elastic-certificates.p12  
xpack.security.transport.ssl.truststore.path: elastic-certificates.p12

xpack.security.http.ssl.enabled: true  
xpack.security.http.ssl.keystore.path: http.p12

xpack.security.http.ssl.key: E:\elasticsearch\config\certs\localhost.key  
xpack.security.http.ssl.certificate: E:\elasticsearch\config\certs\localhost.crt  
xpack.security.http.ssl.certificate\_authorities: E:\elasticsearch\config\certs\ca.crt  
xpack.security.transport.ssl.key: E:\elasticsearch\config\certs\localhost.key  
xpack.security.transport.ssl.certificate: E:\elasticsearch\config\certs\localhost.crt  
xpack.security.transport.ssl.certificate\_authorities: E:\elasticsearch\config\certs\ca.crt

xpack.security.enabled: true  
discovery.type: single-node

please help me solve this issue.

thanks,  
Sriguruvel.

---

<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:** [July 14, 2021, 9:00am UTC](https://discuss.elastic.co/t/elasticsearch-not-starting-problem/278496/2 "2021-07-14T09:00:31Z")

</div>

please use proper markdown when formatting snippets. This is really hard to read. Thank you!

the message is a bit hidden in the stack trace

> you cannot specify a keystore and key file

try again by using only one of the two in your configuration

---

<div class="post-metadata">

**Author:** ![SRIGURU\_VEL](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sriguru_vel/32/88656_2.png) [@SRIGURU\_VEL](https://discuss.elastic.co/u/SRIGURU_VEL)\
**Post date:** [July 14, 2021, 9:26am UTC](https://discuss.elastic.co/t/elasticsearch-not-starting-problem/278496/3 "2021-07-14T09:26:56Z")

</div>

Thanks @spinscale for Reply.  
I Solved This issue

---

<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:** [August 11, 2021, 9:27am UTC](https://discuss.elastic.co/t/elasticsearch-not-starting-problem/278496/4 "2021-08-11T09:27:46Z")

</div>

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