Hi, I have installed elasticsearch on a computer running CentOS. When I try to start it I get the following output:
[root@localhost ~]# sudo systemctl start elasticsearch
Job for elasticsearch.service failed because the control process exited with error code. See "systemctl status elasticsearch.service" and "journalctl -xe" for details.
[root@localhost ~]#
[root@localhost ~]# sudo systemctl status elasticsearch
● elasticsearch.service - Elasticsearch
_ Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)_
_ Active: failed (Result: exit-code) since Thu 2018-08-16 09:04:00 CEST; 3s ago_
_ Docs: http://www.elastic.co_
_ Process: 7437 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec (code=exited, status=203/EXEC)_
_ Main PID: 6579 (code=exited, status=1/FAILURE)_
Aug 16 09:04:00 localhost.localdomain systemd[1]: Starting Elasticsearch...
Aug 16 09:04:00 localhost.localdomain systemd[7437]: Failed at step EXEC spawning /usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec: No such file or directory
Aug 16 09:04:00 localhost.localdomain systemd[1]: elasticsearch.service: control process exited, code=exited status=203
Aug 16 09:04:00 localhost.localdomain systemd[1]: Failed to start Elasticsearch.
Aug 16 09:04:00 localhost.localdomain systemd[1]: Unit elasticsearch.service entered failed state.
Aug 16 09:04:00 localhost.localdomain systemd[1]: elasticsearch.service failed.
If I run "journalctl -xe" I get the following result:
Aug 16 09:09:24 localhost.localdomain sudo[7719]: root : TTY=pts/1 ; PWD=/root ; USER=root ; COMMAND=/bin/systemctl start elasticsearch
Aug 16 09:09:24 localhost.localdomain polkitd[784]: Registered Authentication Agent for unix-process:7720:17038275 (system bus name :1.840 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)
Aug 16 09:09:24 localhost.localdomain systemd[1]: Starting Elasticsearch...
-- Subject: Unit elasticsearch.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit elasticsearch.service has begun starting up.
Aug 16 09:09:24 localhost.localdomain systemd[7726]: Failed at step EXEC spawning /usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec: No such file or directory
-- Subject: Process /usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec could not be executed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- The process /usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec could not be executed and failed.
--
-- The error number returned by this process is 2.
Aug 16 09:09:24 localhost.localdomain systemd[1]: elasticsearch.service: control process exited, code=exited status=203
Aug 16 09:09:24 localhost.localdomain systemd[1]: Failed to start Elasticsearch.
-- Subject: Unit elasticsearch.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit elasticsearch.service has failed.
--
-- The result is failed.
Aug 16 09:09:24 localhost.localdomain systemd[1]: Unit elasticsearch.service entered failed state.
Aug 16 09:09:24 localhost.localdomain systemd[1]: elasticsearch.service failed.
Aug 16 09:09:24 localhost.localdomain polkitd[784]: Unregistered Authentication Agent for unix-process:7720:17038275 (system bus name :1.840, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
What am I missing?