elk:
image: sebp/elk
ports:
- "5601:5601"
- "9200:9200"
- "5044:5044"
当我运行命令:sudo docker-compose up时,控制台显示:
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
答案 0 :(得分:1)
我们可以为compose文件中定义的服务设置ulimits。在您的情况下,尝试添加ulimit部分,如下所示 -
elk:
image: sebp/elk
ports:
- "5601:5601"
- "9200:9200"
- "5044:5044"
ulimits:
nofile:
soft: 65536
hard: 65536