zoukankan      html  css  js  c++  java
  • 【解决】ElasticsearchException[failed to bind service]; nested: AccessDeniedException[/usr/share/elasticsearch/data/nodes]

    【问题一】使用helm安装Elasticsearch时提示权限不够

    [root@k8s-master elasticsearch]# kubectl logs elasticsearch-master-0 -n efk
    OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
    {"type": "server", "timestamp": "2020-03-01T09:01:32,837Z", "level": "ERROR", "component": "o.e.b.ElasticsearchUncaughtExceptionHandler", "cluster.name": "elasticsearch", "node.name": "elasticsearch-master-0", "message": "uncaught exception in thread [main]",
    "stacktrace": ["org.elasticsearch.bootstrap.StartupException: ElasticsearchException[failed to bind service]; nested: AccessDeniedException[/usr/share/elasticsearch/data/nodes];",
    "at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:174) ~[elasticsearch-7.6.0.jar:7.6.0]",
    "at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161) ~[elasticsearch-7.6.0.jar:7.6.0]",
    "at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-7.6.0.jar:7.6.0]",
    "at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:125) ~[elasticsearch-cli-7.6.0.jar:7.6.0]",
    "at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-7.6.0.jar:7.6.0]",
    "at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126) ~[elasticsearch-7.6.0.jar:7.6.0]",
    "at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) ~[elasticsearch-7.6.0.jar:7.6.0]",
    "Caused by: org.elasticsearch.ElasticsearchException: failed to bind service",

    【分析】

      这是由于PV挂载目录权限不够导致,特别是HostPath类型,挂载在宿主机上的PV,很多时候会忘记赋予权限。

    【解决】

      找到PV对应服务器上的目录,更改权限即可(chmod -R 777 els)。

  • 相关阅读:
    shell编程-基础
    磁盘管理-下部
    磁盘管理-中部
    磁盘管理-上部
    用户的管理
    docker之阿里云centos 7.x 启动容器报错处理办法
    IDEA之整合SVN遇到的坑(一)
    springboot之通过idea打jar包并运行
    SpringBoot整合定时任务和异步任务处理
    Microsoft SQL Server 2012安装说明
  • 原文地址:https://www.cnblogs.com/leozhanggg/p/12390850.html
Copyright © 2011-2022 走看看