Elasticsearch将不会在Ubuntu 18.04.4 LTS中启动

时间:2020-05-10 08:24:31

标签: elasticsearch

所以我尝试使用以下命令启动elasticsearch:

systemctl start elasticsearch.service

我收到此错误:

Job for elasticsearch.service failed because a fatal signal was delivered to the control process.
See "systemctl status elasticsearch.service" and "journalctl -xe" for details.

这是“ journalctl -xe”输出:

mai 10 10:18:49 ouss kernel: oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/system.slice/elasticsearch.service,task=java,pid=24534,uid=122
mai 10 10:18:49 ouss kernel: Out of memory: Killed process 24534 (java) total-vm:1564676kB, anon-rss:550924kB, file-rss:0kB, shmem-rss:0kB
mai 10 10:18:49 ouss kernel: oom_reaper: reaped process 24534 (java), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
mai 10 10:18:40 ouss systemd[1]: elasticsearch.service: Main process exited, code=killed, status=9/KILL
mai 10 10:18:49 ouss /usr/lib/gdm3/gdm-x-session[1336]: (EE) client bug: timer event4 debounce: offset negative (-1094ms)
mai 10 10:18:49 ouss /usr/lib/gdm3/gdm-x-session[1336]: (EE) client bug: timer event4 debounce short: offset negative (-1249ms)
mai 10 10:18:49 ouss /usr/lib/gdm3/gdm-x-session[1336]: (II) event6  - VirtualBox mouse integration: SYN_DROPPED event - some input events have been lost.
mai 10 10:18:40 ouss systemd[1]: elasticsearch.service: Failed with result 'signal'.
mai 10 10:18:40 ouss systemd[1]: Failed to start Elasticsearch.
-- Subject: Unit elasticsearch.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Unit elasticsearch.service has failed.
-- 
-- The result is RESULT.

我的Java版本:

openjdk version "1.8.0_252"
OpenJDK Runtime Environment (build 1.8.0_252-8u252-b09-1~18.04-b09)
OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)

1 个答案:

答案 0 :(得分:2)

按照官方https://www.elastic.co/guide/en/elasticsearch/reference/current/targz.html安装说明使用tarball安装解决了该问题。

请确保您用来运行Elasticsearch进程的用户对正在写入Elasticsearch进程的文件系统具有写访问权。请参阅问题部分中的评论,以获取与此相关的更多信息和错误。

请使用https://askubuntu.com/questions/6723/change-folder-permissions-and-ownership获取有关如何在ubuntu中分配所有权的说明。