# Elasticsearch cluster chain cert null excpetion

**URL:** <https://discuss.elastic.co/t/elasticsearch-cluster-chain-cert-null-excpetion/235740>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [June 4, 2020, 11:10am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-chain-cert-null-excpetion/235740 "2020-06-04T11:10:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tmporary](https://avatars.discourse-cdn.com/v4/letter/t/7bcc69/32.png) [@tmporary](https://discuss.elastic.co/u/tmporary)\
**Post date:** [June 4, 2020, 11:10am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-chain-cert-null-excpetion/235740/1 "2020-06-04T11:10:02Z")

</div>

Hi, I'm trying to setup a ssl for elasticsearch (both for encryption of communication and client authentication). Currently I'm trying to run cluster configuration with one node on my local machine with below setup:

```
cluster.name: local_test_cluster

node.name: master_main

network.host: 0.0.0.0

bootstrap.memory_lock: true

node.master: true
node.data: false

discovery.seed_hosts: localhost:9300

cluster.initial_master_nodes: master_main

xpack:
  security:
    enabled: true
    transport:
      ssl:
        enabled: true
        verification_mode: certificate
        keystore:
          path: certs/cert.p12
          password: xyz
          type: PKCS12
        truststore:
          path: certs/cert.p12
          password: xyz
          type: PKCS12
    http:
      ssl:
        enabled: true
        verification_mode: certificate
        client_authentication: optional
        keystore:
          path: certs/cert.p12
          password: xyz
          type: PKCS12
        truststore:
          path: certs/cert.p12
          password: XYZ
          type: PKCS12
  monitoring:
    enabled: true

```

and I am geting below error when elasticsearch starts up

```
[2020-06-04T13:04:31,605][WARN][o.e.t.OutboundHandler] [master_main] send message failed [channel: Netty4TcpChannel
{localAddress=0.0.0.0/0.0.0.0:63581, remoteAddress=localhost/0:0:0:0:0:0:0:1:9300}]
javax.net.ssl.SSLException: Received fatal alert: bad_certificate
        at sun.security.ssl.Alerts.getSSLException(Alerts.java:214) ~[?:?]
		
[2020-06-04T13:04:31,605][WARN][o.e.t.TcpTransport] [master_main] exception caught on transport layer [Netty4Tcp
Channel{localAddress=0.0.0.0/0.0.0.0:9300, remoteAddress=/0:0:0:0:0:0:0:1:63581}], closing connection
io.netty.handler.codec.DecoderException: javax.net.ssl.SSLHandshakeException: null cert chain

```

Any ideas on what im doing wrong here?

---

<div class="post-metadata">

**Author:** ![tmporary](https://avatars.discourse-cdn.com/v4/letter/t/7bcc69/32.png) [@tmporary](https://discuss.elastic.co/u/tmporary)\
**Post date:** [June 5, 2020, 7:46am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-chain-cert-null-excpetion/235740/2 "2020-06-05T07:46:02Z")

</div>

Is anyone even active here?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 5, 2020, 8:04am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-chain-cert-null-excpetion/235740/3 "2020-06-05T08:04:07Z")

</div>

Please be patient in waiting for responses to your question and refrain from pinging multiple times asking for a response or opening multiple topics for the same question. This is a community forum, it may take time for someone to reply to your question. For more information please refer to the [Community Code of Conduct](https://www.elastic.co/community/codeofconduct) specifically the section "Be patient". Also, please refrain from pinging folks directly, this is a forum and anyone that participates might be able to assist you.

If you are in need of a service with an SLA that covers response times for questions then you may want to consider talking to us about a [subscription](https://www.elastic.co/subscriptions).

It's fine to answer on your own thread after 2 or 3 days (not including weekends) if you don't have an answer.

---

<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:** [July 3, 2020, 8:04am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-chain-cert-null-excpetion/235740/4 "2020-07-03T08:04:08Z")

</div>

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