elasticsearch - Elasticsearch 不会在 ubuntu 18.04.4 LTS 中启动
问题描述
所以我尝试用这个命令启动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)
解决方案
按照官方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 中分配所有权的说明。
推荐阅读
- pandas - pd.isnull().sum() 的 Vaex 命令是什么?
- javascript - 引导日期选择器始终在顶部打开
- c# - (反)序列化具有特定结构的潜在嵌套对象的 BSON 数据
- symfony - Symfony 功能测试:第二次调用 $client->request(),无缘无故地改变了测试结果
- vba - 根据将定义日期范围的 2 个输入框,将一个选项卡中的表中的所有数据复制到同一工作簿中的另一个选项卡中
- node.js - Firebase 函数 shuffle firestore 数组 onUpdate
- python - 子类 QLineEdit 并在下面添加标签
- reporting-services - 特别是在 SSRS tablix 中的非换行连字符
- javascript - 有没有办法检查安装在用户机器上的应用程序的版本?
- reactjs - 如何从 YouTube 网址中获取 YouTube 缩略图?