Elasticsearch 7.1 Installation issues

Hi I Installed install java-1.8.0-openjdk java-1.8.0-openjdk-devel and installed Elasticsearch 7.1 when I start elasticsearch with default configuration I mean elasticsearch.yml and jvm.options I can verify elasticsearch is working well using curl http://127.0.0.1:900 but when I change the configuration like below

[root@orc-app1 elasticsearch]# cat /etc/elasticsearch/elasticsearch.yml
cluster.name: ElasticDemO
node.name: ${HOSTNAME}
network.host: 192.168.60.4
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
xpack.security.enabled: false
#xpack.security.transport.ssl.enabled: true
#xpack.license.self_generated.type: basic
bootstrap.system_call_filter: false
[root@orc-app1 elasticsearch]#

I got the following error please help me to fix this issue.

[root@orc-app1 elasticsearch]# systemctl status elasticsearch
● elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2019-05-31 11:34:37 UTC; 5s ago
Docs: http://www.elastic.co
Main PID: 9651 (java)
CGroup: /system.slice/elasticsearch.service
├─9651 /usr/share/elasticsearch/jdk/bin/java -Xms1g -Xmx1g -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Des.networkaddress.cache.ttl=60 -...
└─9715 /usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/bin/controller

May 31 11:34:37 orc-app1.dev systemd[1]: Started Elasticsearch.
May 31 11:34:37 orc-app1.dev elasticsearch[9651]: OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
[root@orc-app1 elasticsearch]#

[root@orc-app1 elasticsearch]# curl http://192.168.60.4:9200
curl: (7) Failed connect to 192.168.60.4:9200; Connection refused
[root@orc-app1 elasticsearch]

Have you some error in logs ?

/var/log/elasticsearch/ElasticDemO.log

Could you execute this : netstat -tnpl |grep 9200 ?

Sincerely

Hi Jmilot,

I will check that and get back to you soon as possible

Here is the /var/log/elasticsearch/ElasticDemO.log output

[root@orc-app1 elasticsearch]# tail -f ElasticDemO.log
[2019-06-03T10:25:51,270][INFO ][o.e.t.TransportService ] [orc-app1.dev] publish_address {192.168.60.4:9300}, bound_addresses {192.168.60.4:9300}
[2019-06-03T10:25:51,279][INFO ][o.e.b.BootstrapChecks ] [orc-app1.dev] bound or publishing to a non-loopback address, enforcing bootstrap checks
[2019-06-03T10:25:51,281][ERROR][o.e.b.Bootstrap ] [orc-app1.dev] 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
[2019-06-03T10:25:51,289][INFO ][o.e.n.Node ] [orc-app1.dev] stopping ...
[2019-06-03T10:25:51,326][INFO ][o.e.n.Node ] [orc-app1.dev] stopped
[2019-06-03T10:25:51,326][INFO ][o.e.n.Node ] [orc-app1.dev] closing ...
[2019-06-03T10:25:51,339][INFO ][o.e.n.Node ] [orc-app1.dev] closed
[2019-06-03T10:25:51,341][INFO ][o.e.x.m.p.NativeController] [orc-app1.dev] Native controller process has stopped - no new native processes can be started

[root@orc-app1 ~]# netstat -tnpl |grep 9200
[root@orc-app1 ~]#

its the /etc/hosts file that you might have to check

ajayraghuraj

What I need to check on /etc/host file ?

[root@orc-app1 bin]# systemctl status elasticsearch
● elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2019-06-03 12:08:28 UTC; 12min ago
Docs: http://www.elastic.co
Main PID: 9368 (java)
CGroup: /system.slice/elasticsearch.service
├─9368 /usr/share/elasticsearch/jdk/bin/java -Xms1g -Xmx1g -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Des.networkaddress.cache.ttl=60 -...
└─9432 /usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/bin/controller

Jun 03 12:08:28 orc-app1.dev systemd[1]: Started Elasticsearch.
Jun 03 12:08:28 orc-app1.dev elasticsearch[9368]: OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
[root@orc-app1 bin]# sudo netstat -tulpn | grep 9200
tcp6 0 0 192.168.60.4:9200 :::* LISTEN 9368/java
[root@orc-app1 bin]# sudo netstat -tulpn | grep 9300
tcp6 0 0 192.168.60.4:9300 :::* LISTEN 9368/java
[root@orc-app1 bin]#

[root@orc-app1 bin]# cat /etc/elasticsearch/elasticsearch.yml
cluster.name: ElasticDemO
node.name: ${HOSTNAME}
network.host: 192.168.60.4
xpack.security.enabled: false
#xpack.security.transport.ssl.enabled: true
#xpack.license.self_generated.type: basic
bootstrap.system_call_filter: true
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
discovery.seed_hosts: 192.168.60.4:9300

seems like issue is fixed after adding discovery.seed_hosts: 192.168.60.4:9300 and bootstrap.system_call_filter: true

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