# Watcher Webhook s\_s\_l\_handshake\_exception

**URL:** <https://discuss.elastic.co/t/watcher-webhook-s-s-l-handshake-exception/278551>\
**Category:** Kibana\
**Tags:** elastic-stack-alerting, docker\
**Created:** [July 13, 2021, 1:52pm UTC](https://discuss.elastic.co/t/watcher-webhook-s-s-l-handshake-exception/278551 "2021-07-13T13:52:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![yoli1888](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yoli1888/32/91570_2.png) [@yoli1888](https://discuss.elastic.co/u/yoli1888)\
**Post date:** [July 13, 2021, 1:52pm UTC](https://discuss.elastic.co/t/watcher-webhook-s-s-l-handshake-exception/278551/1 "2021-07-13T13:52:48Z")

</div>

I am using 7.9.1. Kibana is running in a docker container. Trying to setup a Webhook action in Watcher with the following code:

```auto
"webhook_2" : {
        "webhook" : {
          "scheme" : "https",
          "host" : "elastic.systems",
          "port" : 9200,
          "method" : "post",
          "path" : "_aliases",
          "params" : { },
          "headers" : { },
          "auth" : {
            "basic" : {
              "username" : "<username>",
              "password" : "<password>"
            }
          },
          "body" : """{"actions":[
{"add":{"index": "linux-syslog-*", "alias": "my-syslogs"}}]}"""
        }
      }

```

When execute the above Watcher, I got error like this:

```auto
 {
          "id" : "webhook_2",
          "type" : "webhook",
          "status" : "failure",
          "error" : {
            "root_cause" : [
              {
                "type" : "s_s_l_handshake_exception",
                "reason" : "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"
              }
            ],
            "type" : "s_s_l_handshake_exception",
            "reason" : "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target",
            "caused_by" : {
              "type" : "validator_exception",
              "reason" : "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target",
              "caused_by" : {
                "type" : "sun_cert_path_builder_exception",
                "reason" : "unable to find valid certification path to requested target"
              }
            }
          }
        }

```

I look thru [Watcher settings in Elasticsearch | Elasticsearch Guide [7.x] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/notification-settings.html#ssl-notification-settings) and decide to add the following environments to the yml file:

```auto
      XPACK_HTTP_SSL_VERIFICATIONMODE: none
      XPACK_HTTP_SSL_CERTIFICATEAUTHORITIES: /etc/pki/tls/certs/trust-chain.pem

```

Then I rebuild the Kibana container with the new enviornment variables. Still got the same error.  
Any suggestion on how to troubleshot? Any other settings I should change within the container?

---

<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 13, 2021, 2:14pm UTC](https://discuss.elastic.co/t/watcher-webhook-s-s-l-handshake-exception/278551/2 "2021-07-13T14:14:34Z")

</div>

Hey,

just to verify: Changes for watcher are usually changes for Elasticsearch, so restarting the Kibana container will not have an effect.

---

<div class="post-metadata">

**Author:** ![yoli1888](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yoli1888/32/91570_2.png) [@yoli1888](https://discuss.elastic.co/u/yoli1888)\
**Post date:** [July 13, 2021, 4:25pm UTC](https://discuss.elastic.co/t/watcher-webhook-s-s-l-handshake-exception/278551/3 "2021-07-13T16:25:59Z")

</div>

Ah. Thanks for the reply. Currently I have the following setting:

```auto
xpack.security.enabled: true
xpack.security.http.ssl.enabled: true
xpack.security.http.ssl.key: /config/certs/elastic.key
xpack.security.http.ssl.certificate: /config/certs/elastic.pem
xpack.security.http.ssl.certificate_authorities: /config/certs/es_trust_chain.pem

```

I am going to add the following to test it out.

```auto
xpack.http.ssl.verification_mode: certificate
xpack.http.ssl.certificate_authorities: /config/certs/es_trust_chain.pem

```

Question: Should I be looking into setting **xpack.security.http.ssl.verification\_mode** and **xpack.security.http.ssl.certificate\_authorities** as well?

---

<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, 8:36am UTC](https://discuss.elastic.co/t/watcher-webhook-s-s-l-handshake-exception/278551/4 "2021-07-14T08:36:46Z")

</div>

worth a try to sync that configuration, as you seem to want to connect to your local system - not sure about that?

---

<div class="post-metadata">

**Author:** ![yoli1888](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yoli1888/32/91570_2.png) [@yoli1888](https://discuss.elastic.co/u/yoli1888)\
**Post date:** [July 19, 2021, 5:52pm UTC](https://discuss.elastic.co/t/watcher-webhook-s-s-l-handshake-exception/278551/5 "2021-07-19T17:52:20Z")

</div>

Seems like just adding the following to elasticsearch.yml and restart do the trick. Thank you.

```auto
xpack.http.ssl.certificate_authorities: /config/certs/es_trust_chain.pem

```

---

<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 16, 2021, 5:52pm UTC](https://discuss.elastic.co/t/watcher-webhook-s-s-l-handshake-exception/278551/6 "2021-08-16T17:52:28Z")

</div>

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