The new Centos 7, RPM installation cannot run

I followed the guide,complete installation. but curl -XGET 'http://localhost:9200' didn't work.
So I check systemctl status elasticsearch.service -l and get:

Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Sat 2018-07-21 15:39:34 EDT; 1min 40s ago
     Docs: http://www.elastic.co
  Process: 10522 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet -Edefault.path.logs=${LOG_DIR} -Edefault.path.data=${DATA_DIR} -Edefault.path.conf=${CONF_DIR} (code=exited, status=1/FAILURE)
  Process: 10520 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec (code=exited, status=0/SUCCESS)
 Main PID: 10522 (code=exited, status=1/FAILURE)

Jul 21 15:39:34 host.localdomain systemd[1]: Starting Elasticsearch...
Jul 21 15:39:34 host.localdomain systemd[1]: Started Elasticsearch.
Jul 21 15:39:34 host.localdomain systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
Jul 21 15:39:34 host.localdomain systemd[1]: Unit elasticsearch.service entered failed state.
Jul 21 15:39:34 host.localdomain systemd[1]: elasticsearch.service failed.

I don't understand why...

The program version is jdk1.8.0_181 and Elasticsearch 5.6.10.

Check the logs. It will tell you why. Probably insufficient memory or host limitations on files. All easy fixed.

No log generation.

Elasticsearch doesn't seem to work with ROOT.
But when I asked people, they said that using RPM for installation under ROOT was work.So I install it with ROOT, is that the reason for the problem?

usejournalctl -u elasticsearch -b
Jul 22 02:46:14 host.localdomain systemd[1]: Starting Elasticsearch...
Jul 22 02:46:14 host.localdomain systemd[1]: Started Elasticsearch.
Jul 22 02:46:14 host.localdomain systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
Jul 22 02:46:14 host.localdomain systemd[1]: Unit elasticsearch.service entered failed state.
Jul 22 02:46:14 host.localdomain systemd[1]: elasticsearch.service failed.
Jul 22 02:46:47 host.localdomain systemd[1]: Starting Elasticsearch...
Jul 22 02:46:47 host.localdomain systemd[1]: Started Elasticsearch.
Jul 22 02:46:47 host.localdomain systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
Jul 22 02:46:47 host.localdomain systemd[1]: Unit elasticsearch.service entered failed state.
Jul 22 02:46:47 host.localdomain systemd[1]: elasticsearch.service failed.
Jul 22 02:47:52 host.localdomain systemd[1]: Starting Elasticsearch...
Jul 22 02:47:52 host.localdomain systemd[1]: Started Elasticsearch.
Jul 22 02:47:52 host.localdomain systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
Jul 22 02:47:52 host.localdomain systemd[1]: Unit elasticsearch.service entered failed state.
Jul 22 02:47:52 host.localdomain systemd[1]: elasticsearch.service failed.

This is the systemd log. How about /var/log/elasticsearch. Or similar for your os.

[root@host ~]# cd /var/log/elasticsearch
[root@host elasticsearch]# ls
[root@host elasticsearch]#

Not seeing any...

and what is "similar for your OS"?

If you installed from the official Elastic provided RPM, then /var/log/elasticsearch is the correct directory.

Let's start by looking at files and permissions. Can you provide the output of the command below?

ls -ld /var/ /var/log/ /var/log/elasticsearch/ /usr/share/elasticsearch/ /usr/share/elasticsearch/bin/

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