# \[KIBANA\] Xpack notification

**URL:** <https://discuss.elastic.co/t/kibana-xpack-notification/177626>\
**Category:** Kibana\
**Tags:** elastic-stack-alerting\
**Created:** [April 19, 2019, 1:37pm UTC](https://discuss.elastic.co/t/kibana-xpack-notification/177626 "2019-04-19T13:37:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alessio\_Creo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alessio_creo/32/43381_2.png) [@Alessio\_Creo](https://discuss.elastic.co/u/Alessio_Creo)\
**Post date:** [April 19, 2019, 1:37pm UTC](https://discuss.elastic.co/t/kibana-xpack-notification/177626/1 "2019-04-19T13:37:30Z")

</div>

Hi there,

I've just set the TLS cipher on my production elasticsearch cluster. I have I wathcer scheduled every morning to report a Kibana dashboard and send a pdf via email. Now after the TLS setting I have this error.

```
"actions": [
      {
        "id": "send_email",
        "type": "email",
        "status": "failure",
        "error": {
          "root_cause": [
            {
              "type": "s_s_l_handshake_exception",
              "reason": "sun.security.validator.ValidatorException: 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": "sun.security.validator.ValidatorException: 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"
            }
          }
        }
      }
    ]
  }

```

This is my wathcer config

```
{
  "trigger": {
    "schedule": {
      "daily": {
        "at": [
          "06:30"
        ]
      }
    }
  },
  "input": {
    "none": {}
  },
  "condition": {
    "always": {}
  },
  "actions": {
    "send_email": {
      "email": {
        "profile": "standard",
        "attachments": {
          "error_report.pdf": {
            "reporting": {
              "url": "https://10.0.5.0:5601/api/reporting/generate/printablePdf?jobParams=[...]",
              "auth": {
                "basic": {
                  "username": "watcher",
                  "password": "elastic"
                }
              }
            }
          }
        },
        "to": [
          "control_room@enterprise.com"
        ],
        "subject": "Report applications errors",
        "body": {
          "html": "<p>Error report attached</p>"
        }
      }
    }
  }
}

```

This is my elasticsearch.yml.

```
xpack.security.enabled: true

xpack.security.transport.ssl.enabled: true

xpack.security.transport.ssl.verification_mode: certificate

xpack.security.transport.ssl.keystore.path: /Elastic/elasticsearch-6.7.1/config/certs/my_certs.pfx

xpack.security.transport.ssl.truststore.path: /Elastic/elasticsearch-6.7.1/config/certs/cacerts

xpack.security.transport.ssl.client_authentication: none

xpack.security.http.ssl.enabled: true

xpack.security.http.ssl.client_authentication: optional

xpack.security.http.ssl.verification_mode: certificate

xpack.security.http.ssl.keystore.path: /Elastic/elasticsearch-6.7.1/config/certs/my_certs.pfx

xpack.security.http.ssl.truststore.path: /Elastic/elasticsearch-6.7.1/config/certs/cacerts

```

All the comunication via https work fine, but this one doesn't. Anyone can help me?

---

<div class="post-metadata">

**Author:** ![joshdover](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joshdover/32/42020_2.png) [@joshdover](https://discuss.elastic.co/u/joshdover)\
**Post date:** [April 19, 2019, 10:03pm UTC](https://discuss.elastic.co/t/kibana-xpack-notification/177626/2 "2019-04-19T22:03:36Z")

</div>

Hi there!

It looks like the cert you're using on the Kibana instance is not trusted by your JVM configuration in Elasticsearch. It's possible that the certificate was signed by a CA that is not in your keystore on the JVM. [Here's a good answer from StackOverflow](https://stackoverflow.com/a/36427118) on how to add a certificate to your keystore. You'll need to make sure that this cert exists on each Elasticsearch node in your cluster.

---

<div class="post-metadata">

**Author:** ![Alessio\_Creo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alessio_creo/32/43381_2.png) [@Alessio\_Creo](https://discuss.elastic.co/u/Alessio_Creo)\
**Post date:** [April 23, 2019, 6:50am UTC](https://discuss.elastic.co/t/kibana-xpack-notification/177626/3 "2019-04-23T06:50:04Z")

</div>

Thanks for the answer. In the truststore listed in my elasticsearch.yml the certificate is trusted, I'll try to add it into the java "cacerts" file e see if it works. Thank you again.

---

<div class="post-metadata">

**Author:** ![Alessio\_Creo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alessio_creo/32/43381_2.png) [@Alessio\_Creo](https://discuss.elastic.co/u/Alessio_Creo)\
**Post date:** [April 24, 2019, 7:36am UTC](https://discuss.elastic.co/t/kibana-xpack-notification/177626/4 "2019-04-24T07:36:13Z")

</div>

I've installed the certiicate in the java cacerts but nothing changed. The same error. Is there any other config I can try to see?

Thank you.

---

<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:** [May 22, 2019, 7:36am UTC](https://discuss.elastic.co/t/kibana-xpack-notification/177626/5 "2019-05-22T07:36:23Z")

</div>

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