elasticsearch kubernetes插件问题

时间:2015-12-15 00:43:48

标签: elasticsearch kubernetes fabric8

我正在使用fabric8 kubernetes插件进行elasticsearch 2.1集群发现。在启动期间,由于以下错误,我的ES失败:

[2015-12-15 00:30:28,049][WARN ][io.fabric8.elasticsearch.discovery.kubernetes.KubernetesUnicastHostsProvider] [Freakmaster] Exception caught during discovery: access denied ("java.io.FilePermission" "/home/elasticsearch/.kube/config" "read")

java.security.AccessControlException: access denied ("java.io.FilePermission" "/home/elasticsearch/.kube/config" "read")

at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)

at java.security.AccessController.checkPermission(AccessController.java:884)

at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)

at java.lang.SecurityManager.checkRead(SecurityManager.java:888)

at sun.nio.fs.UnixPath.checkRead(UnixPath.java:795)

at sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:49)

at sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:144)

at sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99)

at java.nio.file.Files.readAttributes(Files.java:1737)

at java.nio.file.Files.isRegularFile(Files.java:2229)

at io.fabric8.kubernetes.client.Config.tryKubeConfig(Config.java:236)

at io.fabric8.kubernetes.client.Config.<init>(Config.java:106)

at io.fabric8.kubernetes.client.ConfigBuilder.<init>(ConfigBuilder.java:17)

at io.fabric8.kubernetes.client.BaseClient.<init>(BaseClient.java:37)

at io.fabric8.kubernetes.client.DefaultKubernetesClient.<init>(DefaultKubernetesClient.java:82)

at io.fabric8.elasticsearch.cloud.kubernetes.KubernetesAPIServiceImpl.client(KubernetesAPIServiceImpl.java:49)

at io.fabric8.elasticsearch.cloud.kubernetes.KubernetesAPIServiceImpl.endpoints(KubernetesAPIServiceImpl.java:35)

at io.fabric8.elasticsearch.discovery.kubernetes.KubernetesUnicastHostsProvider.buildDynamicNodes(KubernetesUnicastHostsProvider.java:99)

at org.elasticsearch.discovery.zen.ping.unicast.UnicastZenPing.sendPings(UnicastZenPing.java:335)

at org.elasticsearch.discovery.zen.ping.unicast.UnicastZenPing$2$1.doRun(UnicastZenPing.java:253)

at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

at java.lang.Thread.run(Thread.java:745)

正如您所看到的,由于某种原因,配置假定/ home / elasticsearch为安装位置。我的ES实际上是在/ opt / elasticsearch设置的。我甚至通过了path.home配置参数并设置了HOME env var。但错误仍然存​​在。

非常感谢任何帮助/建议。

1 个答案:

答案 0 :(得分:-1)

您需要在禁用安全管理器的情况下运行 - 有关设置,请参阅https://github.com/fabric8io/elasticsearch-cloud-kubernetes/blob/master/elasticsearch.yml#L20。我已将此添加到自述文件中。

插件只能从2.2更新安全策略 - 有关详细信息,请参阅https://github.com/elastic/elasticsearch/issues/14880