Elasticsearch on RHEL 7.4 installation

Hi

I am installing Elasticsearch in RHEL by downloading the RPM.

Any suggestions on below issue.

in /etc/elasticsearch/elasticsearch.yml i have made below chagne.

network.host: 0.0.0.0

[root@bdm ~]# ll
total 95576
-rwxrwxrwx 1 root root 97863177 Sep 7 09:40 elasticsearch-6.4.0.rpm
-rw-------. 1 root root 1263 Jan 5 2018 original-ks.cfg
[root@bdm ~]# pwd
/root
[root@bdm ~]# java -version
java version "1.8.0_112"
Java(TM) SE Runtime Environment (build 1.8.0_112-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.112-b15, mixed mode)
[root@bdm ~]# which java
/usr/jdk64/jdk1.8.0_112/bin/java
[root@bdm ~]# rpm -ivh elasticsearch-6.4.0.rpm
Preparing... ################################# [100%]
Creating elasticsearch group... OK
Creating elasticsearch user... OK
Updating / installing...
1:elasticsearch-0:6.4.0-1 ################################# [100%]

NOT starting on installation, please execute the following statements to configure elasticsearch service to start automatically using systemd

sudo systemctl daemon-reload
sudo systemctl enable elasticsearch.service

You can start elasticsearch service by executing

sudo systemctl start elasticsearch.service
Created elasticsearch keystore in /etc/elasticsearch
[root@bdm ~]# systemctl start elasticsearch.service
[root@bdm ~]# systemctl startus elasticsearch.service
Unknown operation 'startus'.
[root@bdm ~]# systemctl status elasticsearch.service
● elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2018-09-07 11:09:36 IST; 7s ago
Docs: http://www.elastic.co
Process: 81330 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, status=1/FAILURE)
Main PID: 81330 (code=exited, status=1/FAILURE)

Sep 07 11:09:35 bdm.localdomain elasticsearch[81330]: at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:127)
Sep 07 11:09:35 bdm.localdomain elasticsearch[81330]: at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
Sep 07 11:09:35 bdm.localdomain elasticsearch[81330]: at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)
Sep 07 11:09:36 bdm.localdomain elasticsearch[81330]: at org.elasticsearch.cli.Command.main(Command.java:90)
Sep 07 11:09:36 bdm.localdomain elasticsearch[81330]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93)
Sep 07 11:09:36 bdm.localdomain elasticsearch[81330]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:86)
Sep 07 11:09:36 bdm.localdomain elasticsearch[81330]: Refer to the log for complete error details.
Sep 07 11:09:36 bdm.localdomain systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
Sep 07 11:09:36 bdm.localdomain systemd[1]: Unit elasticsearch.service entered failed state.
Sep 07 11:09:36 bdm.localdomain systemd[1]: elasticsearch.service failed.
[root@bdm ~]#

Do you have java installed?
Also check /var/log/elasticsearch/, there should be something.

Hi Mark

I can't see any other file other than gc.log in /var/log/elasticsearch folder.

I cant see the elasticsearch.log generated in this server. Is there any other place where i need to check the log.

Any suggestions.

Thx
Muthu

[root@bdm elasticsearch]# pwd
/var/log/elasticsearch
[root@bdm elasticsearch]# ll
total 8
-rw-r--r-- 1 elasticsearch elasticsearch 4366 Sep 7 11:16 gc.log
[root@bdm elasticsearch]# java -version
java version "1.8.0_112"
Java(TM) SE Runtime Environment (build 1.8.0_112-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.112-b15, mixed mode)

Try looking through the following log and grepping for elasticsearch:

cat /var/log/audit/audit.log | grep elasticsearch

You might be able to find some more context as to why the service failed in this log.

This could possibly be related to SELinux and setting the host to 0.0.0.0, but I'm not 100% certain of that.

Hi Popa

I managed to solve this by downloading and installing zip file version of elastic search..

So Now , i am able to bring my elastic search by running the elastic search in Backfround.

Thanks..
Muthu

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