• 【解决】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)。

  • 相关阅读:
    四个数判断大小
    生成随机数的效率问题
    vmware下ubuntu的网络配置
    安装Orcacle后使用DBCA(Database Configuration Assistant)卡住的问题
    Spring Tool Suit安装virgo server插件、virgo的下载
    centos的终端字体杂乱的问题
    vmware下minimum安装centos后配置网络
    hibernate session.save()和session.persist()的区别
    bootstrap结合google code prettify的问题
    jsp乱码问题
  • 原文地址:https://www.cnblogs.com/leozhanggg/p/12390850.html
Copyright © 2020-2023  润新知