在Windows上使用Docker Desktop安装Elasticsearch

3

有人成功地在Windows Docker上运行Elasticsearch吗?我没有找到这个组合的任何信息。

使用microsoft/windowsservercore镜像时,在启动时会出现内存不足问题,尽管使用microsoft/nanoserver至少可以启动,但还没有测试过负载情况。

此外,在使用卷挂载时存在一些问题,其中elaticsearch会抛出异常:"无法访问'path.data'",尽管容器内的shell可以完全读写该挂载点。

docker volume create log

docker run --rm -it -p 15000:15000 -v log:c:/log/elasticsearch/data microsoft/windowsservercore powershell

或者使用主机绑定:

docker run --rm -it -p 15000:15000 -v C:/temp/log:c:/log/elasticsearch/data microsoft/windowsservercore powershell

并进行调用:

c:/log/elasticsearch/bin/elasticsearch.bat -Ecluster.name=log_cluster -Enode.name=${HOSTNAME} -Enetwork.host="0.0.0.0" -Ehttp.port=15000

我得到了:

[2017-04-28T15:40:25,501][WARN][o.e.b.ElasticsearchUncaughtExceptionHandler] [644FE5A1B514] 主线程抛出未捕获的异常: org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: 无法访问路径 'path.data' (C:\log\elasticsearch\data) at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:127) at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:114) at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:58) at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122) at org.elasticsearch.cli.Command.main(Command.java:88) at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91) at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84) Caused by: java.lang.IllegalStateException: 无法访问路径 'path.data' (C:\log\elasticsearch\data) at org.elasticsearch.bootstrap.Security.addPath(Security.java:397) at org.elasticsearch.bootstrap.Security.addFilePermissions(Security.java:252) at org.elasticsearch.bootstrap.Security.createPermissions(Security.java:208) at org.elasticsearch.bootstrap.Security.configure(Security.java:114) at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:237) at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:360) at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:123) ... 6 more Caused by: java.nio.file.NoSuchFileException: C:\log\elasticsearch\data at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:79) at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97) at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102) at sun.nio.fs.WindowsLinkSupport.getFinalPath(WindowsLinkSupport.java:82) at sun.nio.fs.WindowsLinkSupport.getRealPath(WindowsLinkSupport.java:242) at sun.nio.fs.WindowsPath.toRealPath(WindowsPath.java:836) at sun.nio.fs.WindowsPath.toRealPath(WindowsPath.java:44) at org.elasticsearch.bootstrap.Security.ensureDirectoryExists(Security.java:435) at org.elasticsearch.bootstrap.Security.addPath(Security.java:395) at org.elasticsearch.bootstrap.Security.addFilePermissions(Security.java:252) at org.elasticsearch.bootstrap.Security.createPermissions(Security.java:208) at org.elasticsearch.bootstrap.Security.configure(Security.java:114) at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:237) at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:360) at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:123) ... 6 more

Elasticsearch 5.3.1 尝试使用docker版本17.03和17.05rc1/2

2个回答

5

非常感谢您! - biiiipy

0

你尝试过使用内存选项之一明确指定更大的内存量吗?


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接