【问题标题】:elasticsearch.service: Failed to reset devices.list: Operation not permittedelasticsearch.service:重置设备失败。列表:不允许操作
【发布时间】:2020-01-29 19:34:41
【问题描述】:

按照here 的说明,我在 vps 上安装了 elasticsearch。但现在它没有运行,当我运行systemctl status elasticsearch 时,活动状态为红色失败。

这些是错误消息:

elasticsearch.service:重置设备失败。列表:不允许操作。

启动 Elasticsearch。

无法将 20579 附加到兼容 systemd cgroup /system.slice/elasticsearch.service:没有这样的文件或目录。

OpenJDK 64 位服务器 VM 警告:选项 UseConcMarkSweepGC 在 9.0 版中已弃用,并且可能会在未来版本中删除。

elasticsearch.service:主进程退出,code=exited,status=78/n/a。

elasticsearch.service:失败,结果为“退出代码”。

在此之前,状态为绿色,但对端口 9200 的所有请求都会出错,连接被拒绝。直到我意识到 vps 只有 1 GB 的内存,但 jvm.options 文件中的 Xms 和 Xmx 设置为 1 GB。所以我把它们降低到 512m(我将 -Xms1g-Xmx1g 编辑为 -Xms512m-Xmx512m,这是正确的语法,对吧?)。

这些是 elasticsearch.yml 中唯一未注释的行:

path.data: /var/lib/elasticsearch

path.logs: /var/log/elasticsearch

network.host: 0.0.0.0

cluster.name: "raha"

我只添加了network.host和cluster.name。

我们公司曾经有人习惯于在我们的服务器中使用用户权限。我认为这可能是一个问题。但我没有办法找出来。如果我要求托管公司将 vps 恢复到默认配置有帮助吗?还有其他建议吗?

谢谢

【问题讨论】:

    标签: ubuntu elasticsearch ubuntu-18.04


    【解决方案1】:

    /etc/elasticsearch/elasticsearch.yml中,修改discovery下的设置如下:

    # ——————————— Discovery ———————————
    #
    # Pass an initial list of hosts to perform discovery when this node is started:
    # The default list of hosts is [“127.0.0.1”, “[::1]”]
    discovery.seed_hosts: [“host_name_you_choose”]
    #
    # Bootstrap the cluster using an initial set of master-eligible nodes:
    cluster.initial_master_nodes: [“name_of_your_node”]
    

    第一次使用时需要引导 ElasticSearch 实现,如下所示:https://www.elastic.co/guide/en/elasticsearch/reference/7.x/modules-discovery-bootstrap-cluster.html

    【讨论】:

      猜你喜欢
      • 2012-08-12
      • 2012-06-19
      • 1970-01-01
      • 2012-08-18
      • 1970-01-01
      • 2019-01-25
      • 2023-01-27
      • 1970-01-01
      • 2020-09-14
      相关资源
      最近更新 更多