I found the solution @stackoverflow
Complete steps on Windows Box are:
- unzip elastic, go to
C:\ELK\elastic
run the following commandbin\elasticsearch-service.bat install enode1
which will create service named enode1 - edit
elasticsearch.yml
config file:
cluster.name: Animals
node.name: Snake
node.master: true
node.data: true
path.data: C:\ELK\storage\snake\data
path.logs: C:\ELK\storage\snake\logs
http.port: 9200
-
run service manager
enode1
and set-up your services rules and start the service
if service manager fails, start manually use the following commandbin/elasticsearch.bat
-
unzip elastic, go to
C:\ELK\elastic2
run the following commandbin\elasticsearch-service.bat install enode2
which will create service named enode2 -
edit
elasticsearch.yml
config file:
cluster.name: Animals
node.name: Baboon
node.master: true
node.data: true
path.data: C:\ELK\storage\baboon\data
path.logs: C:\ELK\storage\baboon\logs
http.port: 9201
-
run service manager
enode2
and set-up your services rules and start the service
if service manager fails, start manually use the following commandbin/elasticsearch.bat
-
At this point you have 2 separate nodes as 2 separate Windows Services and
GET http://localhost:9200/_cluster/health
shows something like:
{
"cluster_name": "Animals",
"status": "green",
"timed_out": false,
"number_of_nodes": 2,
"number_of_data_nodes": 2,
"active_primary_shards": 4,
"active_shards": 8,
"relocating_shards": 0,
"initializing_shards": 0,
"unassigned_shards": 0,
"delayed_unassigned_shards": 0,
"number_of_pending_tasks": 0,
"number_of_in_flight_fetch": 0,
"task_max_waiting_in_queue_millis": 0,
"active_shards_percent_as_number": 100
}