# Elasticsearch incorrect licensing

**URL:** <https://discuss.elastic.co/t/elasticsearch-incorrect-licensing/293557>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [January 5, 2022, 3:34pm UTC](https://discuss.elastic.co/t/elasticsearch-incorrect-licensing/293557 "2022-01-05T15:34:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dede\_Pessu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dede_pessu/32/44473_2.png) [@Dede\_Pessu](https://discuss.elastic.co/u/Dede_Pessu)\
**Post date:** [January 5, 2022, 3:34pm UTC](https://discuss.elastic.co/t/elasticsearch-incorrect-licensing/293557/1 "2022-01-05T15:34:14Z")

</div>

I have just pulled 7.16.1 rpms for Elasticsearch to do a fresh install, in my environment i have a platinum license but for some reason Elasticsearch is loading a random incorrect license that is basic which is causing issues as the basic license has functional limitations that are only provided via platinum license

```auto
 [2022-01-04T18:54:40,744][INFO][o.e.l.LicenseService] [elastic]license [acec776c-8c37-425e-8e39-48a71d0c5f98] mode [basic] - valid

[2022-01-04T18:55:24,214][WARN][o.e.x.s.a.RealmsAuthenticator] [elastic]No authentication credential could be extracted using realms [reserved/reserved,native/native]. Realms [pki/pki1] were skipped because they are not permitted on the current license

```

Above is the random license uid that is getting loaded which does not match the uid in my platinum\_license.json file and one of the warning that are getting thrown in the logs due to the incorrect basic license getting uploaded. Any ideas why Elasticsearch would be loading this incorrect basic license or where it would be getting this value from?

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [January 5, 2022, 3:49pm UTC](https://discuss.elastic.co/t/elasticsearch-incorrect-licensing/293557/2 "2022-01-05T15:49:40Z")

</div>

After the fresh install did you update your license use the [license API](https://www.elastic.co/guide/en/elasticsearch/reference/current/update-license.html#update-license) and your license file?

---

<div class="post-metadata">

**Author:** ![Dede\_Pessu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dede_pessu/32/44473_2.png) [@Dede\_Pessu](https://discuss.elastic.co/u/Dede_Pessu)\
**Post date:** [January 5, 2022, 6:00pm UTC](https://discuss.elastic.co/t/elasticsearch-incorrect-licensing/293557/3 "2022-01-05T18:00:30Z")

</div>

> [@leandrojmp](#):
>
> license API

Ran python rest PUT API but it seems it is unable to connect to elasticsearch to apply this change

```auto
[DEBUG] Starting new HTTP connection (1): <elasticsearch_ip>:9200
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 706, in urlopen
    chunked=chunked,
  File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 445, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 440, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/lib64/python3.6/http/client.py", line 1346, in getresponse
    response.begin()
  File "/usr/lib64/python3.6/http/client.py", line 307, in begin
    version, status, reason = self._read_status()
  File "/usr/lib64/python3.6/http/client.py", line 276, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

```

This is the corresponding log in elasticsearch logfile

```auto
2022-01-05T17:40:30,153][WARN][o.e.x.s.t.n.SecurityNetty4HttpServerTransport] [elastic]received plaintext http traffic on an https channel, closing connection Netty4HttpChannel{localAddress=0.0.0.0/0.0.0.0:9200, remoteAddress=/ <elasticsearch_ip>:45092}

```

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [January 5, 2022, 6:14pm UTC](https://discuss.elastic.co/t/elasticsearch-incorrect-licensing/293557/4 "2022-01-05T18:14:01Z")

</div>

You made an http request to a https endpoint, your cluster is expecting an encrypted connection.

> [@Dede\_Pessu](#):
>
> `received plaintext http traffic on an https channel`

Can you explain better what was the steps you did? You downloaded the 7.16 rpm and installed it, them wiped the data directory? It is not clear if you just installed the binary or if you are starting a new cluster.

---

<div class="post-metadata">

**Author:** ![Dede\_Pessu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dede_pessu/32/44473_2.png) [@Dede\_Pessu](https://discuss.elastic.co/u/Dede_Pessu)\
**Post date:** [January 5, 2022, 7:00pm UTC](https://discuss.elastic.co/t/elasticsearch-incorrect-licensing/293557/5 "2022-01-05T19:00:18Z")

</div>

Figured out the issue, a variable specific to my setup wasn't correctly set which was causing http connection instead of https connection. when I changed that everything started working correctly including the license configuration. Thanks

---

<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:** [February 2, 2022, 7:01pm UTC](https://discuss.elastic.co/t/elasticsearch-incorrect-licensing/293557/6 "2022-02-02T19:01:13Z")

</div>

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