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

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.

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.

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

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 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.

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