# Host name "\<ip addr\>" does not match certificate subject provided by peer

**URL:** <https://discuss.elastic.co/t/host-name-ip-addr-does-not-match-certificate-subject-provided-by-peer/63438>\
**Category:** Elasticsearch\
**Created:** [October 19, 2016, 8:10pm UTC](https://discuss.elastic.co/t/host-name-ip-addr-does-not-match-certificate-subject-provided-by-peer/63438 "2016-10-19T20:10:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZillaG](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zillag/32/10505_2.png) [@ZillaG](https://discuss.elastic.co/u/ZillaG)\
**Post date:** [October 19, 2016, 8:10pm UTC](https://discuss.elastic.co/t/host-name-ip-addr-does-not-match-certificate-subject-provided-by-peer/63438/1 "2016-10-19T20:10:11Z")

</div>

ES v2.4.1 and corresponding v2.4.1 Searchguard-SSL and Searchguard plugins

i used the Searchguard SSL script to generate my cert/key/jks files, with modifications to the DN. I copied the \*.jks file to /etc/elasticsearch.

I have Logstash setup to index into ES, with the output setup this way

```
    output {
      elasticsearch {
        user => logstash
        password => 'pw'
        ssl => true
        ssl_certificate_verification => true
        truststore => "/etc/elasticsearch/truststore.jks"
        truststore_password => pw
        hosts => ["https://10.x.x.26:9200"]
        index => "logstash-%{customer}"
      }
  }

```

I get the following from the logstash logs

`"Host name '10.x.x.26' does not match the certificate subject provided by the peer (CN=10.x.x.26, OU=Company, O=DevOps, L=Raleigh, C=US)",`

How do I fix this?

---

<div class="post-metadata">

**Author:** ![polyfractal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/polyfractal/32/48162_2.png) [@polyfractal](https://discuss.elastic.co/u/polyfractal)\
**Post date:** [October 19, 2016, 8:12pm UTC](https://discuss.elastic.co/t/host-name-ip-addr-does-not-match-certificate-subject-provided-by-peer/63438/2 "2016-10-19T20:12:57Z")

</div>

I think you'll likely have better luck asking over at the Searchguard repo. Since this is an unofficial plugin, we don't really know much about it 🙂

---

<div class="post-metadata">

**Author:** ![ZillaG](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zillag/32/10505_2.png) [@ZillaG](https://discuss.elastic.co/u/ZillaG)\
**Post date:** [October 19, 2016, 8:58pm UTC](https://discuss.elastic.co/t/host-name-ip-addr-does-not-match-certificate-subject-provided-by-peer/63438/3 "2016-10-19T20:58:46Z")

</div>

Ok thanks. I posted on the SG group.

---

<div class="post-metadata">

**Author:** ![slmingol](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/slmingol/32/12606_2.png) [@slmingol](https://discuss.elastic.co/u/slmingol)\
**Post date:** [October 20, 2016, 12:32am UTC](https://discuss.elastic.co/t/host-name-ip-addr-does-not-match-certificate-subject-provided-by-peer/63438/4 "2016-10-20T00:32:44Z")

</div>

The link to the Search Guard forum question: [https://groups.google.com/forum/#!topic/search-guard/H-gksaA4z7g](https://groups.google.com/forum/#!topic/search-guard/H-gksaA4z7g).

---

<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:** [July 5, 2017, 10:11pm UTC](https://discuss.elastic.co/t/host-name-ip-addr-does-not-match-certificate-subject-provided-by-peer/63438/5 "2017-07-05T22:11:04Z")

</div>


