# Cluster Node on same machine

**URL:** <https://discuss.elastic.co/t/cluster-node-on-same-machine/7740>\
**Category:** Elasticsearch\
**Created:** [May 17, 2012, 10:11am UTC](https://discuss.elastic.co/t/cluster-node-on-same-machine/7740 "2012-05-17T10:11:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kartavya](https://avatars.discourse-cdn.com/v4/letter/k/65b543/32.png) [@Kartavya](https://discuss.elastic.co/u/Kartavya)\
**Post date:** [May 17, 2012, 10:11am UTC](https://discuss.elastic.co/t/cluster-node-on-same-machine/7740/1 "2012-05-17T10:11:17Z")

</div>

Hi,

I am running two elasticsearch instances on same machine with following  
configuration.

# The cluster name

#cluster.name: PAelasticsearch

# Path Settings

#path.conf: /path/to/conf  
#path.data: /path/to/data  
#path.work: /path/to/work  
#path.logs: /path/to/logs

# Force all memory to be locked, forcing the JVM to never swap

#bootstrap.mlockall: true  
#http.port: 9200

# Gateway Settings

# Controls when to start the initial recovery process when starting a new

cluster

# allowing for better reused of existing data during recovery.

#gateway.recover\_after\_nodes: 1  
#gateway.recover\_after\_time: 5m  
#gateway.expected\_nodes: 2

# Controls the minimum number of master eligible nodes this node should

"see"

# in order to operate within the cluster.

# Set this to a higher value (2-4) when running more than 2 nodes in the

cluster  
#discovery.zen.minimum\_master\_nodes: 1

# The time to wait for ping responses from other nodes when doing node

discovery  
#discovery.zen.ping.timeout: 3s

# Unicast Discovery (disable multicast)

#discovery.zen.ping.multicast.enabled: false  
#discovery.zen.ping.unicast.hosts: ["host1", "host2"]

But both of them running independently. I suppose them to run in cluster.

Please advise.

Thanks

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [May 20, 2012, 7:42pm UTC](https://discuss.elastic.co/t/cluster-node-on-same-machine/7740/2 "2012-05-20T19:42:30Z")

</div>

Possibly multicast is not enabled on your local machine. You can simply use  
unicast discovery even on the same machine, and place in the list of hosts:  
"host:9300" and "host:9301" (the second node will use the 9301 port).

On Thu, May 17, 2012 at 12:11 PM, Pulkit Agrawal [pulkitdotcom@gmail.com](mailto:pulkitdotcom@gmail.com)wrote:

> Hi,
> 
> I am running two elasticsearch instances on same machine with following  
> configuration.
> 
> # The cluster name
> 
> #cluster.name: PAelasticsearch
> 
> # Path Settings
> 
> #path.conf: /path/to/conf  
> #path.data: /path/to/data  
> #path.work: /path/to/work  
> #path.logs: /path/to/logs
> 
> # Force all memory to be locked, forcing the JVM to never swap
> 
> #bootstrap.mlockall: true  
> #http.port: 9200
> 
> # Gateway Settings
> 
> # Controls when to start the initial recovery process when starting a
> 
> new cluster
> 
> # allowing for better reused of existing data during recovery.
> 
> #gateway.recover\_after\_nodes: 1  
> #gateway.recover\_after\_time: 5m  
> #gateway.expected\_nodes: 2
> 
> # Controls the minimum number of master eligible nodes this node should
> 
> "see"
> 
> # in order to operate within the cluster.
> 
> # Set this to a higher value (2-4) when running more than 2 nodes in the
> 
> cluster  
> #discovery.zen.minimum\_master\_nodes: 1
> 
> # The time to wait for ping responses from other nodes when doing node
> 
> discovery  
> #discovery.zen.ping.timeout: 3s
> 
> # Unicast Discovery (disable multicast)
> 
> #discovery.zen.ping.multicast.enabled: false  
> #discovery.zen.ping.unicast.hosts: ["host1", "host2"]
> 
> But both of them running independently. I suppose them to run in cluster.
> 
> Please advise.
> 
> Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 3:28am UTC](https://discuss.elastic.co/t/cluster-node-on-same-machine/7740/3 "2017-07-06T03:28:02Z")

</div>


