更新后的数据路径{E 44}会导致Elasticsearch崩溃

时间:2015-11-19 12:43:57

标签: elasticsearch

Elasticsearch设置适用于默认配置。   但是当从elasticsearch.yml文件更新其path.data设置时,它会崩溃并出现以下错误

[2015-11-19 12:39:56,194][ERROR][bootstrap                ] Exception
java.lang.IllegalStateException: Unable to access 'path.data' (/home/hadoop/bigdata/data/elasticsearch)
        at org.elasticsearch.bootstrap.Security.addPath(Security.java:197)
        at org.elasticsearch.bootstrap.Security.createPermissions(Security.java:170)
        at org.elasticsearch.bootstrap.Security.configure(Security.java:100)
        at org.elasticsearch.bootstrap.Bootstrap.setupSecurity(Bootstrap.java:181)
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:159)
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:270)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)
Caused by: java.nio.file.AccessDeniedException: /home/hadoop/bigdata/data
        at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
        at sun.nio.fs.UnixFileSystemProvider.checkAccess(UnixFileSystemProvider.java:308)
        at java.nio.file.Files.createDirectories(Files.java:702)
        at org.elasticsearch.bootstrap.Security.ensureDirectoryExists(Security.java:218)
        at org.elasticsearch.bootstrap.Security.addPath(Security.java:195)
        ... 6 more

我已经使用保留模式从/ var / lib位置复制了elasticsearch目录。但没有成功。 任何人都可以帮我解决这个错误

谢谢, Sanjay Bhosale

1 个答案:

答案 0 :(得分:2)

由于没有为用户“elasticsearch”设置权限来访问该文件夹,因此出现此错误。

尝试使用以下命令将“elasticsearch”用户(elasticsearch的默认用户)设为文件夹的所有者 -

sudo chown elasticsearch: /home/hadoop/bigdata/data/elasticsearch