bilpor
bilpor

Reputation: 3889

Configuring elastic search not to be localhost

After installing Elasticsearch 5.6.3 and setting Nodename to the server name. I tried to browse to Elasticsearch using IP:9200 but it didn't work. If I browse to localhost:9200 it works. Where do I go to change th default behaviour of Localhost. Since I want to open this up to other external servers so the loop back address of localhost isn't any good.

After installing Kibana 5.6.3, the same is obviously true here as well. Starting the kibana server with the ip fails, but with localhost doesn't.

At this point I have no indexes, I just want to prove Elasticsearch can be reached beyond localhost.

Thanks Bill

Upvotes: 1

Views: 1608

Answers (2)

huha
huha

Reputation: 4245

For a quick start development configuration the following settings can be placed into 'elasticsearch.yml':

network.host e.g.

network.host: 192.168.178.49

cluster.initial_master_nodes e.g.

cluster.initial_master_nodes: ["node_1"]

You can also define a cluster name:

cluster.name: my-application

Start it with the node name (example for Windows)

C:\InstallFolder\elasticsearch-7.10.0>C:\InstallFolder\elasticsearch-7.10.0\bin\elasticsearch.bat -Enode.name=node_1

Go to your browser and open http://192.168.178.49:9200 (replace with your IP). It shows a JSON result. The localhost:9200 will no longer work.

This config should not be used for production environments. See the official docs.

In general when starting from a command prompt it shows any errors when something fails. These are very helpful.

Upvotes: 0

Luigi G.
Luigi G.

Reputation: 38

You can configure your IP with the "network.host" setting in 'elasticsearch.yml' and 'kibana.yml' in your config directory.

Here is some link to the Elasticsearch doc to config yours :)

Configuring Elasticsearch

Important Settings

Upvotes: 1

Related Questions