2017-08-30 72 views
2
elk: 
image: sebp/elk 
ports: 
    - "5601:5601" 
    - "9200:9200" 
    - "5044:5044" 

當我運行命令:須藤搬運工-構成時,控制檯顯示:下面Sebp /麋鹿泊塢運行錯誤

Elasticsearch日誌如下。

[2017-08-30T03:04:35,674][INFO ][o.e.n.Node    ] [] initializing ... 
[2017-08-30T03:04:35,777][INFO ][o.e.e.NodeEnvironment ] [ntFgcue] using [1] data paths, mounts [[/var/lib/elasticsearch (/dev/mapper/cl-root)]], net usable_space [46.3gb], net total_space [49.9gb], spins? [possibly], types [xfs] 
[2017-08-30T03:04:35,777][INFO ][o.e.e.NodeEnvironment ] [ntFgcue] heap size [1.9gb], compressed ordinary object pointers [true] 
[2017-08-30T03:04:35,778][INFO ][o.e.n.Node    ] node name [ntFgcue] derived from node ID [ntFgcueGRcyRoRjXBvq70A]; set [node.name] to override 
[2017-08-30T03:04:35,779][INFO ][o.e.n.Node    ] version[5.5.1], pid[74], build[19c13d0/2017-07-18T20:44:24.823Z], OS[Linux/3.10.0-514.el7.x86_64/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/1.8.0_131/25.131-b11] 
[2017-08-30T03:04:35,780][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=/opt/elasticsearch] 
[2017-08-30T03:04:38,175][INFO ][o.e.p.PluginsService  ] [ntFgcue] loaded module [aggs-matrix-stats] 
[2017-08-30T03:04:38,175][INFO ][o.e.p.PluginsService  ] [ntFgcue] loaded module [ingest-common] 
[2017-08-30T03:04:38,175][INFO ][o.e.p.PluginsService  ] [ntFgcue] loaded module [lang-expression] 
[2017-08-30T03:04:38,175][INFO ][o.e.p.PluginsService  ] [ntFgcue] loaded module [lang-groovy] 
[2017-08-30T03:04:38,175][INFO ][o.e.p.PluginsService  ] [ntFgcue] loaded module [lang-mustache] 
[2017-08-30T03:04:38,175][INFO ][o.e.p.PluginsService  ] [ntFgcue] loaded module [lang-painless] 
[2017-08-30T03:04:38,175][INFO ][o.e.p.PluginsService  ] [ntFgcue] loaded module [parent-join] 
[2017-08-30T03:04:38,175][INFO ][o.e.p.PluginsService  ] [ntFgcue] loaded module [percolator] 
[2017-08-30T03:04:38,175][INFO ][o.e.p.PluginsService  ] [ntFgcue] loaded module [reindex] 
[2017-08-30T03:04:38,175][INFO ][o.e.p.PluginsService  ] [ntFgcue] loaded module [transport-netty3] 
[2017-08-30T03:04:38,175][INFO ][o.e.p.PluginsService  ] [ntFgcue] loaded module [transport-netty4] 
[2017-08-30T03:04:38,176][INFO ][o.e.p.PluginsService  ] [ntFgcue] no plugins loaded 
[2017-08-30T03:04:41,409][INFO ][o.e.d.DiscoveryModule ] [ntFgcue] using discovery type [zen] 
[2017-08-30T03:04:42,424][INFO ][o.e.n.Node    ] initialized 
[2017-08-30T03:04:42,424][INFO ][o.e.n.Node    ] [ntFgcue] starting ... 
[2017-08-30T03:04:42,858][INFO ][o.e.t.TransportService ] [ntFgcue] publish_address {172.17.0.1:9300}, bound_addresses {[::]:9300} 
[2017-08-30T03:04:42,875][INFO ][o.e.b.BootstrapChecks ] [ntFgcue] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks 
[2017-08-30T03:04:42,890][ERROR][o.e.b.Bootstrap   ] [ntFgcue] node validation exception 
[1] bootstrap checks failed 
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536] 
[2017-08-30T03:04:42,921][INFO ][o.e.n.Node    ] [ntFgcue] stopping ... 
[2017-08-30T03:04:43,012][INFO ][o.e.n.Node    ] [ntFgcue] stopped 
[2017-08-30T03:04:43,012][INFO ][o.e.n.Node    ] [ntFgcue] closing ... 
[2017-08-30T03:04:43,036][INFO ][o.e.n.Node    ] [ntFgcue] closed 

回答

1

我們可以爲在撰寫文件中定義的服務設置ulimits。在你的情況下,嘗試添加的ulimit部分如下 -

elk: 
    image: sebp/elk 
    ports: 
    - "5601:5601" 
    - "9200:9200" 
    - "5044:5044" 
    ulimits: 
    nofile: 
     soft: 65536 
     hard: 65536 

參考 - https://docs.docker.com/compose/compose-file/#ulimits

+0

我設置 *軟NOFILE 65536 *硬NOFILE 65536 但仍錯誤 – Dustin

+0

這對我的作品。運行容器時看不到任何文件描述符錯誤。您提供的錯誤僅指文件描述符。你可以以某種方式(更改Dockerfile等)進入容器並檢查ulimit? – vivekyad4v

+0

Ref-http://fafairuzcode.blogspot.in/2017/03/elasticsearch-52-on-centos-7-error.html 用於解析引導程序檢查(內存,進程和文件描述符)。 – vivekyad4v