Cluster Setup Windows 2012 R2 VMs

Hi, I'm new to ES. I'm trying to set up a 2 node cluster but after install on two separate VMs on the same network the two nodes do not see each other. Here is the output from the two VMs, also I was able to browse a directory of one VM from the other so it does not appear like a connectivity issues. Same version of ES on both nodes, 2.3

someone suggested that multicast option was set to False on one of the node configuration file, but can't find that option. Any help would be appreciated

Output of one of the nodes:
{
"name": "Klaw",
"transport_address": "127.0.0.1:9300",
"host": "127.0.0.1",
"ip": "127.0.0.1",
"version": "2.3.0",
"build": "8371be8",
"http_address": "127.0.0.1:9200",
"settings": {
"name": "Klaw",
"client": {
"type": "node"
},
"cluster": {
"name": "elasticsearch"
},
"path": {
"logs": "C:/temp/elasticsearch-2.3.0/elasticsearch-2.3.0/logs",
"home": "C:\temp\elasticsearch-2.3.0\elasticsearch-2.3.0"
},
"config": {
"ignore_system_properties": "true"
}
},
"os": {
"refresh_interval_in_millis": 1000,
"name": "Windows Server 2012 R2",
"arch": "x86",
"version": "6.3",
"available_processors": 4,
"allocated_processors": 4
},
"process": {
"refresh_interval_in_millis": 1000,
"id": 2256,
"mlockall": false
},
"jvm": {
"pid": 2256,
"version": "1.8.0_77",
"vm_name": "Java HotSpot(TM) Client VM",
"vm_version": "25.77-b03",
"vm_vendor": "Oracle Corporation",
"start_time_in_millis": 1459542468393,
"mem": {
"heap_init_in_bytes": 268435456,
"heap_max_in_bytes": 1037959168,
"non_heap_init_in_bytes": 163840,
"non_heap_max_in_bytes": 0,
"direct_max_in_bytes": 1037959168
},
"gc_collectors": [
"Copy"
,
"MarkSweepCompact"
],
"memory_pools": [
"Code Cache"
,
"Metaspace"
,
"Eden Space"
,
"Survivor Space"
,
"Tenured Gen"
],
"using_compressed_ordinary_object_pointers": "unknown"
},
"thread_pool": {
"force_merge": {
"type": "fixed",
"min": 1,
"max": 1,
"queue_size": -1
},
"percolate": {
"type": "fixed",
"min": 4,
"max": 4,
"queue_size": 1000
},
"fetch_shard_started": {
"type": "scaling",
"min": 1,
"max": 8,
"keep_alive": "5m",
"queue_size": -1
},
"listener": {
"type": "fixed",
"min": 2,
"max": 2,
"queue_size": -1
},
"index": {
"type": "fixed",
"min": 4,
"max": 4,
"queue_size": 200
},
"refresh": {
"type": "scaling",
"min": 1,
"max": 2,
"keep_alive": "5m",
"queue_size": -1
},
"suggest": {
"type": "fixed",
"min": 4,
"max": 4,
"queue_size": 1000
},
"generic": {
"type": "cached",
"keep_alive": "30s",
"queue_size": -1
},
"warmer": {
"type": "scaling",
"min": 1,
"max": 2,
"keep_alive": "5m",
"queue_size": -1
},
"search": {
"type": "fixed",
"min": 7,
"max": 7,
"queue_size": 1000
},
"flush": {
"type": "scaling",
"min": 1,
"max": 2,
"keep_alive": "5m",
"queue_size": -1
},
"fetch_shard_store": {
"type": "scaling",
"min": 1,
"max": 8,
"keep_alive": "5m",
"queue_size": -1
},
"management": {
"type": "scaling",
"min": 1,
"max": 5,
"keep_alive": "5m",
"queue_size": -1
},
"get": {
"type": "fixed",
"min": 4,
"max": 4,
"queue_size": 1000
},
"bulk": {
"type": "fixed",
"min": 4,
"max": 4,
"queue_size": 50
},
"snapshot": {
"type": "scaling",
"min": 1,
"max": 2,
"keep_alive": "5m",
"queue_size": -1
}
},
"transport": {
"bound_address": [
"127.0.0.1:9300"
,
"[::1]:9300"
],
"publish_address": "127.0.0.1:9300",
"profiles": { }
},
"http": {
"bound_address": [
"127.0.0.1:9200"
,
"[::1]:9200"
],
"publish_address": "127.0.0.1:9200",
"max_content_length_in_bytes": 104857600
},
"plugins": [
{
"name": "license",
"version": "2.3.0",
"description": "Internal Elasticsearch Licensing Plugin",
"jvm": true,
"classname": "org.elasticsearch.license.plugin.LicensePlugin",
"isolated": false,
"site": false
}
,
{
"name": "marvel-agent",
"version": "2.3.0",
"description": "Elasticsearch Marvel Agent",
"jvm": true,
"classname": "org.elasticsearch.marvel.MarvelPlugin",
"isolated": false,
"site": false
}
],
"modules": [
{
"name": "lang-expression",
"version": "2.3.0",
"description": "Lucene expressions integration for Elasticsearch",
"jvm": true,
"classname": "org.elasticsearch.script.expression.ExpressionPlugin",
"isolated": true,
"site": false
}
,
{
"name": "lang-groovy",
"version": "2.3.0",
"description": "Groovy scripting integration for Elasticsearch",
"jvm": true,
"classname": "org.elasticsearch.script.groovy.GroovyPlugin",
"isolated": true,
"site": false
}
,
{
"name": "reindex",
"version": "2.3.0",
"description": "_reindex and _update_by_query APIs",
"jvm": true,
"classname": "org.elasticsearch.index.reindex.ReindexPlugin",
"isolated": true,
"site": false
}
]
}

Multicast does not exist anymore in 2.x. (As a plugin only).

You did not set network.host, right?

I don't believe so. How do i set that up?

Read https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-configuration.html#settings
and
https://www.elastic.co/guide/en/elasticsearch/reference/2.3/modules-network.html#network-interface-values

David,
My understanding was that I wasn't supposed to change anything in the elasticsearch.yml file. Based on your reply and the links it sounds like I need to change network.host in the config file. I tried changing it to the internal IPs associated with each VM but that did not work. I also tired to change network.host to 10.0.0.4 and that did not work either.

Based on my understanding, once the nodes see each other, I should be able to view both nodes in HEAD, correct? That has not happened with my tweaking of the entry for network.host.

I must be missing something obvious, based on everything I've been reading so far, the discovery phase generally happens automatically, ex. http://stackoverflow.com/questions/16821101/how-to-set-up-es-cluster

Thanks,
Alexey

You also have to define unicast hosts. https://www.elastic.co/guide/en/elasticsearch/reference/2.3/modules-discovery-zen.html#unicast

David,

I'm a bit lost here. Should I be making changes to the config files on
both nodes?

If so,

  1. Should I be changing network.host setting? Should this be set to a
    local IP like 192.168.100.121? Or should this be 10.0.0.4 as listed in the
    attached config?

  2. Should I be changing anything under Discovery?

  3. Do I need to change the port?

  4. Do I need to change node.name to say node-2 for the attached config for
    the second node?

  5. Should anything else be changed in the attached configs?

Thanks a lot for your time!
Alexey

Resolved by

  1. turning off firewall on both nodes
  2. verifying that could ping node 1 from node 2 and vice versa
  3. changing elasticsearch.yml on each node with network.host set to internal IPs of each node
  4. changing elasticsearch.yml on each node discovery.zen.ping.unicast.hosts: ["internal IP of node 1", "Internal IP of node 2"]

verifying by going to http://xxx.xxx.xxx.xxx:9200/_plugin/head/ instead of localhost
**xxx.xxx.xxx.xxx internal IP of node 1

1 Like

Awesome! Thanks for the follow up.