【发布时间】:2020-05-10 22:53:28
【问题描述】:
所以我尝试用这个命令启动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)
【问题讨论】:
-
查看弹性搜索日志。您是否更改了配置中的某些内容?
-
在你显示的输出中,重要的位是
Out of memory,所以你需要增加堆。这个答案可能会有所帮助:stackoverflow.com/questions/48031762/… -
@Val 所以我在 jvm.options 中将值从 1g 更改为 2g 并且问题仍然存在: # Xms 表示总堆空间的初始大小 # Xmx 表示总堆空间的最大大小 - Xms2g -Xmx2g
-
似乎无论 Xmx 和 Xms 的值是多少,服务都不会启动
-
@Val 我实际上是在具有 2178m 内存的 ubuntu 虚拟机上运行它,也许我应该增加它?
标签: elasticsearch