gpt4 book ai didi

ubuntu - 如何从 Ubuntu 中删除 Elasticsearch?

转载 作者:行者123 更新时间:2023-11-29 02:54:55 28 4
gpt4 key购买 nike

我认为我已经从我的计算机中删除了 elasticsearch,但我仍然有一些疑问。

当我输入时:

$ service elasticsearch status

我得到:

elasticsearch.service Loaded: not-found (Reason: No such file or directory) Active: failed (Result: exit-code) since Wed 2017-08-09 01:08:18 PDT; 38min ago Main PID: 73249 (code=exited, status=1/FAILURE)

Aug 09 01:08:18 ubuntu elasticsearch[73249]: Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x0000000085330000, 2060255232, 0) fai Aug 09 01:08:18 ubuntu elasticsearch[73249]: # Aug 09 01:08:18 ubuntu elasticsearch[73249]: # There is insufficient memory for the Java Runtime Environment to continue. Aug 09 01:08:18 ubuntu elasticsearch[73249]: # Native memory allocation (mmap) failed to map 2060255232 bytes for committing reserved memory. Aug 09 01:08:18 ubuntu elasticsearch[73249]: # An error report file with more information is saved as: Aug 09 01:08:18 ubuntu elasticsearch[73249]:

/tmp/hs_err_pid73249.log Aug 09 01:08:18 ubuntu systemd[1]: elasticsearch.service: Main process exited, code=exited,

status=1/FAILURE Aug 09 01:08:18 ubuntu systemd[1]: elasticsearch.service: Unit entered failed state. Aug 09 01:08:18 ubuntu systemd[1]: elasticsearch.service: Failed with result 'exit-code'. Aug 09 01:12:38 ubuntu systemd[1]: Stopped Elasticsearch.

但是,当我输入时:

$ service helloworld status 

我得到的东西要短得多:

helloworld.service Loaded: not-found (Reason: No such file or

directory) Active: inactive (dead)

我已经使用以下命令删除了 Elasticsearch:

sudo apt-get --purge autoremove elasticsearch

而且看起来 elasticsearch 仍然存在。

最佳答案

在 ubuntu 20.04 上,我遇到了类似的问题:我想完全删除 elasticsearch 7.15.1 并安装以前的版本 7.10.1。

我跑了:

sudo apt-get remove --purge elasticsearch

消息是:

dpkg: warning: while removing elasticsearch, directory '/var/lib/elasticsearch' not empty so not removed
dpkg: warning: while removing elasticsearch, directory '/etc/elasticsearch' not empty so not removed

所以我删除了那些目录:

sudo rm -rf /etc/elasticsearch
sudo rm -rf /var/lib/elasticsearch

而且我能够毫无错误地降级:

sudo apt-get install elasticsearch=7.10.1
sudo systemctl start elasticsearch
curl http://localhost:9200/

关于ubuntu - 如何从 Ubuntu 中删除 Elasticsearch?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45585881/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com