# Logstash showing error when connected to TLS enabled elasticsearch

**URL:** <https://discuss.elastic.co/t/logstash-showing-error-when-connected-to-tls-enabled-elasticsearch/152533>\
**Category:** Logstash\
**Created:** [October 15, 2018, 4:26pm UTC](https://discuss.elastic.co/t/logstash-showing-error-when-connected-to-tls-enabled-elasticsearch/152533 "2018-10-15T16:26:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rijinmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rijinmp/32/24634_2.png) [@rijinmp](https://discuss.elastic.co/u/rijinmp)\
**Post date:** [October 15, 2018, 4:26pm UTC](https://discuss.elastic.co/t/logstash-showing-error-when-connected-to-tls-enabled-elasticsearch/152533/1 "2018-10-15T16:26:40Z")

</div>

Hi All ,

I am installed ES cluster and Logstash ( Both are 6.3.2)

Without TLS in all machines logstash is sending logs to ES . All logs are successfully indexed in ES. ( In this setup xpack is enabled in all ES machines . Logstash is sending logs with ES username and password)

When I am enabled TLS in all ES machines in the cluster , Logstash cant send the logs to ES with same configuration.

Error Log:

[INFO] 2018-10-15 16:20:09.597 [Ruby-0-Thread-4: :1] elasticsearch - Running health check to see if an Elasticsearch connection is working {:healthcheck\_url=\>[https://elastic:xxxxxx@10.0.19.7:9200/](https://elastic:xxxxxx@10.0.19.7:9200/), :path=\>"/"}  
[WARN] 2018-10-15 16:20:09.617 [Ruby-0-Thread-4: :1] elasticsearch - Attempted to resurrect connection to dead ES instance, but got an error. {:url=\>"[https://elastic:xxxxxx@10.0.19.7:9200/](https://elastic:xxxxxx@10.0.19.7:9200/)", :error\_type=\>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=\>"Elasticsearch Unreachable: [[https://elastic:xxxxxx@10.0.19.7:9200/](https://elastic:xxxxxx@10.0.19.7:9200/)][Manticore::ClientProtocolException] PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"}

Is it mandatory to enable TLS in logstash to communicate with ES ?

---

<div class="post-metadata">

**Author:** ![rijinmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rijinmp/32/24634_2.png) [@rijinmp](https://discuss.elastic.co/u/rijinmp)\
**Post date:** [October 15, 2018, 6:03pm UTC](https://discuss.elastic.co/t/logstash-showing-error-when-connected-to-tls-enabled-elasticsearch/152533/2 "2018-10-15T18:03:41Z")

</div>

Self healed

Added ssl\_certificate\_verification =\> false in output of config file .

output {  
stdout{ codec =\> rubydebug }  
elasticsearch { hosts =\> ["[https://10.0.19.7:9200](https://10.0.19.7:9200)"]  
user =\> elastic  
password =\> changeme  
index =\> "test"  
ssl\_certificate\_verification =\> false  
}

}

---

<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:** [November 12, 2018, 6:03pm UTC](https://discuss.elastic.co/t/logstash-showing-error-when-connected-to-tls-enabled-elasticsearch/152533/3 "2018-11-12T18:03:41Z")

</div>

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