# Enable tls logstash

**URL:** <https://discuss.elastic.co/t/enable-tls-logstash/366665>\
**Category:** Logstash\
**Created:** [September 17, 2024, 10:27am UTC](https://discuss.elastic.co/t/enable-tls-logstash/366665 "2024-09-17T10:27:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![devops\_training](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/devops_training/32/131845_2.png) [@devops\_training](https://discuss.elastic.co/u/devops_training)\
**Post date:** [September 17, 2024, 10:27am UTC](https://discuss.elastic.co/t/enable-tls-logstash/366665/1 "2024-09-17T10:27:23Z")

</div>

```output
  if [type] == "traffic" {
    elasticsearch {
      ecs_compatibility => disabled
      hosts => ["https:// *********************************** :443"]
      index => "${NODE_ROLE}-traffic-%{+YYYY.MM.dd}"
      ssl => true
      ssl_certificate_verification => false
      cacert => "/opt/example/Sectigo.pem"
    }
  }
  else {
    elasticsearch {
      ecs_compatibility => disabled
      hosts => ["https:// ***************************** :443"]
      index => "${NODE_ROLE}-%{+YYYY.MM.dd}"
      ssl => true
      ssl_certificate_verification => false
      cacert => "/opt/example/Sectigo.pem"
    }
    }
  }
~

```

```auto
This works
curl --cacert "/opt/example/Sectigo.pem" --insecure https:// ********************************************

```

2024-09-12T06:39:03,409][WARN][logstash.outputs.elasticsearch][main] Attempted to resurrect connection to dead elasticsearch instance, but got an error {:url=\>"https://search-_**:443/", :exception=\>LogStash::Outputs::elasticsearch::HttpClient::Pool::HostUnreachableError, :message=\>"elasticsearch Unreachable: [https://search-**_:443/][Manticore::ClientProtocolException] PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"}

```auto

I have verified the path and permission. looks good.

please advise.
```
