Elasticsearch 服务在 Ubuntu 20.04 上启动失败

Elasticsearch 服务在 Ubuntu 20.04 上启动失败

我无法在我的Ubuntu 20.04(Focal Fossa)安装:

 #systemctl status elasticsearch.service
● elasticsearch.service - Elasticsearch
     Loaded: loaded (/lib/systemd/system/elasticsearch.service; disabled; vendor preset: enabled)
    Drop-In: /etc/systemd/system/elasticsearch.service.d
             └─override.conf
     Active: failed (Result: exit-code) since Sun 2021-10-17 21:30:19 UTC; 27min ago
       Docs: https://www.elastic.co
    Process: 2133147 ExecStart=/usr/share/elasticsearch/bin/systemd-entrypoint -p ${PID_DIR}/elasticsearch.pid --quiet>
   Main PID: 2133147 (code=exited, status=1/FAILURE)

Oct 17 21:30:18 stavilelk01 systemd-entrypoint[2133147]:         at org.elasticsearch.bootstrap.Elasticsearch.execute(>
Oct 17 21:30:18 stavilelk01 systemd-entrypoint[2133147]:         at org.elasticsearch.cli.EnvironmentAwareCommand.exec>
Oct 17 21:30:18 stavilelk01 systemd-entrypoint[2133147]:         at org.elasticsearch.cli.Command.mainWithoutErrorHand>
Oct 17 21:30:18 stavilelk01 systemd-entrypoint[2133147]:         at org.elasticsearch.cli.Command.main(Command.java:79)
Oct 17 21:30:18 stavilelk01 systemd-entrypoint[2133147]:         at org.elasticsearch.bootstrap.Elasticsearch.main(Ela>
Oct 17 21:30:18 stavilelk01 systemd-entrypoint[2133147]:         at org.elasticsearch.bootstrap.Elasticsearch.main(Ela>
Oct 17 21:30:18 stavilelk01 systemd-entrypoint[2133147]: For complete error details, refer to the log at /home/admin_e>
Oct 17 21:30:19 stavilelk01 systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Oct 17 21:30:19 stavilelk01 systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
Oct 17 21:30:19 stavilelk01 systemd[1]: Failed to start Elasticsearch.

以下是日志:

/var/log/elasticsearch# journalctl -xe
-- Automatic restarting of the unit logstash.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
Oct 17 21:58:36 stavilelk01 systemd[1]: Stopped logstash.
-- Subject: A stop job for unit logstash.service has finished
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A stop job for unit logstash.service has finished.
--
-- The job identifier is 5920063 and the job result is done.
Oct 17 21:58:36 stavilelk01 systemd[1]: Started logstash.
-- Subject: A start job for unit logstash.service has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit logstash.service has finished successfully.
--
-- The job identifier is 5920063.
Oct 17 21:58:36 stavilelk01 logstash[2143095]: Using bundled JDK: /usr/share/logstash/jdk
Oct 17 21:58:36 stavilelk01 logstash[2143095]: OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was depreca>
Oct 17 21:58:36 stavilelk01 multipathd[828]: sda: add missing path
Oct 17 21:58:36 stavilelk01 multipathd[828]: sda: failed to get udev uid: Invalid argument
Oct 17 21:58:36 stavilelk01 multipathd[828]: sda: failed to get sysfs uid: Invalid argument
Oct 17 21:58:36 stavilelk01 multipathd[828]: sda: failed to get sgio uid: No such file or directory
Oct 17 21:58:36 stavilelk01 multipathd[828]: sdb: add missing path
Oct 17 21:58:36 stavilelk01 multipathd[828]: sdb: failed to get udev uid: Invalid argument
Oct 17 21:58:36 stavilelk01 multipathd[828]: sdb: failed to get sysfs uid: Invalid argument
Oct 17 21:58:36 stavilelk01 multipathd[828]: sdb: failed to get sgio uid: No such file or directory

我该如何解决这个问题?

答案1

VMWare 不提供udev生成/dev/disk/by-id条目所需的信息。许多 VMware 产品都有此习惯。解决方案是编辑.vmx虚拟机的文件,添加以下内容:

disk.EnableUUID = "TRUE"

重启后,磁盘将正常可见,并且multipathd不会再出现问题。这可能会解决您的弹性搜索问题。

相关内容