Installing elasticsearch 5.4 in a system having elasticsearch 2.3.3 already installed


(Aj) #1

I am trying to install elasticsearch 5.4. But elasticsearch 2.3.3 is already installed in my system. Without touching the old settings, I need to install new 5.4 version. Already a service named
elasticsearch 2.3.3(elasticsearch-service-64) is in Services(stopped for now). How to add a new service from ES5.4 version.
in command prompt I gave

   c:\elasticsearch-{version}bin>service install 

but it shows

 'service' is not recognized as an internal or external command,
  operable program or batch file.

then I tried

c:\elasticsearch-{version}bin>elasticsearch-service install 

Installing service      :  "elasticsearch-service-x64"
Using JAVA_HOME (64-bit):  "C:\Program Files\Java\jdk1.8.0_91"
Failed installing 'elasticsearch-service-x64' service

log

[2017-05-17 03:41:57] [info]  [10272] Commons Daemon procrun (1.0.15.0 64-bit) started
[2017-05-17 03:41:57] [info]  [10272] Service elasticsearch-service-x64 name Elasticsearch 5.4.0 (elasticsearch-service-x64)
[2017-05-17 03:41:57] [error] [10272] The specified service already exists.
[2017-05-17 03:41:57] [error] [10272] Failed installing 'elasticsearch-service-x64' service
[2017-05-17 03:41:58] [error] [10272] The specified service already exists.
[2017-05-17 03:41:58] [error] [10272] Commons Daemon procrun failed with exit value: 8 (Failed to install service)
[2017-05-17 03:41:58] [error] [10272] The specified service already exists.

How do I create a new service for ES 5.4?


Shards will be relocated away from this node
(Daniel Mitterdorfer) #2

Hi @ajoealex,

the problem is that a service with the same name is already installed. However, you can set a different SERVICE_ID. Then you should be able to install the new service.

However, you should ensure that both Elasticsearch instances do not try to talk to each other. At the very least you should configure a different transport port in config/elasticsearch.yml. It's not strictly necessary but I also recommend that you set a different HTTP port. For example:

http.port: 10200
transport.tcp.port: 10300

You can then reach your Elasticsearch 5 node on http://localhost:10200/ and your Elasticsearch 2 node on http://localhost:9200/ (assuming that you did not change the defaults for your Elasticsearch 2 node).

Daniel


(system) #3

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