Change in elasticsearch.yml for network.host , the service will not restart

Hi All,
Good afternoon
I am installing elasticsearch (7.4.1) , with the default “/etc/elasticsearch/elasticsearch.yml” , when I restart the service it starts and “systemctl status elasticsearch” shows it as running.

Now when I edit “/etc/elasticsearch/elasticsearch.yml” and change “network.host: 192.168.3.191” and restarting the elasticsearch the service fails, when I comment “network.host” it works

diff elasticsearch.yml elasticsearch.yml-ORG
network.host: 192.168.3.191

192.168.3.191 is the IP address of the elasticsearch server, where I had installed elasticsearch

I am trying to bind the elasticsearch to the ipaddress of the elasticsearch server, why is this is failing
I have tried it in different setups, each setup the same steps followed and failes.
Guidance and advice requested to find the reason and solve it

Thanks
Joseph John

Elasticsearch version:
7.4.1
Browser version:
NA
Original install method (e.g. download page, yum, deb, from source, etc.) and version:
apt
Fresh install or upgraded from other version?
Fresh , I have tried it in different machines different installation,
Is there anything special in your setup? For example, are you using the Logstash or Kafka outputs? Are you using a load balancer in front of the APM Servers? Have you changed index pattern, generated custom templates, changed agent configuration etc.
No
Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):

Steps to reproduce:

  1. install elasticsearch on ubuntu 18.04, do service restart and check you will see it is working, now what you do
  2. comment out network.host and give the IP of the machine
  3. restart the service the service will fail

Have a look at the logs. Pretty sure you have a bootstrap check error. If so,
please read https://www.elastic.co/guide/en/elasticsearch/reference/current/bootstrap-checks.html

2 Likes

Thanks David for the URL,
I will check and try to solve it and will update
thanks

Hi All,
Got some idea from the url and the logs
Once you change the “network.host” the statrup procedure recognize it as a production system than development system and it do some pre-requistive check for the production environment such as
“discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] “

from the log
“[ERROR][o.e.b.Bootstrap          ] [apmserver] node validation exception
[1] bootstrap checks failed
[1]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured”

Now trying to see how I can override this check
Will update
thanks
Joseph John

Thanks a lot , David
It worked, I was able to over ride the production setting check
commented out

**

discovery.seed_hosts: ["host1", "host2"]

**

And it worked

Like to update, later on I had to rever back because my kibana was showing the message "Kibana server is not ready yet"
Reverted back to the default elayticsearh.yml (ie back to the development mode ) and now my clients cannot communicate to the elastisearch IPaddress:9200

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.