# Logstash- Unable to retrieve license information from license server

**URL:** <https://discuss.elastic.co/t/logstash-unable-to-retrieve-license-information-from-license-server/264979>\
**Category:** Logstash\
**Tags:** elastic-stack-monitoring, elastic-stack-security\
**Created:** [February 21, 2021, 11:57am UTC](https://discuss.elastic.co/t/logstash-unable-to-retrieve-license-information-from-license-server/264979 "2021-02-21T11:57:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![anoopkv](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@anoopkv](https://discuss.elastic.co/u/anoopkv)\
**Post date:** [February 21, 2021, 11:57am UTC](https://discuss.elastic.co/t/logstash-unable-to-retrieve-license-information-from-license-server/264979/1 "2021-02-21T11:57:13Z")

</div>

Trying to setup ELK stack on my on-premise K8S cluster using helm charts. Have enabled x-pack security and both Elasticsearch and kibana are working fine after enabling transport, http security  
I have used elasticsearch-certutil to create self signed certificate

When i try to run the logstash, i get the following error

> [ERROR][logstash.licensechecker.licensereader] Unable to retrieve license information from license server {:message=\>"Host name 'elasticsearch-master' does not match the certificate subject provided by the peer (CN=instance)"}

> xpack.monitoring.enabled: true  
> xpack.monitoring.elasticsearch.ssl.certificate\_authority: "/usr/share/logstash/config/elastic-certificares.crt"  
> xpack.monitoring.elasticsearch.ssl.verification\_mode: "certificate"  
> xpack.monitoring.elasticsearch.hosts: ["[https://elasticsearch-master:9200](https://elasticsearch-master:9200)"]  
> xpack.monitoring.elasticsearch.username: "logstash\_system"  
> xpack.monitoring.elasticsearch.password: "\*\*\*"

I am using the same set of certificate for logstash and have already set the ssl verification\_mode to certificate, then why is it validating the hostname ?

Have been stuck with this issue and really appreaciate any help

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [February 21, 2021, 5:57pm UTC](https://discuss.elastic.co/t/logstash-unable-to-retrieve-license-information-from-license-server/264979/2 "2021-02-21T17:57:00Z")

</div>

> [@anoopkv](#):
>
> xpack.monitoring.elasticsearch.ssl.verification\_mode

Did you read the documentation?

> Option to validate the server’s certificate. Defaults to `certificate` . To disable, set to `none` . **Disabling this severely compromises security.**

---

<div class="post-metadata">

**Author:** ![anoopkv](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@anoopkv](https://discuss.elastic.co/u/anoopkv)\
**Post date:** [February 21, 2021, 6:36pm UTC](https://discuss.elastic.co/t/logstash-unable-to-retrieve-license-information-from-license-server/264979/3 "2021-02-21T18:36:17Z")

</div>

Hi @Badger

Thanks for your reply. This setting i saw in the elasticsearch securitysetting allows you to disable hostname verification as i understood

> You can optionally provide IP addresses or DNS names for each instance. If neither IP addresses nor DNS names are specified, the Elastic Stack products cannot perform hostname verification and you might need to configure the `verification_mode` security setting to `certificate` only

[https://www.elastic.co/guide/en/elasticsearch/reference/current/certutil.html#certutil-cert](https://www.elastic.co/guide/en/elasticsearch/reference/current/certutil.html#certutil-cert)

Can you pls suggest how to disable hostname validation in logstash if i am using the incorrect setting? And ofcourse i dont want to set ti "none"

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [February 21, 2021, 6:59pm UTC](https://discuss.elastic.co/t/logstash-unable-to-retrieve-license-information-from-license-server/264979/4 "2021-02-21T18:59:22Z")

</div>

> [@anoopkv](#):
>
> xpack.monitoring.elasticsearch.ssl.verification\_mode

You are quoting the documentation for xpack.security.transport.ssl.verification\_mode. That has three options (full, certificate, none). As I understand it, xpack.monitoring.elasticsearch.ssl.verification\_mode has only two (certificate, which really means full, and none). And yes, folks are [aware](https://github.com/elastic/logstash/issues/9716) that this is confusing, but once you have made a less than perfect choice naming something it tends to be pretty hard to fix it without blowing up the installed base.

---

<div class="post-metadata">

**Author:** ![anoopkv](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@anoopkv](https://discuss.elastic.co/u/anoopkv)\
**Post date:** [March 3, 2021, 6:29am UTC](https://discuss.elastic.co/t/logstash-unable-to-retrieve-license-information-from-license-server/264979/5 "2021-03-03T06:29:36Z")

</div>

What finally worked for me, was to like you suggested - blowup the cluster, recreate them using a new certificate were CN of certificate matches elasticsearch.hosts

---

<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:** [March 31, 2021, 6:30am UTC](https://discuss.elastic.co/t/logstash-unable-to-retrieve-license-information-from-license-server/264979/6 "2021-03-31T06:30:18Z")

</div>

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