# Hostname verification failed while setting up logstash to connect with elasticsearch

**URL:** <https://discuss.elastic.co/t/hostname-verification-failed-while-setting-up-logstash-to-connect-with-elasticsearch/209450>\
**Category:** Logstash\
**Created:** [November 26, 2019, 8:59am UTC](https://discuss.elastic.co/t/hostname-verification-failed-while-setting-up-logstash-to-connect-with-elasticsearch/209450 "2019-11-26T08:59:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vikas\_Yadav](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_yadav/32/54987_2.png) [@Vikas\_Yadav](https://discuss.elastic.co/u/Vikas_Yadav)\
**Post date:** [November 26, 2019, 8:59am UTC](https://discuss.elastic.co/t/hostname-verification-failed-while-setting-up-logstash-to-connect-with-elasticsearch/209450/1 "2019-11-26T08:59:08Z")

</div>

i'm setting up the ELK security using X-Pack, I generated the CA and Certs as suggested  
by the docs:

bin/elasticsearch-certutil ca  
bin/elasticsearch-certutil cert --ca elastic-stack-ca.p12

Shipped them to all the elasticseach nodes and worked fine.

I regenerated the keys can certs... also, converted to .pem for kibana and logstash

It seems Kibana works fine, but on logstash, I used the ca.pem file for cacert. Now I  
got the following error in logstash.log and logstash is not pulling any data using any  
of the beats

[2019-11-03T04:44:13,747][ERROR][logstash.pipeline] Pipeline aborted due to error  
{:pipeline\_id=\>"main", :exception=\>#\<Manticore::UnknownException: Host name  
'192.168.144.29' does not match the certificate subject provided by the peer (CN=node-  
1-vikas)\>.  
Not able to understand why this error is comming up during generation of certificates  
for all the nodes in the cluster i gave dns "private\_ip" as input but it still fails to  
match the hostname  
Please help me with the issue?

---

<div class="post-metadata">

**Author:** ![Vikas\_Yadav](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_yadav/32/54987_2.png) [@Vikas\_Yadav](https://discuss.elastic.co/u/Vikas_Yadav)\
**Post date:** [November 26, 2019, 9:01am UTC](https://discuss.elastic.co/t/hostname-verification-failed-while-setting-up-logstash-to-connect-with-elasticsearch/209450/2 "2019-11-26T09:01:03Z")

</div>

i m using the latest versions of all three elasticsearch, kibana and logstash

---

<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:** [December 24, 2019, 9:01am UTC](https://discuss.elastic.co/t/hostname-verification-failed-while-setting-up-logstash-to-connect-with-elasticsearch/209450/3 "2019-12-24T09:01:12Z")

</div>

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