My requirement is to change the default ES port 9200 to 1000. I changed it in elasticsearch.yml under "http.port: 1000". Now when I start another node on the same machine I got an error
BindHttpException[Failed to bind to [1000]]
ChannelException[Failed to bind to: 0.0.0.0/0.0.0.0:
BindException[Address already in use: bind]
Right now I am just doing the things for testing so I am doing it on single machine . Please suggest how I can achieve this as my cluster is in yellow and to turn it to green i have to run another node on this machine .
The default settings for http.port uses the range 9200 to 9299. On start up the node will try to bind to port 9200 but if it is use it will try 9201, then 9202 and so in until it either successfully bind to a port or it reaches 9299 and fails. If you specify an explicit port in elasticsearch.yml like http.port: 1000 then you are asking elasticsearch to bind to only that port and if the port is in use it will fail and will not try other ports. You can emulate the same range behaviour for your ports by setting:
http.port: 1000-1050
This will try port 1000 first and then 1001, 1002, etc up to but not including port 1050.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.