# License Expired

**URL:** https://discuss.elastic.co/t/license-expired/141872
**Category:** Elasticsearch
**Created:** [July 27, 2018, 5:28am UTC](https://discuss.elastic.co/t/license-expired/141872 "2018-07-27T05:28:02Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![Sulaiman](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@Sulaiman](https://discuss.elastic.co/u/Sulaiman)
#### Post date: [July 27, 2018, 5:28am UTC](https://discuss.elastic.co/t/license-expired/141872/1 "2018-07-27T05:28:02Z")

</div>

Recently I have faced issue with ElasticSearch License, I am getting below listed error while restarting, I had basic account.

2018-07-27T10:01:57,936][ERROR][o.e.x.s.a.f.SecurityActionFilter] [aYBc70q] blocking [cluster:monitor/stats] operation due to expired license. Cluster health, cluster stats and indices stats  
operations are blocked on license expiration. All data operations (read and write) continue to work.  
If you have a new license, please update it. Otherwise, please reach out to your support contact.  
[2018-07-27T10:01:57,937][ERROR][o.e.x.m.c.c.ClusterStatsCollector] [aYBc70q] collector [cluster\_stats] failed to collect data  
org.elasticsearch.ElasticsearchSecurityException: current license is non-compliant for [security]

Below are the list of plugins installed.

[2018-07-27T09:57:03,310][INFO][o.e.p.PluginsService] [aYBc70q] loaded module [aggs-matrix-stats]  
[2018-07-27T09:57:03,310][INFO][o.e.p.PluginsService] [aYBc70q] loaded module [analysis-common]  
[2018-07-27T09:57:03,311][INFO][o.e.p.PluginsService] [aYBc70q] loaded module [ingest-common]  
[2018-07-27T09:57:03,311][INFO][o.e.p.PluginsService] [aYBc70q] loaded module [lang-expression]  
[2018-07-27T09:57:03,312][INFO][o.e.p.PluginsService] [aYBc70q] loaded module [lang-mustache]  
[2018-07-27T09:57:03,312][INFO][o.e.p.PluginsService] [aYBc70q] loaded module [lang-painless]  
[2018-07-27T09:57:03,312][INFO][o.e.p.PluginsService] [aYBc70q] loaded module [mapper-extras]  
[2018-07-27T09:57:03,313][INFO][o.e.p.PluginsService] [aYBc70q] loaded module [parent-join]  
[2018-07-27T09:57:03,313][INFO][o.e.p.PluginsService] [aYBc70q] loaded module [percolator]  
[2018-07-27T09:57:03,313][INFO][o.e.p.PluginsService] [aYBc70q] loaded module [rank-eval]  
[2018-07-27T09:57:03,314][INFO][o.e.p.PluginsService] [aYBc70q] loaded module [reindex]  
[2018-07-27T09:57:03,314][INFO][o.e.p.PluginsService] [aYBc70q] loaded module [repository-url]  
[2018-07-27T09:57:03,314][INFO][o.e.p.PluginsService] [aYBc70q] loaded module [transport-netty4]  
[2018-07-27T09:57:03,315][INFO][o.e.p.PluginsService] [aYBc70q] loaded module [tribe]  
[2018-07-27T09:57:03,315][INFO][o.e.p.PluginsService] [aYBc70q] loaded module [x-pack-core]  
[2018-07-27T09:57:03,316][INFO][o.e.p.PluginsService] [aYBc70q] loaded module [x-pack-deprecation]  
[2018-07-27T09:57:03,316][INFO][o.e.p.PluginsService] [aYBc70q] loaded module [x-pack-graph]  
[2018-07-27T09:57:03,317][INFO][o.e.p.PluginsService] [aYBc70q] loaded module [x-pack-logstash]  
[2018-07-27T09:57:03,317][INFO][o.e.p.PluginsService] [aYBc70q] loaded module [x-pack-ml]  
[2018-07-27T09:57:03,318][INFO][o.e.p.PluginsService] [aYBc70q] loaded module [x-pack-monitoring]  
[2018-07-27T09:57:03,318][INFO][o.e.p.PluginsService] [aYBc70q] loaded module [x-pack-rollup]  
[2018-07-27T09:57:03,319][INFO][o.e.p.PluginsService] [aYBc70q] loaded module [x-pack-security]  
[2018-07-27T09:57:03,319][INFO][o.e.p.PluginsService] [aYBc70q] loaded module [x-pack-sql]  
[2018-07-27T09:57:03,319][INFO][o.e.p.PluginsService] [aYBc70q] loaded module [x-pack-upgrade]  
[2018-07-27T09:57:03,320][INFO][o.e.p.PluginsService] [aYBc70q] loaded module [x-pack-watcher]

Below is the error which I am getting in elasaticsearch kibana

[data] Elasticsearch cluster did not respond with license information.

xpack license is empty.  
curl -X GET "localhost:9200/\_xpack/license"  
{ }

Please help in this.

---

<div class="post-metadata">

### Author: ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)
#### Post date: [July 27, 2018, 5:52am UTC](https://discuss.elastic.co/t/license-expired/141872/2 "2018-07-27T05:52:36Z")

</div>

What version of Elasticsearch are you running?

What output do you get from this command?

```auto
curl -uelastic -XGET "http://localhost:9200/_xpack?pretty"

```

---

<div class="post-metadata">

### Author: ![Sulaiman](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@Sulaiman](https://discuss.elastic.co/u/Sulaiman)
#### Post date: [July 27, 2018, 6:00am UTC](https://discuss.elastic.co/t/license-expired/141872/3 "2018-07-27T06:00:38Z")

</div>

> [@TimV](#):
>
> ```auto
> curl -uelastic -XGET "http://localhost:9200/_xpack?pretty"
> 
> ```

curl -XGET "[http://localhost:9200/\_xpack?pretty](http://localhost:9200/_xpack?pretty)"  
{  
"build" : {  
"hash" : "eb782d0",  
"date" : "2018-06-29T22:03:21.668624Z"  
},  
"license" : null,  
"features" : {  
"graph" : {  
"description" : "Graph Data Exploration for the Elastic Stack",  
"available" : false,  
"enabled" : true  
},  
"logstash" : {  
"description" : "Logstash management component for X-Pack",  
"available" : false,  
"enabled" : true  
},  
"ml" : {  
"description" : "Machine Learning for the Elastic Stack",  
"available" : false,  
"enabled" : true,  
"native\_code\_info" : {  
"version" : "6.3.1",  
"build\_hash" : "4d0b8f0a0ef401"  
}  
},  
"monitoring" : {  
"description" : "Monitoring for the Elastic Stack",  
"available" : false,  
"enabled" : true  
},  
"rollup" : {  
"description" : "Time series pre-aggregation and rollup",  
"available" : false,  
"enabled" : true  
},  
"security" : {  
"description" : "Security for the Elastic Stack",  
"available" : false,  
"enabled" : true  
},  
"watcher" : {  
"description" : "Alerting, Notification and Automation for the Elastic Stack",  
"available" : false,  
"enabled" : true  
}  
},  
"tagline" : "You know, for X"  
}

---

<div class="post-metadata">

### Author: ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)
#### Post date: [July 27, 2018, 6:51am UTC](https://discuss.elastic.co/t/license-expired/141872/4 "2018-07-27T06:51:33Z")

</div>

The most likely cause for a `null` license is that the node you are connecting to is unable to establish a connection with the master node.

What is the output from this:

```auto
curl -uelastic -XGET 'http://localhost:9200/_cluster/health?pretty'

```

(if your node is disconnected from the cluster, then that might take 30 seconds and then respond with an error)

What does the log file (`elasticsearch.log`) say?

---

<div class="post-metadata">

### Author: ![Sulaiman](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@Sulaiman](https://discuss.elastic.co/u/Sulaiman)
#### Post date: [July 27, 2018, 6:54am UTC](https://discuss.elastic.co/t/license-expired/141872/5 "2018-07-27T06:54:57Z")

</div>

> [@TimV](#):
>
> ```auto
> curl -uelastic -XGET 'http://localhost:9200/_cluster/health?pretty'
> 
> ```

{  
"error" : {  
"root\_cause" : [  
{  
"type" : "security\_exception",  
"reason" : "current license is non-compliant for [security]",  
"license.expired.feature" : "security"  
}  
],  
"type" : "security\_exception",  
"reason" : "current license is non-compliant for [security]",  
"license.expired.feature" : "security"  
},  
"status" : 403  
}

Actually I am running single node, so this is master himself.  
So, how can I add license and which, cause I don't have any license, Can you share any basic/free license if possible.

---

<div class="post-metadata">

### Author: ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)
#### Post date: [July 27, 2018, 7:01am UTC](https://discuss.elastic.co/t/license-expired/141872/6 "2018-07-27T07:01:30Z")

</div>

> [@Sulaiman](#):
>
> Actually I am running single node, so this is master himself.

That is not necessarily true, it depends on your configuration.

> [@Sulaiman](#):
>
> how can I add license

At the moment we're trying to work out what is preventing your node from generating a license.  
And for that you need to answer my questions - you haven't provided the details from the logfile that I asked for:

> [@TimV](#):
>
> What does the log file ( `elasticsearch.log` ) say?

---

<div class="post-metadata">

### Author: ![Sulaiman](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@Sulaiman](https://discuss.elastic.co/u/Sulaiman)
#### Post date: [July 27, 2018, 7:13am UTC](https://discuss.elastic.co/t/license-expired/141872/7 "2018-07-27T07:13:37Z")

</div>

> [@TimV](#):
>
> `elasticsearch.log`

I would like to share logs with you but, it says alot, I am not sure what to share.  
I have around 32k lines.

[2018-07-27T12:08:06,457][ERROR][o.e.x.s.a.f.SecurityActionFilter] [aYBc70q] blocking [cluster:monitor/stats] operation due to expired license. Cluster health, cluster stats and indices stats  
operations are blocked on license expiration. All data operations (read and write) continue to work.  
If you have a new license, please update it. Otherwise, please reach out to your support contact.  
[2018-07-27T12:08:06,458][ERROR][o.e.x.m.c.c.ClusterStatsCollector] [aYBc70q] collector [cluster\_stats] failed to collect data  
org.elasticsearch.ElasticsearchSecurityException: current license is non-compliant for [security]

[2018-07-27T12:08:40,290][WARN][o.e.x.s.a.s.m.NativeRoleMappingStore] [aYBc70q] Failed to clear cache for realms []  
[2018-07-27T12:08:40,325][INFO][o.e.l.LicenseService] [aYBc70q] license [TOMBSTONE] mode [trial] - valid  
[2018-07-27T12:08:40,330][WARN][o.e.l.LicenseService] [aYBc70q] LICENSE [EXPIRED] ON [THURSDAY, JANUARY 01, 1970].

# IF YOU HAVE A NEW LICENSE, PLEASE UPDATE IT. OTHERWISE, PLEASE REACH OUT TO

# YOUR SUPPORT CONTACT.

# 

# COMMERCIAL PLUGINS OPERATING WITH REDUCED FUNCTIONALITY

# - security

# - Cluster health, cluster stats and indices stats operations are blocked

# - All data operations (read and write) continue to work

# - watcher

# - PUT / GET watch APIs are disabled, DELETE watch API continues to work

# - Watches execute and write to the history

# - The actions of the watches don't execute

# - monitoring

# - The agent will stop collecting cluster and indices metrics

# - The agent will stop automatically cleaning indices older than [xpack.monitoring.history.duration]

# - graph

# - Graph explore APIs are disabled

# - ml

# - Machine learning APIs are disabled

# - logstash

# - Logstash will continue to poll centrally-managed pipelines

# - deprecation

# - Deprecation APIs are disabled

# - upgrade

# - Upgrade API is disabled

# - sql

# - SQL support is disabled

# - rollup

# - Creating and Starting rollup jobs will no longer be allowed.

# - Stopping/Deleting existing jobs, RollupCaps API and RollupSearch continue to function.

2018-07-27T12:08:42,009][ERROR][o.e.x.s.a.f.SecurityActionFilter] [aYBc70q] blocking [cluster:monitor/stats] operation due to expired license. Cluster health, cluster stats and indices stats  
operations are blocked on license expiration. All data operations (read and write) continue to work.  
If you have a new license, please update it. Otherwise, please reach out to your support contact.  
[2018-07-27T12:08:42,012][ERROR][o.e.x.m.c.c.ClusterStatsCollector] [aYBc70q] collector [cluster\_stats] failed to collect data  
org.elasticsearch.ElasticsearchSecurityException: current license is non-compliant for [security]

---

<div class="post-metadata">

### Author: ![Sulaiman](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@Sulaiman](https://discuss.elastic.co/u/Sulaiman)
#### Post date: [July 27, 2018, 7:14am UTC](https://discuss.elastic.co/t/license-expired/141872/8 "2018-07-27T07:14:55Z")

</div>

> [@TimV](#):
>
> config

[2018-07-27T12:09:00,215][ERROR][o.e.x.s.a.f.SecurityActionFilter] [aYBc70q] blocking [cluster:monitor/nodes/stats] operation due to expired license. Cluster health, cluster stats and indices stats  
operations are blocked on license expiration. All data operations (read and write) continue to work.  
If you have a new license, please update it. Otherwise, please reach out to your support contact.  
[2018-07-27T12:09:00,219][WARN][o.e.c.InternalClusterInfoService] [aYBc70q] Failed to execute NodeStatsAction for ClusterInfoUpdateJob  
org.elasticsearch.ElasticsearchSecurityException: current license is non-compliant for [security]

---

<div class="post-metadata">

### Author: ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)
#### Post date: [July 27, 2018, 7:26am UTC](https://discuss.elastic.co/t/license-expired/141872/9 "2018-07-27T07:26:55Z")

</div>

Can you provide you config file (`elasticsearch.yml`)?

From the looks of it, you deleted your license.  
Is that correct?

If so, I'll need to see what we can do to get you back up and running.

---

<div class="post-metadata">

### Author: ![Sulaiman](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@Sulaiman](https://discuss.elastic.co/u/Sulaiman)
#### Post date: [July 27, 2018, 7:30am UTC](https://discuss.elastic.co/t/license-expired/141872/10 "2018-07-27T07:30:44Z")

</div>

> [@TimV](#):
>
> elasticsearch.yml

#======================== Elasticsearch Configuration =========================

# 

#NOTE: Elasticsearch comes with reasonable defaults for most settings.  
#Before you set out to tweak and tune the configuration, make sure you  
#understand what are you trying to accomplish and the consequences.

# 

#The primary way of configuring a node is via this file. This template lists  
#the most important settings you may want to configure for a production cluster.

# 

#Please consult the documentation for further information on configuration options:  
#[Elasticsearch Guide | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/index.html)

# 

#---------------------------------- Cluster -----------------------------------

# 

#Use a descriptive name for your cluster:

# 

#cluster.name: my-application

# 

#------------------------------------ Node ------------------------------------

# 

#Use a descriptive name for the node:

# 

#node.name: node-1

# 

#Add custom attributes to the node:

# 

#node.attr.rack: r1

# 

#----------------------------------- Paths ------------------------------------

# 

#Path to directory where to store the data (separate multiple locations by comma):

# 

path.data: /var/lib/elasticsearch

# 

#Path to log files:

# 

path.logs: /var/log/elasticsearch

# 

#----------------------------------- Memory -----------------------------------

# 

#Lock the memory on startup:

# 

#bootstrap.memory\_lock: true

# 

#Make sure that the heap size is set to about half the memory available  
#on the system and that the owner of the process is allowed to use this  
#limit.

# 

#elasticsearch performs poorly when the system is swapping the memory.

# 

#---------------------------------- Network -----------------------------------

# 

#Set the bind address to a specific IP (IPv4 or IPv6):

# 

#network.host: 192.168.0.1

# 

#Set a custom port for HTTP:

# 

#http.port: 9200

# 

#For more information, consult the network module documentation.

# 

#--------------------------------- Discovery ----------------------------------

# 

#Pass an initial list of hosts to perform discovery when new node is started:  
#The default list of hosts is ["127.0.0.1", "[::1]"]

# 

#discovery.zen.ping.unicast.hosts: ["host1", "host2"]

# 

#Prevent the "split brain" by configuring the majority of nodes (total number of master-eligible nodes / 2 + 1):

# 

#discovery.zen.minimum\_master\_nodes:

# 

#For more information, consult the zen discovery module documentation.

# 

#---------------------------------- Gateway -----------------------------------

# 

#Block initial recovery after a full cluster restart until N nodes are started:

# 

#gateway.recover\_after\_nodes: 3

# 

#For more information, consult the gateway module documentation.

# 

#---------------------------------- Various -----------------------------------

# 

#Require explicit names when deleting indices:

# 

#action.destructive\_requires\_name: true  
#threadpool.search.queue\_size: 10000  
xpack.security.enabled: false

---

<div class="post-metadata">

### Author: ![Sulaiman](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@Sulaiman](https://discuss.elastic.co/u/Sulaiman)
#### Post date: [July 27, 2018, 7:31am UTC](https://discuss.elastic.co/t/license-expired/141872/11 "2018-07-27T07:31:32Z")

</div>

Yes I may be removed using curl -X DELETE but not sure.  
Any way I can recover that or add new ?

---

<div class="post-metadata">

### Author: ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)
#### Post date: [July 27, 2018, 7:39am UTC](https://discuss.elastic.co/t/license-expired/141872/12 "2018-07-27T07:39:05Z")

</div>

> [@Sulaiman](#):
>
> I may be removed using curl -X DELETE

Don't do that.

If you don't need the data on this cluster any more, then you can just delete everything (the `data/` directory) start over, and it will regenerate the license.

Otherwise you need to explicitly start a new basic license with:

```auto
curl -uelastic -XPOST 'http://localhost:9200/_xpack/license/start_basic'

```

---

<div class="post-metadata">

### Author: ![Sulaiman](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@Sulaiman](https://discuss.elastic.co/u/Sulaiman)
#### Post date: [July 27, 2018, 7:46am UTC](https://discuss.elastic.co/t/license-expired/141872/13 "2018-07-27T07:46:27Z")

</div>

> [@TimV](#):
>
> ```auto
> curl -uelastic -XPOST 'http://localhost:9200/_xpack/license/start_basic'
> 
> ```

Thanks alot, it resolved my issue.

---

<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: [August 24, 2018, 7:46am UTC](https://discuss.elastic.co/t/license-expired/141872/14 "2018-08-24T07:46:33Z")

</div>

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