# Elasticsearch error license is not available

**URL:** <https://discuss.elastic.co/t/elasticsearch-error-license-is-not-available/271039>\
**Category:** Elasticsearch\
**Created:** [April 23, 2021, 5:39am UTC](https://discuss.elastic.co/t/elasticsearch-error-license-is-not-available/271039 "2021-04-23T05:39:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![charles97](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/charles97/32/79243_2.png) [@charles97](https://discuss.elastic.co/u/charles97)\
**Post date:** [April 23, 2021, 5:39am UTC](https://discuss.elastic.co/t/elasticsearch-error-license-is-not-available/271039/1 "2021-04-23T05:39:34Z")

</div>

es: 7.12  
os:CentOS7  
java :` java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.282.b08-1.el7_9.x86_64/jre/bin/java)`

My cluster used to had 2 node,  
this node as : `master`  
another node as : `data-1`.  
I decide to make it as single node again so I shut `data-1`.  
I reconfigure `elasticsearch.yml` on `master` to make it as default ,  
but when I try to rune the previously `master` node it returning

```auto
{"statusCode":503,"error":"Service Unavailable","message":"License is not available."}

```

my log  
`journalctl --unit elasticsearch`

```auto
Mar 25 13:33:56 localhost.localdomain systemd[1]: Starting Elasticsearch...
Mar 25 13:33:58 localhost.localdomain systemd-entrypoint[2952]: Exception in thread "main" java.lang.RuntimeException: starting java failed with [1]
Mar 25 13:33:58 localhost.localdomain systemd-entrypoint[2952]: output:
Mar 25 13:33:58 localhost.localdomain systemd-entrypoint[2952]: error:
Mar 25 13:33:58 localhost.localdomain systemd-entrypoint[2952]: Unrecognized VM option 'UseConcMarkSweepGC'
Mar 25 13:33:58 localhost.localdomain systemd-entrypoint[2952]: Error: Could not create the Java Virtual Machine.
Mar 25 13:33:58 localhost.localdomain systemd-entrypoint[2952]: Error: A fatal exception has occurred. Program will exit.
Mar 25 13:33:58 localhost.localdomain systemd-entrypoint[2952]: at org.elasticsearch.tools.launchers.JvmOption.flagsFinal(JvmOption.java:119)
Mar 25 13:33:58 localhost.localdomain systemd-entrypoint[2952]: at org.elasticsearch.tools.launchers.JvmOption.findFinalOptions(JvmOption.java:81)
Mar 25 13:33:58 localhost.localdomain systemd-entrypoint[2952]: at org.elasticsearch.tools.launchers.JvmErgonomics.choose(JvmErgonomics.java:38)
Mar 25 13:33:58 localhost.localdomain systemd-entrypoint[2952]: at org.elasticsearch.tools.launchers.JvmOptionsParser.jvmOptions(JvmOptionsParser.java:135)
Mar 25 13:33:58 localhost.localdomain systemd-entrypoint[2952]: at org.elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:86)
Mar 25 13:33:58 localhost.localdomain systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
Mar 25 13:33:58 localhost.localdomain systemd[1]: Failed to start Elasticsearch.

```

I've tried some solution here [solutions from github](https://github.com/elastic/elasticsearch/issues/51361), [https://discuss.elastic.co/t/elasticsearch-wont-start-after-7-9-1-to-7-9-2-upgrade/249878/2](https://discuss.elastic.co/t/elasticsearch-wont-start-after-7-9-1-to-7-9-2-upgrade/249878/2)

```auto
8-13:-XX:+UseConcMarkSweepGC
8-13:-XX:CMSInitiatingOccupancyFraction=75
8-13:-XX:+UseCMSInitiatingOccupancyOnly

```

not working,

```auto
-XX:+UseConcMarkSweepGC
-XX:CMSInitiatingOccupancyFraction=75
-XX:+UseCMSInitiatingOccupancyOnly

```

not working

```auto
#-XX:+UseConcMarkSweepGC
#-XX:CMSInitiatingOccupancyFraction=75
#-XX:+UseCMSInitiatingOccupancyOnly

```

not working either

any suggestion will be appreciated

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 27, 2021, 1:16am UTC](https://discuss.elastic.co/t/elasticsearch-error-license-is-not-available/271039/2 "2021-04-27T01:16:44Z")

</div>

How exactly did you remove the other node, can you provide more details on that?

---

<div class="post-metadata">

**Author:** ![charles97](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/charles97/32/79243_2.png) [@charles97](https://discuss.elastic.co/u/charles97)\
**Post date:** [April 27, 2021, 6:08am UTC](https://discuss.elastic.co/t/elasticsearch-error-license-is-not-available/271039/3 "2021-04-27T06:08:34Z")

</div>

Hi @warkolm , sure.  
I just shut the elasticsearch service on the node I want to remove.  
then return the elasticsearch.yml of the node I want to keep as default.

---

<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:** [May 25, 2021, 6:08am UTC](https://discuss.elastic.co/t/elasticsearch-error-license-is-not-available/271039/4 "2021-05-25T06:08:51Z")

</div>

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