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?
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 .
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.
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).
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.
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.
Just change the http.port
in elasticsearch.yml
(commonly in /etc/elasticsearch/elasticsearch.yml
) and remove # from the front and restart your server.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With