Elasticsearch 在对系统进行任何操作时出错?
Elasticsearch Errors while doing any operation with system?
我已经安装了 Elasticsearch,现在由于我工作场所的其他人所做的一些更改,在更新、安装新包等任何操作期间不断弹出一些错误,而且 elasticsearch 无法正常工作。
附上安装新包的错误日志。
$ sudo apt-get install bash-completion
Reading package lists... Done
Building dependency tree
Reading state information... Done
bash-completion is already the newest version (1:2.1-4.2ubuntu1.1).
0 upgraded, 0 newly installed, 0 to remove and 15 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up elasticsearch (5.5.0) ...
Failed to restart systemd-sysctl.service: No such method 'RestartUnit'
See system logs and 'systemctl status systemd-sysctl.service' for details.
dpkg: error processing package elasticsearch (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
elasticsearch
E: Sub-process /usr/bin/dpkg returned an error code (1)
我什至从网上尝试了不同的解决方案,比如尝试从系统中完全删除 elasticsearch。
我遵循的步骤。
sudo rm -rf /var/lib/elasticsearch
须藤 rm -rf /etc/elasticsearch
sudo apt-get install -f
$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 15 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up elasticsearch (5.5.0) ...
Failed to restart systemd-sysctl.service: No such method 'RestartUnit'
See system logs and 'systemctl status systemd-sysctl.service' for details.
dpkg: error processing package elasticsearch (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
elasticsearch
E: Sub-process /usr/bin/dpkg returned an error code (1)
sudo apt-get --purge autoremove elasticsearch
$ sudo apt-get --purge autoremove elasticsearch
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
elasticsearch*
0 upgraded, 0 newly installed, 1 to remove and 15 not upgraded.
1 not fully installed or removed.
After this operation, 37.3 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 329402 files and directories currently installed.)
Removing elasticsearch (5.5.0) ...
Stopping elasticsearch service...Failed to stop elasticsearch.service: Unknown unit: elasticsearch.service
See system logs and 'systemctl status elasticsearch.service' for details.
Failed to get load state of elasticsearch.service: No such property 'LoadState'
dpkg: error processing package elasticsearch (--purge):
subprocess installed pre-removal script returned error exit status 1
Failed to restart systemd-sysctl.service: No such method 'RestartUnit'
See system logs and 'systemctl status systemd-sysctl.service' for details.
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
elasticsearch
E: Sub-process /usr/bin/dpkg returned an error code (1)
我重新启动了系统,但错误不断出现。
有人对如何解决这个问题有建议吗?
而且这个命令什么也没给出
$ systemctl status systemd-sysctl.service
Failed to get properties: No such interface ''
本次安装中的 systemd 是您的初始化服务吗?另外,这是什么 linux 分布?您的发行版是哪个版本?我目前认为您可能没有使用 systemd,但 elasticsearch 包以某种方式假设了这一点。
如果您在 elasticsearch repository 中打开包含上述所有信息的错误报告,我将不胜感激,这保证了对 ES 方面的更多研究(免责声明:我是一名 ES 开发人员并且热衷于解决这个问题 :-).
此外:您可以尝试通过 运行ning dpkg -P elasticsearch
.
完全删除 elasticsearch
包
此外,您可以尝试将 set -x
添加到 /var/lib/dpkg/info/elasticsearch.postinst
和 运行 sh /var/lib/dpkg/info/elasticsearch.postinst configure
获得更多调试输出
我遇到了完全相同的问题。
它显然与 systemctl 有关,而不是 elasticsearch。
首先你要确定你是否在使用它。
[[ `systemctl` =~ -\.mount ]] && echo yes || echo no
就我而言,答案是 "no"
所以你必须启用它。
我已经安装了 Elasticsearch,现在由于我工作场所的其他人所做的一些更改,在更新、安装新包等任何操作期间不断弹出一些错误,而且 elasticsearch 无法正常工作。
附上安装新包的错误日志。
$ sudo apt-get install bash-completion
Reading package lists... Done
Building dependency tree
Reading state information... Done
bash-completion is already the newest version (1:2.1-4.2ubuntu1.1).
0 upgraded, 0 newly installed, 0 to remove and 15 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up elasticsearch (5.5.0) ...
Failed to restart systemd-sysctl.service: No such method 'RestartUnit'
See system logs and 'systemctl status systemd-sysctl.service' for details.
dpkg: error processing package elasticsearch (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
elasticsearch
E: Sub-process /usr/bin/dpkg returned an error code (1)
我什至从网上尝试了不同的解决方案,比如尝试从系统中完全删除 elasticsearch。
我遵循的步骤。
sudo rm -rf /var/lib/elasticsearch 须藤 rm -rf /etc/elasticsearch sudo apt-get install -f
$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 15 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up elasticsearch (5.5.0) ...
Failed to restart systemd-sysctl.service: No such method 'RestartUnit'
See system logs and 'systemctl status systemd-sysctl.service' for details.
dpkg: error processing package elasticsearch (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
elasticsearch
E: Sub-process /usr/bin/dpkg returned an error code (1)
sudo apt-get --purge autoremove elasticsearch
$ sudo apt-get --purge autoremove elasticsearch
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
elasticsearch*
0 upgraded, 0 newly installed, 1 to remove and 15 not upgraded.
1 not fully installed or removed.
After this operation, 37.3 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 329402 files and directories currently installed.)
Removing elasticsearch (5.5.0) ...
Stopping elasticsearch service...Failed to stop elasticsearch.service: Unknown unit: elasticsearch.service
See system logs and 'systemctl status elasticsearch.service' for details.
Failed to get load state of elasticsearch.service: No such property 'LoadState'
dpkg: error processing package elasticsearch (--purge):
subprocess installed pre-removal script returned error exit status 1
Failed to restart systemd-sysctl.service: No such method 'RestartUnit'
See system logs and 'systemctl status systemd-sysctl.service' for details.
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
elasticsearch
E: Sub-process /usr/bin/dpkg returned an error code (1)
我重新启动了系统,但错误不断出现。
有人对如何解决这个问题有建议吗?
而且这个命令什么也没给出
$ systemctl status systemd-sysctl.service
Failed to get properties: No such interface ''
本次安装中的 systemd 是您的初始化服务吗?另外,这是什么 linux 分布?您的发行版是哪个版本?我目前认为您可能没有使用 systemd,但 elasticsearch 包以某种方式假设了这一点。
如果您在 elasticsearch repository 中打开包含上述所有信息的错误报告,我将不胜感激,这保证了对 ES 方面的更多研究(免责声明:我是一名 ES 开发人员并且热衷于解决这个问题 :-).
此外:您可以尝试通过 运行ning dpkg -P elasticsearch
.
elasticsearch
包
此外,您可以尝试将 set -x
添加到 /var/lib/dpkg/info/elasticsearch.postinst
和 运行 sh /var/lib/dpkg/info/elasticsearch.postinst configure
获得更多调试输出
我遇到了完全相同的问题。 它显然与 systemctl 有关,而不是 elasticsearch。 首先你要确定你是否在使用它。
[[ `systemctl` =~ -\.mount ]] && echo yes || echo no
就我而言,答案是 "no"
所以你必须启用它。