# Sending data from logstash to ElasticSearch (ECK): Certificate issue

**URL:** <https://discuss.elastic.co/t/sending-data-from-logstash-to-elasticsearch-eck-certificate-issue/269106>\
**Category:** Logstash\
**Created:** [April 2, 2021, 1:25pm UTC](https://discuss.elastic.co/t/sending-data-from-logstash-to-elasticsearch-eck-certificate-issue/269106 "2021-04-02T13:25:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kelk](https://avatars.discourse-cdn.com/v4/letter/k/13edae/32.png) [@kelk](https://discuss.elastic.co/u/kelk)\
**Post date:** [April 2, 2021, 1:25pm UTC](https://discuss.elastic.co/t/sending-data-from-logstash-to-elasticsearch-eck-certificate-issue/269106/1 "2021-04-02T13:25:11Z")

</div>

have setup operator based elasticsearch & kibana.. but since logstash is not within ECK, running logstash as standalone. Unfortunately, i'm trying it hard to find to connect to Elasticsearch due to certificate issue.

```auto
output {
# stdout { codec => rubydebug }  
  elasticsearch {
      hosts => ["localhost:9200"]
      index => "my_index"
      document_id => "%{[@metadata][id]}"
      user => "elastic"
      password => "my_elastic_passwd"
        ssl => true
        ssl_certificate_verification => false
   }

}

```

with above setting, i'm getting an error: even though I've put `ssl_certificate_verification=> false` !!

```auto
[WARN][logstash.outputs.elasticsearch][main] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>"https://elastic:xxxxxx@localhost:9200/", 
:error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, 
:error=>"Elasticsearch Unreachable: [https://elastic:xxxxxx@localhost:9200/][Manticore::ClientProtocolException] PKIX path building failed: 
sun.security.provider.certpath.SunCertPathBuilderException: 
unable to find valid certification path to requested target"}

```

As another method, I tried extracting the certificate as pem file and tried to load for logstash.  
Like below

```auto
        ssl => true
       cacert => "/extracted/pem/file_from/eck_elastic.pem

```

But this also has an error, because i'm using `localhost`

---

<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:** [April 30, 2021, 1:25pm UTC](https://discuss.elastic.co/t/sending-data-from-logstash-to-elasticsearch-eck-certificate-issue/269106/2 "2021-04-30T13:25:54Z")

</div>

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