代码之家  ›  专栏  ›  技术社区  ›  D.T

自定义Elasticsearch图像运行不正常

  •  0
  • D.T  · 技术社区  · 5 年前

    我想建立一个自定义的Elasticsearch图像使用我自己的 elasticsearch.yml 文件(如果我安装了Elasticsearch并在windows中使用它的话,这个功能很好)。 我按照指示去创造 Dockerfile here .

    这是Dockerfile:

    FROM elasticsearch:5.6.11
    COPY --chown=elasticsearch:elasticsearch ./elasticsearch.yml /usr/share/elasticsearch/config/
    

    我建立映像并运行它没有任何错误。这是容器运行后的日志:

    [2020-04-13T16:18:52,677][INFO ][o.e.n.Node               ] [] initializing ...
    [2020-04-13T16:18:52,895][INFO ][o.e.e.NodeEnvironment    ] [DCdtI8f] using [1] data paths, mounts 
    [[/usr/share/elasticsearch/data (/dev/sda1)]], net usable_space [44.6gb], net total_space [58.4gb], spins? [possibly], types [ext4]
    [2020-04-13T16:18:52,895][INFO ][o.e.e.NodeEnvironment    ] [DCdtI8f] heap size [1.9gb], compressed ordinary object pointers [true]
    [2020-04-13T16:18:52,897][INFO ][o.e.n.Node               ] node name [DCdtI8f] derived from node ID 
    [DCdtI8fZRJu1RpF5q-LW3A]; set [node.name] to override
    [2020-04-13T16:18:52,897][INFO ][o.e.n.Node               ] version[5.6.11], pid[1], build[bc3eef4/2018-08-16T15:25:17.293Z], OS[Linux/4.19.76-linuxkit/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/1.8.0_181/25.181-b13]
    [2020-04-13T16:18:52,898][INFO ][o.e.n.Node               ] JVM arguments [-Xms2g, -Xmx2g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -Djdk.io.permissionsUseCanonicalPath=true, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Dlog4j.skipJansi=true, -XX:+HeapDumpOnOutOfMemoryError, -Des.path.home=/usr/share/elasticsearch]
     [2020-04-13T16:18:54,556][INFO ][o.e.p.PluginsService     ] [DCdtI8f] loaded module [aggs-matrix-stats]
    [2020-04-13T16:18:54,556][INFO ][o.e.p.PluginsService     ] [DCdtI8f] loaded module [ingest-common]
    [2020-04-13T16:18:54,556][INFO ][o.e.p.PluginsService     ] [DCdtI8f] loaded module [lang-expression]
    [2020-04-13T16:18:54,556][INFO ][o.e.p.PluginsService     ] [DCdtI8f] loaded module [lang-groovy]
    [2020-04-13T16:18:54,556][INFO ][o.e.p.PluginsService     ] [DCdtI8f] loaded module [lang-mustache]
    [2020-04-13T16:18:54,556][INFO ][o.e.p.PluginsService     ] [DCdtI8f] loaded module [lang-painless]
     [2020-04-13T16:18:54,556][INFO ][o.e.p.PluginsService     ] [DCdtI8f] loaded module [parent-join]
    [2020-04-13T16:18:54,556][INFO ][o.e.p.PluginsService     ] [DCdtI8f] loaded module [percolator]
    [2020-04-13T16:18:54,557][INFO ][o.e.p.PluginsService     ] [DCdtI8f] loaded module [reindex]
    [2020-04-13T16:18:54,557][INFO ][o.e.p.PluginsService     ] [DCdtI8f] loaded module [transport-netty3]
    [2020-04-13T16:18:54,557][INFO ][o.e.p.PluginsService     ] [DCdtI8f] loaded module [transport-netty4]
    [2020-04-13T16:18:54,557][INFO ][o.e.p.PluginsService     ] [DCdtI8f] no plugins loaded
    [2020-04-13T16:18:57,031][INFO ][o.e.d.DiscoveryModule    ] [DCdtI8f] using discovery type [zen]
    [2020-04-13T16:18:57,774][INFO ][o.e.n.Node               ] initialized
    [2020-04-13T16:18:57,775][INFO ][o.e.n.Node               ] [DCdtI8f] starting ...
    [2020-04-13T16:18:58,013][INFO ][o.e.t.TransportService   ] [DCdtI8f] publish_address {127.0.0.1:9300}, bound_addresses {127.0.0.1:9300}
    [2020-04-13T16:19:01,128][INFO ][o.e.c.s.ClusterService   ] [DCdtI8f] new_master {DCdtI8f}{DCdtI8fZRJu1RpF5q-LW3A}{pI96gxraRiy1k1K3cQnj2Q}{127.0.0.1}{127.0.0.1:9300}, reason: zen-disco-elected-as-master ([0] nodes joined)[, ]
    [2020-04-13T16:19:01,168][INFO ][o.e.h.n.Netty4HttpServerTransport] [DCdtI8f] publish_address 
    {127.0.0.1:9200}, bound_addresses {127.0.0.1:9200}
    [2020-04-13T16:19:01,169][INFO ][o.e.n.Node               ] [DCdtI8f] started
    [2020-04-13T16:19:01,174][INFO ][o.e.g.GatewayService     ] [DCdtI8f] recovered [0] indices into cluster_state
    

    localhost:9200 正在显示 ERR_EMPTY_RESPONSE

    但由于我是从Windows构建的,所以在构建后有一个安全警告:“针对非Windows Docker主机从窗口构建Docker映像”

    enter image description here

    但我复制的文件在警告中具有相同的权限: enter image description here

    有什么问题吗?

    0 回复  |  直到 5 年前