# Can't connect to elasticsearch from logstash

**URL:** <https://discuss.elastic.co/t/cant-connect-to-elasticsearch-from-logstash/125812>\
**Category:** Logstash\
**Created:** [March 27, 2018, 8:28pm UTC](https://discuss.elastic.co/t/cant-connect-to-elasticsearch-from-logstash/125812 "2018-03-27T20:28:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sergey\_Murashov](https://avatars.discourse-cdn.com/v4/letter/s/dbc845/32.png) [@Sergey\_Murashov](https://discuss.elastic.co/u/Sergey_Murashov)\
**Post date:** [March 27, 2018, 8:28pm UTC](https://discuss.elastic.co/t/cant-connect-to-elasticsearch-from-logstash/125812/1 "2018-03-27T20:28:11Z")

</div>

I installed the searchguard and can not connect the logstash. In the logs I see that:

> [Manticore::ClientProtocolException] PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"}

In elasticsearch-output.conf i write:

> elasticsearch {  
> user =\> logstash  
> password =\> logstash  
> ssl =\> true  
> ssl\_certificate\_verification =\> false  
> cacert =\> "/usr/share/logstash/config/conf.d/root-ca.key"  
> cacert\_password =\> Pass  
> hosts =\> ["[https://logstash.taxnet.ru:9200](https://logstash.taxnet.ru:9200)"]  
> index =\> "logstash-%{[fields][es\_index\_name]}-%{+YYYY.MM.dd}"  
> template\_overwrite =\> true

Where is my mistake?

---

<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 24, 2018, 8:28pm UTC](https://discuss.elastic.co/t/cant-connect-to-elasticsearch-from-logstash/125812/2 "2018-04-24T20:28:26Z")

</div>

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