# I am getting below error while setting elastic search

**URL:** <https://discuss.elastic.co/t/i-am-getting-below-error-while-setting-elastic-search/323019>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [January 12, 2023, 11:26am UTC](https://discuss.elastic.co/t/i-am-getting-below-error-while-setting-elastic-search/323019 "2023-01-12T11:26:30Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![devdev7711](https://avatars.discourse-cdn.com/v4/letter/d/3be4f8/32.png) [@devdev7711](https://discuss.elastic.co/u/devdev7711)\
**Post date:** [January 12, 2023, 11:26am UTC](https://discuss.elastic.co/t/i-am-getting-below-error-while-setting-elastic-search/323019/1 "2023-01-12T11:26:30Z")

</div>

I am installing 8.5.3 elastic.  
after yml file change I am double clicking elasticsearch.bat file and service is not starting looks like.

[2023-01-12T14:38:25,268][INFO][o.e.n.Node] [node-1] node name [node-1], node ID [PBa\_3qgMQqOG5ApHLMitrg], cluster name [UNO-application], roles [data\_frozen, ingest, data\_cold, data, remote\_cluster\_client, master, data\_warm, data\_content, transform, data\_hot, ml]  
[2023-01-12T14:38:28,596][ERROR][o.e.b.Elasticsearch] [node-1] fatal exception while booting Elasticsearch  
org.elasticsearch.ElasticsearchSecurityException: failed to load SSL configuration [xpack.security.transport.ssl] - cannot read configured [PKCS12] keystore (as a truststore) [E:\setup\elasticsearch-8.5.3-windows-x86\_64\elasticsearch-8.5.3\config\certs\transport.p12] because the file does not exist  
at org.elasticsearch.xpack.core.ssl.SSLService.lambda$loadSslConfigurations$11(SSLService.java:605) ~[?:?]  
at java.util.HashMap.forEach(HashMap.java:1429) ~[?:?]  
at java.util.Collections$UnmodifiableMap.forEach(Collections.java:1553) ~[?:?]  
at org.elasticsearch.xpack.core.ssl.SSLService.loadSslConfigurations(SSLService.java:601) ~[?:?]  
at org.elasticsearch.xpack.core.ssl.SSLService.(SSLService.java:156) ~[?:?]  
at org.elasticsearch.xpack.core.XPackPlugin.createSSLService(XPackPlugin.java:465) ~[?:?]  
at org.elasticsearch.xpack.core.XPackPlugin.createComponents(XPackPlugin.java:314) ~[?:?]  
at org.elasticsearch.node.Node.lambda$new$16(Node.java:709) ~[elasticsearch-8.5.3.jar:?]  
at org.elasticsearch.plugins.PluginsService.lambda$flatMap$0(PluginsService.java:252) ~[elasticsearch-8.5.3.jar:?]  
at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:273) ~[?:?]  
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?]  
at java.util.AbstractList$RandomAccessSpliterator.forEachRemaining(AbstractList.java:722) ~[?:?]  
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]  
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]  
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:575) ~[?:?]  
at java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260) ~[?:?]  
at java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:616) ~[?:?]  
at java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:622) ~[?:?]  
at java.util.stream.ReferencePipeline.toList(ReferencePipeline.java:627) ~[?:?]  
at org.elasticsearch.node.Node.(Node.java:724) ~[elasticsearch-8.5.3.jar:?]  
at org.elasticsearch.node.Node.(Node.java:318) ~[elasticsearch-8.5.3.jar:?]  
at org.elasticsearch.bootstrap.Elasticsearch$2.(Elasticsearch.java:214) ~[elasticsearch-8.5.3.jar:?]  
at org.elasticsearch.bootstrap.Elasticsearch.initPhase3(Elasticsearch.java:214) ~[elasticsearch-8.5.3.jar:?]  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:67) ~[elasticsearch-8.5.3.jar:?]  
Caused by: org.elasticsearch.common.ssl.SslConfigException: cannot read configured [PKCS12] keystore (as a truststore) [E:\setup\elasticsearch-8.5.3-windows-x86\_64\elasticsearch-8.5.3\config\certs\transport.p12] because the file does not exist  
at org.elasticsearch.common.ssl.SslFileUtil.fileNotFound(SslFileUtil.java:66) ~[?:?]  
at org.elasticsearch.common.ssl.SslFileUtil.ioException(SslFileUtil.java:37) ~[?:?]  
at org.elasticsearch.common.ssl.StoreTrustConfig.readKeyStore(StoreTrustConfig.java:98) ~[?:?]  
at org.elasticsearch.common.ssl.StoreTrustConfig.createTrustManager(StoreTrustConfig.java:82) ~[?:?]  
at org.elasticsearch.xpack.core.ssl.SSLService.createSslContext(SSLService.java:473) ~[?:?]  
at java.util.HashMap.computeIfAbsent(HashMap.java:1228) ~[?:?]  
at org.elasticsearch.xpack.core.ssl.SSLService.lambda$loadSslConfigurations$11(SSLService.java:603) ~[?:?]  
... 23 more  
Caused by: java.nio.file.NoSuchFileException: E:\setup\elasticsearch-8.5.3-windows-x86\_64\elasticsearch-8.5.3\config\certs\transport.p12  
at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85) ~[?:?]  
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103) ~[?:?]  
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108) ~[?:?]  
at sun.nio.fs.WindowsFileSystemProvider.newByteChannel(WindowsFileSystemProvider.java:236) ~[?:?]  
at java.nio.file.Files.newByteChannel(Files.java:380) ~[?:?]  
at java.nio.file.Files.newByteChannel(Files.java:432) ~[?:?]  
at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:422) ~[?:?]  
at java.nio.file.Files.newInputStream(Files.java:160) ~[?:?]  
at org.elasticsearch.common.ssl.KeyStoreUtil.readKeyStore(KeyStoreUtil.java:71) ~[?:?]  
at org.elasticsearch.common.ssl.StoreTrustConfig.readKeyStore(StoreTrustConfig.java:94) ~[?:?]  
at org.elasticsearch.common.ssl.StoreTrustConfig.createTrustManager(StoreTrustConfig.java:82) ~[?:?]  
at org.elasticsearch.xpack.core.ssl.SSLService.createSslContext(SSLService.java:473) ~[?:?]  
at java.util.HashMap.computeIfAbsent(HashMap.java:1228) ~[?:?]  
at org.elasticsearch.xpack.core.ssl.SSLService.lambda$loadSslConfigurations$11(SSLService.java:603) ~[?:?]  
... 23 more

---

<div class="post-metadata">

**Author:** ![dadiasish](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadiasish/32/114221_2.png) [@dadiasish](https://discuss.elastic.co/u/dadiasish)\
**Post date:** [January 12, 2023, 11:36am UTC](https://discuss.elastic.co/t/i-am-getting-below-error-while-setting-elastic-search/323019/2 "2023-01-12T11:36:59Z")

</div>

> [@devdev7711](#):
>
> E:\setup\elasticsearch-8.5.3-windows-x86\_64\elasticsearch-8.5.3\config\certs\transport.p12

Does this file transport.p12 exists in the path which is mentioned in the elasticsearch.yml.

Please check that.

---

<div class="post-metadata">

**Author:** ![devdev7711](https://avatars.discourse-cdn.com/v4/letter/d/3be4f8/32.png) [@devdev7711](https://discuss.elastic.co/u/devdev7711)\
**Post date:** [January 12, 2023, 12:57pm UTC](https://discuss.elastic.co/t/i-am-getting-below-error-while-setting-elastic-search/323019/3 "2023-01-12T12:57:23Z")

</div>

> [@devdev7711](#):
>
> transport.

This file is not present

---

<div class="post-metadata">

**Author:** ![dadiasish](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadiasish/32/114221_2.png) [@dadiasish](https://discuss.elastic.co/u/dadiasish)\
**Post date:** [January 12, 2023, 1:03pm UTC](https://discuss.elastic.co/t/i-am-getting-below-error-while-setting-elastic-search/323019/4 "2023-01-12T13:03:53Z")

</div>

That's what the error says.

Please follow this elastic guide below if you want to setup basic security for the system.

> **[Set up basic security for the Elastic Stack | Elasticsearch Guide \[8.6\] |...](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-basic-setup.html)**

---

<div class="post-metadata">

**Author:** ![devdev7711](https://avatars.discourse-cdn.com/v4/letter/d/3be4f8/32.png) [@devdev7711](https://discuss.elastic.co/u/devdev7711)\
**Post date:** [January 14, 2023, 2:02pm UTC](https://discuss.elastic.co/t/i-am-getting-below-error-while-setting-elastic-search/323019/5 "2023-01-14T14:02:57Z")

</div>

after follow steps I am still getting ssl error

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [January 14, 2023, 2:10pm UTC](https://discuss.elastic.co/t/i-am-getting-below-error-while-setting-elastic-search/323019/6 "2023-01-14T14:10:15Z")

</div>

What does your `elasticsearch.yml` file looks like? Please share it using the preformatted text option, the `</>` button.

The error is pretty direct.

> [xpack.security.transport.ssl] - cannot read configured [PKCS12] keystore (as a truststore) [E:\setup\elasticsearch-8.5.3-windows-x86\_64\elasticsearch-8.5.3\config\certs\transport.p12] **because the file does not exist**

It says that the file `transport.p12` is not present in the specified directory.

If you follow the setup guide, created the file and put it in the specified directory it should work or give you a differente error.

Please share the error you are receiving now.

---

<div class="post-metadata">

**Author:** ![devdev7711](https://avatars.discourse-cdn.com/v4/letter/d/3be4f8/32.png) [@devdev7711](https://discuss.elastic.co/u/devdev7711)\
**Post date:** [January 15, 2023, 12:17pm UTC](https://discuss.elastic.co/t/i-am-getting-below-error-while-setting-elastic-search/323019/7 "2023-01-15T12:17:25Z")

</div>

this is my elasticsearch yaml file now i have the tranport.p2 file but still getting error.

# ======================== 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 -----------------------------------

# 

# Set the bind address to a specific IP (IPv4 or IPv6):

# 

http.host: 10.181.32.143

# 

# Set a custom port for HTTP:

# 

http.port: 9300

# 

# 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: ["mysys"]  
discovery.type: single-node

# 

# 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.

# 

# ---------------------------------- Gateway -----------------------------------

# 

# Block initial recovery after a full cluster restart until N nodes are started:

# 

#gateway.recover\_after\_nodes: 3

# 

# For more information, consult the gateway module documentation.

# 

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

# 

# Require explicit names when deleting indices:

# 

#action.destructive\_requires\_name: true  
#xpack.security.audit.enabled: true  
#----------------------- BEGIN SECURITY AUTO CONFIGURATION -----------------------

# 

# The following settings, TLS certificates, and keys have been automatically

# generated to configure Elasticsearch security features on 15-01-2023 10:28:28

# 

# --------------------------------------------------------------------------------

# Enable security features

xpack.security.enabled: true

xpack.security.enrollment.enabled: true

# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents

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

# Enable encryption and mutual authentication between cluster nodes

xpack.security.transport.ssl:  
enabled: true  
verification\_mode: certificate  
keystore.path: certs/transport.p12  
truststore.path: certs/transport.p12

# Create a new cluster with the current node only

# Additional nodes can still join the cluster later

cluster.initial\_master\_nodes: ["mysys"]

# Allow HTTP API connections from anywhere

# Connections are encrypted and require user authentication

http.host: 10.181.32.143

# Allow other nodes to join the cluster from anywhere

# Connections are encrypted and mutually authenticated

#transport.host: 0.0.0.0

#----------------------- END SECURITY AUTO CONFIGURATION -------------------------

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [January 15, 2023, 1:59pm UTC](https://discuss.elastic.co/t/i-am-getting-below-error-while-setting-elastic-search/323019/8 "2023-01-15T13:59:27Z")

</div>

> [@devdev7711](#):
>
> this is my elasticsearch yaml file now i have the tranport.p2 file but still getting error.

As I said, you need to share the error you are receiving, if you have the file in the correct path you won't get the same error.

---

<div class="post-metadata">

**Author:** ![devdev7711](https://avatars.discourse-cdn.com/v4/letter/d/3be4f8/32.png) [@devdev7711](https://discuss.elastic.co/u/devdev7711)\
**Post date:** [January 20, 2023, 7:26am UTC](https://discuss.elastic.co/t/i-am-getting-below-error-while-setting-elastic-search/323019/9 "2023-01-20T07:26:03Z")

</div>

below is my filebeat it is working fine for 1 log location and 1 index but i want to use 2 file log location and 2 diifferent index 1 index for 1 log path. how can we do this

filebeat.inputs:

- type: logenabled: truepaths:
  - C:\ProgramData\dir\SES\Logs\*\*\*

filebeat.config.modules:

path: ${path.config}/modules.d/\*.yml

reload.enabled: true

setup.template.settings:  
index.number\_of\_shards: 1

setup.template.name: "filebeat-_"  
setup.template.overwrite: true  
setup.template.pattern: "filebeat-_"  
setup.template.settings:

setup.kibana:

host: ["[http://10.111.32.150:5600](http://10.111.32.150:5600/)"]

output.elasticsearch:

hosts: ["[http://10.111.32.150:9300](http://10.111.32.150:9300/)"]

index: "filebeat-\*"

processors:

- add\_cloud\_metadata: ~
- add\_docker\_metadata: ~
- add\_kubernetes\_metadata: ~

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [January 20, 2023, 1:50pm UTC](https://discuss.elastic.co/t/i-am-getting-below-error-while-setting-elastic-search/323019/10 "2023-01-20T13:50:20Z")

</div>

This is a completely different question, it is not clear if you solved your first issue or not and you didn't share the error you are getting.

If you solved the error, then you should open a new question about this, also, do not share configurations in plain text, use the preformatted button, the `</>`, it makes clear to read the configuration.

---

<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 17, 2023, 1:51pm UTC](https://discuss.elastic.co/t/i-am-getting-below-error-while-setting-elastic-search/323019/11 "2023-02-17T13:51:11Z")

</div>

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