2017-07-17 91 views
1

我已經安裝了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想盡了各種辦法。

我遵循的步驟。

須藤室射頻的/ var/lib中/ elasticsearch 須藤室射頻的/ etc/elasticsearch 命令和apt-get安裝-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易於得到--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 '' 

回答

2

是systemd你的初始化服務安裝嗎?此外什麼是Linux發行版?你的發行版本是哪個版本?我目前認爲你可能沒有使用systemd,但elasticsearch包以某種方式假設它。我非常感謝如果你在elasticsearch repository上面發佈了一個包含上述所有信息的bug報告,這就需要對ES方面進行更多的研究(免責聲明:我是一名ES開發人員,並且希望能夠解決這個問題: - )。

另外:您可以嘗試通過運行dpkg -P elasticsearch完全刪除elasticsearch程序包。

而且除了可以嘗試添加set -x/var/lib/dpkg/info/elasticsearch.postinst和運行sh /var/lib/dpkg/info/elasticsearch.postinst configure 獲得更多的調試輸出

2

我有不少相同的問題。 它明顯與systemctl相關,而不是elasticsearch。 首先你必須確定你是否在使用它。

[[ `systemctl` =~ -\.mount ]] && echo yes || echo no 

就我而言,答案是「不」

所以,你必須啓用它。

+0

爲我安裝彈性的最佳教程是https://www.howtoforge.com/tutorial/how-to-install-elastic-stack-on-ubuntu-16-04/ –

相關問題