Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configure port number of ElasticSearch

We are using ElasticSearch 0.20.2 and run the daemon using

bin/elasticsearch [-f]

The bin/elasticsearch script sets ES_HOME on its own and there seem to be no way to influence the path of the configuration file read. ES always reads the settings from

$ES_HOME/config/elasticsearch.yml

However I must be able for specifying the path to our own configuration file without overriding the existing elasticsearch.yml that comes with ElasticSearch.

How do I do that?

like image 763
Andreas Jung Avatar asked Jan 17 '13 12:01

Andreas Jung


People also ask

How do I check my Elasticsearch port?

Once you have Elasticsearch installed and running on your local machine, you can test to see that it's up and running with a tool like curl. By default, Elasticsearch will be running on port 9200. Typically the machine will have a name like localhost .

How do I change the default port in Kibana?

The default host and port settings configure Kibana to run on localhost:5601 . To change this behavior and allow remote users to connect, you'll need to update your kibana. yml file. You can also enable SSL and set a variety of other options.

What port does elk use?

This command publishes the following ports, which are needed for proper operation of the ELK stack: 5601 (Kibana web interface). 9200 (Elasticsearch JSON interface). 5044 (Logstash Beats interface, receives logs from Beats such as Filebeat – see the Forwarding logs with Filebeat section).


4 Answers

You have to insert following line in your elasticsearch.yml file.

http.port: port_number 

I did same in my setup, its working for me.

like image 197
chetan varma Avatar answered Oct 03 '22 23:10

chetan varma


For multi-version testing, you should specify two different ports:

bin/elasticsearch -E http.port=9400 -E transport.tcp.port=9500 

This way, if you have another version of elasticsearch on the same machine, they won't talk to each other. If you do want them to communicate, leave the transport port as default, or make it the same on both instances.

like image 30
Yuri Astrakhan Avatar answered Oct 03 '22 23:10

Yuri Astrakhan


Just change the http.port in elasticsearch.yml (commonly in /etc/elasticsearch/elasticsearch.yml) and remove # from the front and restart your server.

like image 45
Munish Chouhan Avatar answered Oct 04 '22 00:10

Munish Chouhan


You need to modify path.conf. It would look like:

bin/elasticsearch -f -Des.path.conf=/path/to/config/dir

That will then read /path/to/config/dir/elasticsearch.yml and /path/to/config/dir/elasticsearch.json (if present).

Also keep in mind that you can just specify any option you'd like via -Des. in the same way I did with path.conf above.

like image 20
drewr Avatar answered Oct 04 '22 00:10

drewr