Configuration of multiple ports is not working in ES

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.

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

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.

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

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

Thanks for your input.
Also could you please suggest me if there is any other way to fullfill this requirement.
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)

any suggestions pls

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?

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:port/persons,addresses/person,address/_search)

Kindly let me know the solution.

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

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