2015-12-14 34 views
1

我必須使用脫機指令加載ElasticSearch插件,但它看起來像我即使打開了完全以root身份運行文件的權限時也會收到權限錯誤!我已經刪除並重新安裝,但是這個錯誤是一致的。ElasticSearch加載插件失敗(許可證模塊)

[[email protected] bin]# ./plugin install file:///home/jmblnvr/shield/license-2.1.0.zip 
-> Installing from file:/home/jmblnvr/shield/license-2.1.0.zip... 
Trying file:/home/jmblnvr/shield/license-2.1.0.zip ... 
Downloading .DONE 
Verifying file:/home/jmblnvr/shield/license-2.1.0.zip checksums if available ... 
NOTE: Unable to verify checksum for downloaded plugin (unable to find .sha1 or .md5 file to verify) 
Installed license into /usr/share/elasticsearch/plugins/license 
[[email protected] bin]# service elasticsearch restart 
Stopping elasticsearch:         [FAILED] 
Starting elasticsearch: Exception in thread "main" java.lang.IllegalStateException: Unable to initialize plugins 
Likely root cause: java.nio.file.AccessDeniedException: /usr/share/elasticsearch/plugins/license/plugin-descriptor.properties 
    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.newByteChannel(UnixFileSystemProvider.java:214) 
    at java.nio.file.Files.newByteChannel(Files.java:361) 
    at java.nio.file.Files.newByteChannel(Files.java:407) 
    at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:384) 
    at java.nio.file.Files.newInputStream(Files.java:152) 
    at org.elasticsearch.plugins.PluginInfo.readFromProperties(PluginInfo.java:86) 
    at org.elasticsearch.plugins.PluginsService.getPluginBundles(PluginsService.java:302) 
    at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:108) 
    at org.elasticsearch.node.Node.<init>(Node.java:148) 
    at org.elasticsearch.node.Node.<init>(Node.java:129) 
    at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:145) 
    at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:178) 
    at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:285) 
    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35) 
Refer to the log for complete error details. 
                  [FAILED] 

在/ var /日誌:

[[email protected] elasticsearch]# cat elasticsearch.log 
[2015-12-15 11:44:24,525][INFO ][node      ] [Valtorr] stopping ... 
[2015-12-15 11:44:24,639][INFO ][node      ] [Valtorr] stopped 
[2015-12-15 11:44:24,641][INFO ][node      ] [Valtorr] closing ... 
[2015-12-15 11:44:24,647][INFO ][node      ] [Valtorr] closed 
[2015-12-15 11:44:26,097][WARN ][bootstrap    ] unable to install syscall filter: seccomp unavailable: CONFIG_SECCOMP not compiled into kernel, CONFIG_SECCOMP and CONFIG_SECCOMP_FILTER are needed 
[2015-12-15 11:44:26,314][INFO ][node      ] [Agon] version[2.1.0], pid[21703], build[72cd1f1/2015-11-18T22:40:03Z] 
[2015-12-15 11:44:26,314][INFO ][node      ] [Agon] initializing ... 
[2015-12-15 11:44:26,318][ERROR][bootstrap    ] Exception 
java.lang.IllegalStateException: Unable to initialize plugins 
    at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:111) 
    at org.elasticsearch.node.Node.<init>(Node.java:148) 
    at org.elasticsearch.node.Node.<init>(Node.java:129) 
    at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:145) 
    at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:178) 
    at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:285) 
    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35) 
Caused by: java.nio.file.AccessDeniedException: /usr/share/elasticsearch/plugins/license/plugin-descriptor.properties 
    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.newByteChannel(UnixFileSystemProvider.java:214) 
    at java.nio.file.Files.newByteChannel(Files.java:361) 
    at java.nio.file.Files.newByteChannel(Files.java:407) 
    at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:384) 
    at java.nio.file.Files.newInputStream(Files.java:152) 
    at org.elasticsearch.plugins.PluginInfo.readFromProperties(PluginInfo.java:86) 
    at org.elasticsearch.plugins.PluginsService.getPluginBundles(PluginsService.java:302) 
    at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:108) 
    ... 6 more 
+0

您還可以從elasticsearch日誌共享日誌嗎? – Val

+0

增加了額外的細節。 – theMadKing

+1

你可以檢查你是否患有[此處描述的問題](https://github.com/elastic/elasticsearch/issues/11016) – Val

回答

1

我有同樣的例外,但在安裝和加載後xpack 0 Elasticsearch 5.2.1插件:

Caused by: java.nio.file.AccessDeniedException: /usr/share/elasticsearch/plugins/x-pack/plugin-descriptor.properties 

就我而言,我開始加入elasticsearch用戶root組:

usermod -aG root elasticsearch 

之後,它是隻需要修改插件的所有權文件夾:

chown -R elasticsearch:elasticsearch /usr/share/elasticsearch/plugins/ 
0

感謝瓦爾,簡單的解決辦法是安裝你需要的,如果你使用的是RPM安裝彈性的迅速改變所有權/組插件後:

chown -R root:elasticsearch /usr/share/elasticsearch