弹性搜索未找到数据目录

时间:2015-12-09 01:25:50

标签: elasticsearch

在ES 2.1上建立新的群集,我在设置path.data目录时遇到了问题。

这是我的配置设置

# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
path.data: /home/elasticUser/elasticFiles

以下是读写内容:

[elasticUser@WLIELASTICP01 ~]$ ls -hn
total 0
drwxrwxrwx. 2 1002 1002 6 Dec  9 13:21 elasticFiles
drwxrwxrwx. 2 1002 1002 6 Dec  9 13:49 elasticLogs

我也将弹性用户的目录称为。

当我启动ES:

sudo systemctl start elasticsearch

什么都没发生,日志状态:

java.lang.IllegalStateException: Unable to access 'path.data' (/home/elasticUser/elasticFiles)
        at org.elasticsearch.bootstrap.Security.addPath(Security.java:229)
        at org.elasticsearch.bootstrap.Security.addFilePermissions(Security.java:203)
        at org.elasticsearch.bootstrap.Security.createPermissions(Security.java:184)
        at org.elasticsearch.bootstrap.Security.configure(Security.java:105)
        at org.elasticsearch.bootstrap.Bootstrap.setupSecurity(Bootstrap.java:196)
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:167)
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:285)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)
Caused by: java.nio.file.AccessDeniedException: /home/elasticUser/elasticFiles
        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.createDirectory(UnixFileSystemProvider.java:384)
        at java.nio.file.Files.createDirectory(Files.java:674)
        at java.nio.file.Files.createAndCheckIsDirectory(Files.java:781)
        at java.nio.file.Files.createDirectories(Files.java:767)
        at org.elasticsearch.bootstrap.Security.ensureDirectoryExists(Security.java:250)
        at org.elasticsearch.bootstrap.Security.addPath(Security.java:227)
        ... 7 more

我遇到了与data.logs相同的问题,只是将它们更改为默认值..任何想法?

1 个答案:

答案 0 :(得分:0)

想出来......

因为我的" OPS"团队将数据驱动器安装在/ home /我需要授予访问/ home / elasticUser /。

的权限