blue-sky
blue-sky

Reputation: 53916

Multiple elastic instances on same host

I'm attempting to test elastic replication and install multiple elastic instances on the same host.

I've created an additional elastic search configuration file and set the following config property:

http.port: 9500

The other elastic search configuration file contains the default value :

http.port: 9200 

I attempt to start elastic using :

./bin/elasticsearch -Ees.config=./config/elasticsearch.yml

but receive error :

uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalArgumentException: unknown setting [es.config] please check that any required plugins are installed, or check the breaking changes documentation for removed settings

How to utilize 2 elasticsearch instances on the same host ?

Is there an alternative to the es.config parameter ?

Upvotes: 0

Views: 405

Answers (2)

apt-get_install_skill
apt-get_install_skill

Reputation: 2908

As @Alkis Kalogeris already stated, I would also recommend using docker/docker-compose. You would just need to expose a different port to your localhost.

Upvotes: 1

Alkis Kalogeris
Alkis Kalogeris

Reputation: 17773

ES_PATH_CONF=/path/to/my/config ./bin/elasticsearch

This is the way to do it according to the documentation https://www.elastic.co/guide/en/elasticsearch/reference/current/settings.html (depending on the version you are using, it might differ).

I would recommend using a docker setup for this endeavour as described here (official elasticsearch documentation) https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html

Upvotes: 2

Related Questions