gpt4 book ai didi

docker - 适用于 Windows 的 Docker Desktop 上的 Elasticsearch

转载 作者:行者123 更新时间:2023-12-02 18:11:48 27 4
gpt4 key购买 nike

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

我在启动时遇到过 microsoft/windowsservercore 镜像内存不足的问题,尽管 microsoft/nanoserver 至少可以启动,但尚未在负载下进行测试。

此外,在使用卷挂载时,elaticsearch 会抛出异常:“Unable to access 'path.data'”,尽管挂载完全可以从容器内的 shell 写入:

docker volume create log

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

或与主机绑定(bind):

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] uncaught exception in thread [main] org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: Unable to access 'path.data' (C:\log\elasticsearch\data) at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:127) ~[elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:114) ~[elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:58) ~[elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122) ~[elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.cli.Command.main(Command.java:88) ~[elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91) ~[elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84) ~[elasticsearch-5.3.1.jar:5.3.1] Caused by: java.lang.IllegalStateException: Unable to access 'path.data' (C:\log\elasticsearch\data) at org.elasticsearch.bootstrap.Security.addPath(Security.java:397) ~[elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.bootstrap.Security.addFilePermissions(Security.java:252) ~[elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.bootstrap.Security.createPermissions(Security.java:208) ~[elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.bootstrap.Security.configure(Security.java:114) ~[elasticsearch-5.3.1.jar:5.3.1] at 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] at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:123) ~[elasticsearch-5.3.1.jar:5.3.1] ... 6 more Caused by: java.nio.file.NoSuchFileException: C:\log\elasticsearch\data at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:79) ~[?:1.8.0_131] at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97) ~[?:1.8.0_131] at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.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] at org.elasticsearch.bootstrap.Security.ensureDirectoryExists(Security.java:435) ~[elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.bootstrap.Security.addPath(Security.java:395) ~[elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.bootstrap.Security.addFilePermissions(Security.java:252) ~[elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.bootstrap.Security.createPermissions(Security.java:208) ~[elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.bootstrap.Security.configure(Security.java:114) ~[elasticsearch-5.3.1.jar:5.3.1] at 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] at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:123) ~[elasticsearch-5.3.1.jar:5.3.1] ... 6 more

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

最佳答案

我找到了关于 here 的解释.

我针对我提出的一个问题发布了一个解决方案,该解决方案与这个问题相同 here

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

关于docker - 适用于 Windows 的 Docker Desktop 上的 Elasticsearch,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43732650/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com