适用于Windows的Docker Desktop上的Elasticsearch

问题描述 投票:1回答:2

有没有人在Docker for Windows上成功运行Elasticsearch?没有找到任何有关此组合的信息。

我在启动时对于microsoft / windowsservercore映像没有足够的内存问题,尽管至少有微软/纳米服务器可以启动,但尚未在负载下测试。

此外,使用卷装入存在一些时髦的问题,其中elasticsearch抛出异常:“无法访问'path.data'”,尽管mount可以从容器内的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] [oebElasticsearchUncaughtExceptionHandler] [644FE5A1B514]在线程中未捕获异常[main] org.elasticsearch.bootstrap.StartupException:java.lang.IllegalStateException:无法访问'path.data' org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:127)〜[elasticsearch-5.3.1.jar:5.3.1]的org.elasticsearch.bootstrap.Elasticsearch上的(C:\ log \ elasticsearch \ data)。执行(Elasticsearch.java:114)〜[elasticsearch-5.3.1.jar:5.3.1] org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:58)〜[elasticsearch-5.3.1.jar:5.3 .1] org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122)〜[elasticsearch-5.3.1.jar:5.3.1] org.elasticsearch.cli.Command.main(Command.java:88 )org.elasticsearch的org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91)〜[elasticsearch-5.3.1.jar:5.3.1] ~~ [elasticsearch-5.3.1.jar:5.3.1] .bootstrap.Elasticsearch.main(Elasticsearch.java:84)〜[elasticsearch-5.3 .1.jar:5.3.1]引起:java.lang.IllegalStateException:无法访问org.elasticsearch.bootstrap.Security.addPath(Security.java)中的'path.data'(C:\ log \ elasticsearch \ data) :org.elasticsearch.bootstrap.Security.addFilePermissions(Security.java:252)〜[elasticsearch-5.3.1.jar:5.3.1] atg的:397)〜[elasticsearch-5.3.1.jar:5.3.1] org.elasticsearch.bootstrap.Security.configure(Security.java:114)〜[elasticsearch- 5.3.1.jar:5.3.1] org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:237)〜[elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.bootstrap.Bootstrap。 init(Bootstrap.java:360)〜[elasticsearch-5.3.1.jar:5.3.1]在org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:123)〜[elasticsearch-5.3.1.jar:5.3 .1] ... 6更多引起:java.nio.file.NoSuchFileException:C:\ log \ elasticsearch \ data at sun.nio.fs.WindowsException.translateToIOException(WindowsException.ja在sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)〜[? java:102)〜[?:1.8.0_131] at sun.nio.fs.WindowsLinkSupport.getFinalPath(WindowsLinkSupport.java:82)〜[?:1.8.0_131] at sun.nio.fs.WindowsLinkSupport.getRealPath(WindowsLinkSupport。 java:242)〜[?:1.8.0_131] at sun.nio.fs.WindowsPath.toRealPath(WindowsPath.java:836)〜[?:1.8.0_131] at sun.nio.fs.WindowsPath.toRealPath(WindowsPath。 java:44)〜[?:1.8.0_131]在org.elasticsearch.bootstrap的org.elasticsearch.bootstrap.Security.ensureDirectoryExists(Security.java:435)〜[elasticsearch-5.3.1.jar:5.3.1]。 Security.addPath(Security.java:395)〜[elasticsearch-5.3.1.jar:5.3.1]在org.elasticsearch.bootstrap.Security.addFilePermissions(Security.java:252)〜[elasticsearch-5.3.1.jar :5.3.1]在org.elasticsearch.bootstrap的org.elasticsearch.bootstrap.Security.createPermissions(Security.java:208)〜[elasticsearch-5.3.1.jar:5.3.1]。 Security.configure(Security.java:114)〜[elasticsearch-5.3.1.jar:5.3.1]在org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:237)〜[elasticsearch-5.3.1.jar :5.3.1] org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:360)〜[elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java) :123)〜[elasticsearch-5.3.1.jar:5.3.1] ......还有6个

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

docker elasticsearch docker-for-windows docker-desktop
2个回答
3
投票

我找到了围绕here的解释。

我发布了一个问题的解决方案,我问的问题与这个here相同

另外,我发布了一个Dockerfile,其中包括Github的解决方法:https://github.com/SharpSeeEr/Dockerfiles


0
投票

您是否尝试使用其中一个memory options明确指定更大量的内存?

© www.soinside.com 2019 - 2024. All rights reserved.