# Setup with multiple ElasticSearch in one VM

**URL:** <https://discuss.elastic.co/t/setup-with-multiple-elasticsearch-in-one-vm/223763>\
**Category:** Elasticsearch\
**Created:** [March 16, 2020, 1:12pm UTC](https://discuss.elastic.co/t/setup-with-multiple-elasticsearch-in-one-vm/223763 "2020-03-16T13:12:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gopi\_Sumanth](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gopi_sumanth/32/64511_2.png) [@Gopi\_Sumanth](https://discuss.elastic.co/u/Gopi_Sumanth)\
**Post date:** [March 16, 2020, 1:12pm UTC](https://discuss.elastic.co/t/setup-with-multiple-elasticsearch-in-one-vm/223763/1 "2020-03-16T13:12:16Z")

</div>

I am using elastic-7.6.1. I am trying to setup elastic cluster locally in vm with two masters and one slave.

I have downloaded tar file and extracted into 3 different locations and modified the elasticsearch.yml with the below configurations.

first configuration

```
cluster.name: test-cluster
node.name: m1node
node.master: true
node.data: true
network.host: xx.xxx.xxx.xx
http.port: 9200
transport.tcp.port: 9300
discovery.seed_hosts:
        - xx.xxx.xxx.xx:9202
        - xx.xxx.xxx.xx:9200
        - 1xx.xxx.xxx.xx:9201
cluster.initial_master_nodes:
        - xx.xxx.xxx.xx:9200
        - xx.xxx.xxx.xx:9201

```

second configuration

```
    cluster.name: test-cluster
    node.name: m2node
    node.master: true
    node.data: true
    network.host: xx.xxx.xxx.xx
    http.port: 9201
    transport.tcp.port: 9301
    discovery.seed_hosts:
            - xx.xxx.xxx.xx:9202
            - xx.xxx.xxx.xx:9200
            - xx.xxx.xxx.xx:9201
    cluster.initial_master_nodes:
            - xx.xxx.xxx.xx:9200
            - xx.xxx.xxx.xx:9201

```

third configuration

```
cluster.name: test-cluster
node.name: s1node
node.master: false
node.data: true
network.host: xx.xxx.xxx.xx
transport.tcp.port: 9302
http.port: 9202
discovery.seed_hosts:
        - xx.xxx.xxx.xx:9202
        - xx.xxx.xxx.xx:9200
        - xx.xxx.xxx.xx:9201
cluster.initial_master_nodes:
        - xx.xxx.xxx.xx:9200
        - xx.xxx.xxx.xx:9201

```

I started the three elastic search instances using ./elasticsearch. The server starts but it doesn't discover other nodes.I get this error.

```
[2020-03-16T08:08:11,542][WARN][o.e.c.c.ClusterFormationFailureHelper] [s1node] master not discovered yet: have discovered [{s1node}{Hf4KYDgzQF-owOE1VwH7sw}{1rSKJ_NvTxyWdlMusakpbQ}{xx.xxx.xxx.xx}{xx.xxx.xxx.xx:9302}{dil}{ml.machine_memory=8201465856, xpack.installed=true, ml.max_open_jobs=20}]; discovery will continue using [xx.xxx.xxx.xx:9202, xx.xxx.xxx.xx:9200, xx.xxx.xxx.xx:9201] from hosts providers and [] from last-known cluster state; node term 0, last-accepted version 0 in term 0
[2020-03-16T08:08:14,594][WARN][o.e.t.TcpTransport] [s1node] exception caught on transport layer [Netty4TcpChannel{localAddress=/xx.xxx.xxx.xx:44402, remoteAddress=/xx.xxx.xxx.xx:9201}], closing connection
io.netty.handler.codec.DecoderException: java.io.StreamCorruptedException: received HTTP response on transport port, ensure that transport port (not HTTP port) of a remote node is specified in the configuration
	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:473) ~[netty-codec-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:281) ~[netty-codec-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) [netty-transport-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) [netty-transport-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) [netty-transport-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:241) [netty-handler-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) [netty-transport-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) [netty-transport-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) [netty-transport-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1422) [netty-transport-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) [netty-transport-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) [netty-transport-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:931) [netty-transport-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) [netty-transport-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:700) [netty-transport-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:600) [netty-transport-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:554) [netty-transport-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:514) [netty-transport-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$6.run(SingleThreadEventExecutor.java:1050) [netty-common-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [netty-common-4.1.43.Final.jar:4.1.43.Final]
	at java.lang.Thread.run(Thread.java:830) [?:?]
Caused by: java.io.StreamCorruptedException: received HTTP response on transport port, ensure that transport port (not HTTP port) of a remote node is specified in the configuration
	at org.elasticsearch.transport.TcpTransport.readHeaderBuffer(TcpTransport.java:749) ~[elasticsearch-7.6.1.jar:7.6.1]
	at org.elasticsearch.transport.TcpTransport.readMessageLength(TcpTransport.java:738) ~[elasticsearch-7.6.1.jar:7.6.1]
	at org.elasticsearch.transport.netty4.Netty4SizeHeaderFrameDecoder.decode(Netty4SizeHeaderFrameDecoder.java:43) ~[transport-netty4-client-7.6.1.jar:7.6.1]
	at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:503) ~[netty-codec-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:442) ~[netty-codec-4.1.43.Final.jar:4.1.43.Final]
	... 20 more
[2020-03-16T08:08:14,602][WARN][o.e.t.TcpTransport] [s1node] exception caught on transport layer [Netty4TcpChannel{localAddress=/xx.xxx.xxx.xx:44402, remoteAddress=/xx.xxx.xxx.xx:9201}], closing connection
io.netty.handler.codec.DecoderException: java.io.StreamCorruptedException: received HTTP response on transport port, ensure that transport port (not HTTP port) of a remote node is specified in the configuration
	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:473) ~[netty-codec-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.channelInputClosed(ByteToMessageDecoder.java:406) ~[netty-codec-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.channelInputClosed(ByteToMessageDecoder.java:373) ~[netty-codec-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:356) ~[netty-codec-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:257) [netty-transport-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:243) [netty-transport-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:236) [netty-transport-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.handler.logging.LoggingHandler.channelInactive(LoggingHandler.java:167) [netty-handler-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:257) [netty-transport-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:243) [netty-transport-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:236) [netty-transport-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelInactive(DefaultChannelPipeline.java:1417) [netty-transport-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:257) [netty-transport-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:243) [netty-transport-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.channel.DefaultChannelPipeline.fireChannelInactive(DefaultChannelPipeline.java:913) [netty-transport-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.channel.AbstractChannel$AbstractUnsafe$8.run(AbstractChannel.java:819) [netty-transport-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) [netty-common-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:510) [netty-common-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:518) [netty-transport-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$6.run(SingleThreadEventExecutor.java:1050) [netty-common-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [netty-common-4.1.43.Final.jar:4.1.43.Final]
	at java.lang.Thread.run(Thread.java:830) [?:?]
Caused by: java.io.StreamCorruptedException: received HTTP response on transport port, ensure that transport port (not HTTP port) of a remote node is specified in the configuration
	at org.elasticsearch.transport.TcpTransport.readHeaderBuffer(TcpTransport.java:749) ~[elasticsearch-7.6.1.jar:7.6.1]
	at org.elasticsearch.transport.TcpTransport.readMessageLength(TcpTransport.java:738) ~[elasticsearch-7.6.1.jar:7.6.1]
	at org.elasticsearch.transport.netty4.Netty4SizeHeaderFrameDecoder.decode(Netty4SizeHeaderFrameDecoder.java:43) ~[transport-netty4-client-7.6.1.jar:7.6.1]
	at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:503) ~[netty-codec-4.1.43.Final.jar:4.1.43.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:442) ~[netty-codec-4.1.43.Final.jar:4.1.43.Final]
	... 21 more

```

Can someone please help me with this issue.I am new to elastic search.Thank you

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [March 16, 2020, 1:56pm UTC](https://discuss.elastic.co/t/setup-with-multiple-elasticsearch-in-one-vm/223763/2 "2020-03-16T13:56:09Z")

</div>

Hey,

first there is no such thing as a slave node. The `node.master` setting is only about being master eligible.

Second, you are trying to connect to the HTTP ports of your nodes, instead of using the node-to-node port, which is `9300`. This is also why you are getting an error like `received HTTP response on transport port, ensure that transport port (not HTTP port) of a remote node is specified in the configuration` which tries to hint at the fact, that there seems to be a mixup between HTTP and node-to-node communication.

--Alex

---

<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:** [April 13, 2020, 1:56pm UTC](https://discuss.elastic.co/t/setup-with-multiple-elasticsearch-in-one-vm/223763/3 "2020-04-13T13:56:17Z")

</div>

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