# Install and configure elasticsearch 6.8 and 7.9 on a Single Ubuntu server

**URL:** <https://discuss.elastic.co/t/install-and-configure-elasticsearch-6-8-and-7-9-on-a-single-ubuntu-server/250785>\
**Category:** Elasticsearch\
**Created:** [October 2, 2020, 12:30pm UTC](https://discuss.elastic.co/t/install-and-configure-elasticsearch-6-8-and-7-9-on-a-single-ubuntu-server/250785 "2020-10-02T12:30:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hemangc](https://avatars.discourse-cdn.com/v4/letter/h/ed655f/32.png) [@hemangc](https://discuss.elastic.co/u/hemangc)\
**Post date:** [October 2, 2020, 12:30pm UTC](https://discuss.elastic.co/t/install-and-configure-elasticsearch-6-8-and-7-9-on-a-single-ubuntu-server/250785/1 "2020-10-02T12:30:40Z")

</div>

Hi Guys,

I am trying to configure Elasticsearch version 6.8 and version 7.9 on one Ubuntu server. Both versions will be communicate with diffrent TCP port.

I am having a trouble while configuring this scenarion in one of my test debian based system but i am unable to do so.

Can anyone help me OR guide me to achive this?

Thanks in advance.

---

<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:** [October 2, 2020, 1:18pm UTC](https://discuss.elastic.co/t/install-and-configure-elasticsearch-6-8-and-7-9-on-a-single-ubuntu-server/250785/2 "2020-10-02T13:18:50Z")

</div>

What trouble are you having? And how are you installing elasticsearch?

Since you are trying to run two different versions on the same server, I would recomend that you install them using the `.tar.gz.` package to avoid confusion.

---

<div class="post-metadata">

**Author:** ![hemangc](https://avatars.discourse-cdn.com/v4/letter/h/ed655f/32.png) [@hemangc](https://discuss.elastic.co/u/hemangc)\
**Post date:** [October 2, 2020, 1:31pm UTC](https://discuss.elastic.co/t/install-and-configure-elasticsearch-6-8-and-7-9-on-a-single-ubuntu-server/250785/3 "2020-10-02T13:31:40Z")

</div>

Hi @leandrojmp

Thanks for your reply on my case.

I am trying to installing both Elasticsearch packages through an .tar.gz file only. i was able to configure ELS 6.8 having a following context in my elasticsearch.yml file.

cluster.name: elastic\_68

# 

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

# 

# Use a descriptive name for the node:

# 

node.name: node-1  
node.master: true  
node.data: true  
transport.host: localhost  
transport.tcp.port: 9300  
http.port: 9200  
network.host: 0.0.0.0

Below is the context of a ELS 7.9 elasticsearch.yml file.

cluster.name: elastic\_68

# 

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

# 

# Use a descriptive name for the node:

# 

node.name: node-2  
node.data: true  
transport.host: localhost  
transport.tcp.port: 9302  
http.port: 9202  
network.host: 0.0.0.0

When i am trying to start the elasticsearch 7.9, i am receiving following errors on the terminal screen.

ktpl@ubuntu ~/elasticsearch-7.9.2 bin/elasticsearchv7 -d future versions of Elasticsearch will require Java 11; your Java version from [/usr/lib/jvm/java-8-openjdk-amd64/jre] does not meet this requirement future versions of Elasticsearch will require Java 11; your Java version from [/usr/lib/jvm/java-8-openjdk-amd64/jre] does not meet this requirement ktpl@ubuntu ~/elasticsearch-7.9.2 uncaught exception in thread [main]  
java.lang.IllegalStateException: failed to obtain node locks, tried [[/home/ktpl/elasticsearch-7.9.2/data]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max\_local\_storage\_nodes] (was [1])?  
at org.elasticsearch.env.NodeEnvironment.(NodeEnvironment.java:301)  
at org.elasticsearch.node.Node.(Node.java:344)  
at org.elasticsearch.node.Node.(Node.java:277)  
at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:227)  
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:227)  
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:393)  
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170)  
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161)  
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)  
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127)  
at org.elasticsearch.cli.Command.main(Command.java:90)  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126)  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)  
For complete error details, refer to the log at /home/ktpl/elasticsearch-7.9.2/logs/elastic\_68.log

Can you please let me know which these error means? should i run the els service through an Elasticsearch user only?

Thanks,  
Hemang

---

<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:** [October 2, 2020, 1:52pm UTC](https://discuss.elastic.co/t/install-and-configure-elasticsearch-6-8-and-7-9-on-a-single-ubuntu-server/250785/4 "2020-10-02T13:52:43Z")

</div>

> [@hemangc](#):
>
> Java.lang.IllegalStateException: failed to obtain node locks, tried [[/home/ktpl/elasticsearch-7.9.2/data]] with lock id [0]

It seems to be already a instance running writing to this data dir, can you check it?

Also, I would recommend that you explicitly set the `path.data` and `path.logs` to [different directories](https://www.elastic.co/guide/en/elasticsearch/reference/master/path-settings.html) in each one of your nodes.

You are also using the same `cluster.name` for your nodes, you can't do that, they need to have different a `cluster.name`.

---

<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:** [October 30, 2020, 1:52pm UTC](https://discuss.elastic.co/t/install-and-configure-elasticsearch-6-8-and-7-9-on-a-single-ubuntu-server/250785/5 "2020-10-30T13:52:55Z")

</div>

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