# Configuration of multiple ports is not working in ES

**URL:** <https://discuss.elastic.co/t/configuration-of-multiple-ports-is-not-working-in-es/55402>\
**Category:** Elasticsearch\
**Created:** [July 13, 2016, 12:17pm UTC](https://discuss.elastic.co/t/configuration-of-multiple-ports-is-not-working-in-es/55402 "2016-07-13T12:17:15Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![prasad.ram1431](https://avatars.discourse-cdn.com/v4/letter/p/c89c15/32.png) [@prasad.ram1431](https://discuss.elastic.co/u/prasad.ram1431)\
**Post date:** [July 13, 2016, 12:17pm UTC](https://discuss.elastic.co/t/configuration-of-multiple-ports-is-not-working-in-es/55402/1 "2016-07-13T12:17:15Z")

</div>

Hi All,

I have a requirement to have multiple instances of ElasticSearch with one IP and different ports.  
For this I tried the below configuration in my elasticsearch.yml file,  
http.port : ["9200", "9202"]  
http.publish\_port : 9200

which means 9200 port will be established connection with ES and also it will be listening to 9202 port through 9200.

By using the above configuration, I am able to get data from multiple index in windows machine, but not in Linux machine.

Kindly help me on the issue, whether its a proper way to configure multiple ports.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 13, 2016, 1:27pm UTC](https://discuss.elastic.co/t/configuration-of-multiple-ports-is-not-working-in-es/55402/2 "2016-07-13T13:27:49Z")

</div>

You can't do that.

But you can start 2 nodes on the same machine. One can be a client node only with port 9202.

That being said I don't understand the use case TBH

---

<div class="post-metadata">

**Author:** ![prasad.ram1431](https://avatars.discourse-cdn.com/v4/letter/p/c89c15/32.png) [@prasad.ram1431](https://discuss.elastic.co/u/prasad.ram1431)\
**Post date:** [July 13, 2016, 2:30pm UTC](https://discuss.elastic.co/t/configuration-of-multiple-ports-is-not-working-in-es/55402/3 "2016-07-13T14:30:59Z")

</div>

Did you mean to say like, two nodes means to have a cluster whose one node running on ES 9200 and other node on ES 9201. Could you also please elaborate your information, as I am new to ES.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 13, 2016, 4:18pm UTC](https://discuss.elastic.co/t/configuration-of-multiple-ports-is-not-working-in-es/55402/4 "2016-07-13T16:18:47Z")

</div>

Yes. But the question is still why do you think you need that?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 13, 2016, 8:58pm UTC](https://discuss.elastic.co/t/configuration-of-multiple-ports-is-not-working-in-es/55402/5 "2016-07-13T20:58:15Z")

</div>

You cannot get ES to listen on multiple ports for the HTTP or transport protocols.

---

<div class="post-metadata">

**Author:** ![prasad.ram1431](https://avatars.discourse-cdn.com/v4/letter/p/c89c15/32.png) [@prasad.ram1431](https://discuss.elastic.co/u/prasad.ram1431)\
**Post date:** [July 14, 2016, 5:35am UTC](https://discuss.elastic.co/t/configuration-of-multiple-ports-is-not-working-in-es/55402/6 "2016-07-14T05:35:47Z")

</div>

Thanks for your input.  
Also could you please suggest me if there is any other way to fullfill this requirement.  
@Dadoonet,  
We need to follow that approach as we have so many scripts to run on ES.

Please suggest a solution for this approach(how to get data from different indices residing at different ports of single IP)

---

<div class="post-metadata">

**Author:** ![prasad.ram1431](https://avatars.discourse-cdn.com/v4/letter/p/c89c15/32.png) [@prasad.ram1431](https://discuss.elastic.co/u/prasad.ram1431)\
**Post date:** [July 14, 2016, 12:36pm UTC](https://discuss.elastic.co/t/configuration-of-multiple-ports-is-not-working-in-es/55402/7 "2016-07-14T12:36:32Z")

</div>

any suggestions pls

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 14, 2016, 7:20pm UTC](https://discuss.elastic.co/t/configuration-of-multiple-ports-is-not-working-in-es/55402/8 "2016-07-14T19:20:39Z")

</div>

> how to get data from different indices residing at different ports of single IP

It does not make any sense to me.

Can you elaborate with a concrete example what you are trying to do?

---

<div class="post-metadata">

**Author:** ![prasad.ram1431](https://avatars.discourse-cdn.com/v4/letter/p/c89c15/32.png) [@prasad.ram1431](https://discuss.elastic.co/u/prasad.ram1431)\
**Post date:** [July 15, 2016, 5:11am UTC](https://discuss.elastic.co/t/configuration-of-multiple-ports-is-not-working-in-es/55402/9 "2016-07-15T05:11:09Z")

</div>

ok, Let me explain you clearly below,

1. ES instance one(port 9201), ES instance two(port 9202) but IP's will be same
2. Two ES instances are running
3. I am loading person table data into ES 9201
4. I am loading address table data into ES 9202
5. Now I am able to get the data of both indexes separately
6. Now I need to get data of both Person & Address using single ES url  
(ex: [http://ip](http://ip):port/persons,addresses/person,address/\_search)

Kindly let me know the solution.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 15, 2016, 7:30am UTC](https://discuss.elastic.co/t/configuration-of-multiple-ports-is-not-working-in-es/55402/10 "2016-07-15T07:30:53Z")

</div>

Just create an index person in node 1 and an index address in node 1  
And remove node2

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 15, 2016, 7:33am UTC](https://discuss.elastic.co/t/configuration-of-multiple-ports-is-not-working-in-es/55402/11 "2016-07-15T07:33:12Z")

</div>

Yeah, it's not really clear why you want to do this?

---

<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 5, 2017, 10:35pm UTC](https://discuss.elastic.co/t/configuration-of-multiple-ports-is-not-working-in-es/55402/12 "2017-07-05T22:35:19Z")

</div>


