You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I searched existing issues before opening this one
Expected behavior
i'm trying to deploy an elastic service across swarm cluster using compose file. docker-compose starts elastic container normally, applying ulimits settings from .yml file.
but docker stack deploy ignores ulimits directive, so elasticsearch doesn't start at all.
.yml file is always the same, ether it docker-compose deploy or docker stack deploy
xx@xx:~/git/elk-compose-full$ docker-compose -f elastic-compose-single.yml up
WARNING: Some services (elasticsearch) use the 'deploy' key, which will be ignored. Compose does not support 'deploy' configuration - use `docker stack deploy` to deploy to a swarm.
WARNING: The Docker Engine you're using is running in swarm mode.
Compose does not use swarm mode to deploy services to multiple nodes in a swarm. All containers will be scheduled on the current node.
To deploy your application across the swarm, use `docker stack deploy`.
Creating network "elkcomposefull_esnet" with the default driver
Creating volume "elkcomposefull_data" with local driver
Creating elasticsearch ...
Creating elasticsearch ... done
Attaching to elasticsearch
elasticsearch | [2017-08-29T09:15:52,331][INFO ][o.e.n.Node ] [] initializing ...
elasticsearch | [2017-08-29T09:15:52,397][INFO ][o.e.e.NodeEnvironment ] [TibRwks] using [1] data paths, mounts [[/usr/share/elasticsearch/data (/dev/mapper/tmpl--vg-root)]], net usable_space [2.8gb], net total_space [7.2gb], spins? [possibly], types [ext4]
elasticsearch | [2017-08-29T09:15:52,397][INFO ][o.e.e.NodeEnvironment ] [TibRwks] heap size [494.9mb], compressed ordinary object pointers [true]
elasticsearch | [2017-08-29T09:15:52,398][INFO ][o.e.n.Node ] node name [TibRwks] derived from node ID [TibRwkssREK1G3d_32IsXg]; set [node.name] to override
elasticsearch | [2017-08-29T09:15:52,399][INFO ][o.e.n.Node ] version[5.5.2], pid[1], build[b2f0c09/2017-08-14T12:33:14.154Z], OS[Linux/4.4.0-92-generic/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/1.8.0_141/25.141-b16]
elasticsearch | [2017-08-29T09:15:52,399][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.cgroups.hierarchy.override=/, -Xms512m, -Xmx512m, -Des.path.home=/usr/share/elasticsearch]
elasticsearch | [2017-08-29T09:15:53,815][INFO ][o.e.p.PluginsService ] [TibRwks] loaded module [aggs-matrix-stats]
elasticsearch | [2017-08-29T09:15:53,815][INFO ][o.e.p.PluginsService ] [TibRwks] loaded module [ingest-common]
elasticsearch | [2017-08-29T09:15:53,815][INFO ][o.e.p.PluginsService ] [TibRwks] loaded module [lang-expression]
elasticsearch | [2017-08-29T09:15:53,815][INFO ][o.e.p.PluginsService ] [TibRwks] loaded module [lang-groovy]
elasticsearch | [2017-08-29T09:15:53,815][INFO ][o.e.p.PluginsService ] [TibRwks] loaded module [lang-mustache]
elasticsearch | [2017-08-29T09:15:53,815][INFO ][o.e.p.PluginsService ] [TibRwks] loaded module [lang-painless]
elasticsearch | [2017-08-29T09:15:53,815][INFO ][o.e.p.PluginsService ] [TibRwks] loaded module [parent-join]
elasticsearch | [2017-08-29T09:15:53,815][INFO ][o.e.p.PluginsService ] [TibRwks] loaded module [percolator]
elasticsearch | [2017-08-29T09:15:53,815][INFO ][o.e.p.PluginsService ] [TibRwks] loaded module [reindex]
elasticsearch | [2017-08-29T09:15:53,816][INFO ][o.e.p.PluginsService ] [TibRwks] loaded module [transport-netty3]
elasticsearch | [2017-08-29T09:15:53,816][INFO ][o.e.p.PluginsService ] [TibRwks] loaded module [transport-netty4]
elasticsearch | [2017-08-29T09:15:53,816][INFO ][o.e.p.PluginsService ] [TibRwks] loaded plugin [ingest-geoip]
elasticsearch | [2017-08-29T09:15:53,816][INFO ][o.e.p.PluginsService ] [TibRwks] loaded plugin [ingest-user-agent]
elasticsearch | [2017-08-29T09:15:53,816][INFO ][o.e.p.PluginsService ] [TibRwks] loaded plugin [x-pack]
elasticsearch | [2017-08-29T09:15:55,638][INFO ][o.e.x.m.j.p.l.CppLogMessageHandler] [controller/55] [Main.cc@128] controller (64 bit): Version 5.5.2 (Build 0d83940bb9d682) Copyright (c) 2017 Elasticsearch BV
elasticsearch | [2017-08-29T09:15:55,666][INFO ][o.e.d.DiscoveryModule ] [TibRwks] using discovery type [zen]
elasticsearch | [2017-08-29T09:15:56,261][INFO ][o.e.n.Node ] initialized
elasticsearch | [2017-08-29T09:15:56,261][INFO ][o.e.n.Node ] [TibRwks] starting ...
elasticsearch | [2017-08-29T09:15:56,452][INFO ][o.e.t.TransportService ] [TibRwks] publish_address {172.19.0.2:9300}, bound_addresses {0.0.0.0:9300}
elasticsearch | [2017-08-29T09:15:56,466][INFO ][o.e.b.BootstrapChecks ] [TibRwks] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
elasticsearch | [2017-08-29T09:15:59,643][INFO ][o.e.c.s.ClusterService ] [TibRwks] new_master {TibRwks}{TibRwkssREK1G3d_32IsXg}{ZAdw2rV1Q2-5ZuiP7PIhvg}{172.19.0.2}{172.19.0.2:9300}{ml.max_open_jobs=10, ml.enabled=true}, reason: zen-disco-elected-as-master ([0] nodes joined)
elasticsearch | [2017-08-29T09:15:59,716][INFO ][o.e.h.n.Netty4HttpServerTransport] [TibRwks] publish_address {172.19.0.2:9200}, bound_addresses {0.0.0.0:9200}
elasticsearch | [2017-08-29T09:15:59,716][INFO ][o.e.n.Node ] [TibRwks] started
elasticsearch | [2017-08-29T09:15:59,764][INFO ][o.e.g.GatewayService ] [TibRwks] recovered [0] indices into cluster_state
elasticsearch | [2017-08-29T09:15:59,978][INFO ][o.e.x.m.MachineLearningTemplateRegistry] [TibRwks] successfully created .ml-state index template
elasticsearch | [2017-08-29T09:15:59,990][INFO ][o.e.x.m.MachineLearningTemplateRegistry] [TibRwks] successfully created .ml-meta index template
elasticsearch | [2017-08-29T09:16:00,026][INFO ][o.e.x.m.MachineLearningTemplateRegistry] [TibRwks] successfully created .ml-anomalies- index template
elasticsearch | [2017-08-29T09:16:00,039][INFO ][o.e.x.m.MachineLearningTemplateRegistry] [TibRwks] successfully created .ml-notifications index template
elasticsearch | [2017-08-29T09:16:00,214][INFO ][o.e.l.LicenseService ] [TibRwks] license [e1688e1c-cd69-49f4-9e39-fd2a621f2558] mode [trial] - valid
Actual behavior
docker stack deploy -c elastic-compose-single.yml elk
xx@xx:~/git/elk-compose-full$ docker service ls
ID NAME MODE REPLICAS IMAGE PORTS
q0u1pnz6zc2k elk_elasticsearch replicated 1/1 docker.elastic.co/elasticsearch/elasticsearch:5.5.2 *:9200->9200/tcp
xx@xx:~/git/elk-compose-full$ docker service logs q0u1pnz6zc2k
elk_elasticsearch.1.a83hfcmmfma7@xx | [2017-08-29T09:08:52,929][WARN ][o.e.b.JNANatives ] Unable to lock JVM Memory: error=12, reason=Cannot allocate memory
elk_elasticsearch.1.a83hfcmmfma7@xx | [2017-08-29T09:08:52,931][WARN ][o.e.b.JNANatives ] This can result in part of the JVM being swapped out.
elk_elasticsearch.1.a83hfcmmfma7@xx | [2017-08-29T09:08:52,931][WARN ][o.e.b.JNANatives ] Increase RLIMIT_MEMLOCK, soft limit: 65536, hard limit: 65536
elk_elasticsearch.1.a83hfcmmfma7@xx | [2017-08-29T09:08:52,931][WARN ][o.e.b.JNANatives ] These can be adjusted by modifying /etc/security/limits.conf, for example:
elk_elasticsearch.1.a83hfcmmfma7@xx | # allow user 'elasticsearch' mlockall
elk_elasticsearch.1.a83hfcmmfma7@xx | elasticsearch soft memlock unlimited
elk_elasticsearch.1.a83hfcmmfma7@xx | elasticsearch hard memlock unlimited
elk_elasticsearch.1.a83hfcmmfma7@xx | [2017-08-29T09:08:52,931][WARN ][o.e.b.JNANatives ] If you are logged in interactively, you will have to re-login for the new limits to take effect.
elk_elasticsearch.1.a83hfcmmfma7@xx | [2017-08-29T09:08:53,042][INFO ][o.e.n.Node ] [] initializing ...
elk_elasticsearch.1.a83hfcmmfma7@xx | [2017-08-29T09:08:53,153][INFO ][o.e.e.NodeEnvironment ] [dT7I27E] using [1] data paths, mounts [[/usr/share/elasticsearch/data (/dev/mapper/tmpl--vg-root)]], net usable_space [2.8gb], net total_space [7.2gb], spins? [possibly], types [ext4]
elk_elasticsearch.1.a83hfcmmfma7@xx | [2017-08-29T09:08:53,153][INFO ][o.e.e.NodeEnvironment ] [dT7I27E] heap size [494.9mb], compressed ordinary object pointers [true]
elk_elasticsearch.1.a83hfcmmfma7@xx | [2017-08-29T09:08:53,155][INFO ][o.e.n.Node ] node name [dT7I27E] derived from node ID [dT7I27EwQOaQpekZF0mVsw]; set [node.name] to override
elk_elasticsearch.1.a83hfcmmfma7@xx | [2017-08-29T09:08:53,155][INFO ][o.e.n.Node ] version[5.5.2], pid[1], build[b2f0c09/2017-08-14T12:33:14.154Z], OS[Linux/4.4.0-92-generic/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/1.8.0_141/25.141-b16]
elk_elasticsearch.1.a83hfcmmfma7@xx | [2017-08-29T09:08:53,155][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.cgroups.hierarchy.override=/, -Xms512m, -Xmx512m, -Des.path.home=/usr/share/elasticsearch]
elk_elasticsearch.1.a83hfcmmfma7@xx | [2017-08-29T09:08:54,608][INFO ][o.e.p.PluginsService ] [dT7I27E] loaded module [aggs-matrix-stats]
elk_elasticsearch.1.a83hfcmmfma7@xx | [2017-08-29T09:08:54,608][INFO ][o.e.p.PluginsService ] [dT7I27E] loaded module [ingest-common]
elk_elasticsearch.1.a83hfcmmfma7@xx | [2017-08-29T09:08:54,608][INFO ][o.e.p.PluginsService ] [dT7I27E] loaded module [lang-expression]
elk_elasticsearch.1.a83hfcmmfma7@xx | [2017-08-29T09:08:54,608][INFO ][o.e.p.PluginsService ] [dT7I27E] loaded module [lang-groovy]
elk_elasticsearch.1.a83hfcmmfma7@xx | [2017-08-29T09:08:54,608][INFO ][o.e.p.PluginsService ] [dT7I27E] loaded module [lang-mustache]
elk_elasticsearch.1.a83hfcmmfma7@xx | [2017-08-29T09:08:54,609][INFO ][o.e.p.PluginsService ] [dT7I27E] loaded module [lang-painless]
elk_elasticsearch.1.a83hfcmmfma7@xx | [2017-08-29T09:08:54,609][INFO ][o.e.p.PluginsService ] [dT7I27E] loaded module [parent-join]
elk_elasticsearch.1.a83hfcmmfma7@xx | [2017-08-29T09:08:54,609][INFO ][o.e.p.PluginsService ] [dT7I27E] loaded module [percolator]
elk_elasticsearch.1.a83hfcmmfma7@xx | [2017-08-29T09:08:54,610][INFO ][o.e.p.PluginsService ] [dT7I27E] loaded module [reindex]
elk_elasticsearch.1.a83hfcmmfma7@xx | [2017-08-29T09:08:54,610][INFO ][o.e.p.PluginsService ] [dT7I27E] loaded module [transport-netty3]
elk_elasticsearch.1.a83hfcmmfma7@xx | [2017-08-29T09:08:54,610][INFO ][o.e.p.PluginsService ] [dT7I27E] loaded module [transport-netty4]
elk_elasticsearch.1.a83hfcmmfma7@xx | [2017-08-29T09:08:54,610][INFO ][o.e.p.PluginsService ] [dT7I27E] loaded plugin [ingest-geoip]
elk_elasticsearch.1.a83hfcmmfma7@xx | [2017-08-29T09:08:54,610][INFO ][o.e.p.PluginsService ] [dT7I27E] loaded plugin [ingest-user-agent]
elk_elasticsearch.1.a83hfcmmfma7@xx | [2017-08-29T09:08:54,611][INFO ][o.e.p.PluginsService ] [dT7I27E] loaded plugin [x-pack]
elk_elasticsearch.1.a83hfcmmfma7@xx | [2017-08-29T09:08:56,448][INFO ][o.e.x.m.j.p.l.CppLogMessageHandler] [controller/55] [Main.cc@128] controller (64 bit): Version 5.5.2 (Build 0d83940bb9d682) Copyright (c) 2017 Elasticsearch BV
elk_elasticsearch.1.a83hfcmmfma7@xx | [2017-08-29T09:08:56,479][INFO ][o.e.d.DiscoveryModule ] [dT7I27E] using discovery type [zen]
elk_elasticsearch.1.a83hfcmmfma7@xx | [2017-08-29T09:08:57,116][INFO ][o.e.n.Node ] initialized
elk_elasticsearch.1.a83hfcmmfma7@xx | [2017-08-29T09:08:57,116][INFO ][o.e.n.Node ] [dT7I27E] starting ...
elk_elasticsearch.1.a83hfcmmfma7@xx | [2017-08-29T09:08:57,314][INFO ][o.e.t.TransportService ] [dT7I27E] publish_address {10.0.0.2:9300}, bound_addresses {0.0.0.0:9300}
elk_elasticsearch.1.a83hfcmmfma7@xx | [2017-08-29T09:08:57,325][INFO ][o.e.b.BootstrapChecks ] [dT7I27E] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
elk_elasticsearch.1.a83hfcmmfma7@xx | ERROR: [1] bootstrap checks failed
elk_elasticsearch.1.a83hfcmmfma7@xx | [1]: memory locking requested for elasticsearch process but memory is not locked
elk_elasticsearch.1.a83hfcmmfma7@xx | [2017-08-29T09:08:57,333][INFO ][o.e.n.Node ] [dT7I27E] stopping ...
elk_elasticsearch.1.a83hfcmmfma7@xx | [2017-08-29T09:08:57,384][INFO ][o.e.n.Node ] [dT7I27E] stopped
elk_elasticsearch.1.a83hfcmmfma7@xx | [2017-08-29T09:08:57,384][INFO ][o.e.n.Node ] [dT7I27E] closing ...
elk_elasticsearch.1.a83hfcmmfma7@xx | [2017-08-29T09:08:57,408][INFO ][o.e.n.Node ] [dT7I27E] closed
elk_elasticsearch.1.a83hfcmmfma7@xx | [2017-08-29T09:08:57,412][INFO ][o.e.x.m.j.p.NativeController] Native controller process has stopped - no new native processes can be started
xx@xx:~/git/elk-compose-full$ docker stack deploy -c elastic-compose-single.yml elk
Ignoring deprecated options:
container_name: Setting the container name is not supported.
Creating network elk_esnet
Creating service elk_elasticsearch
xx@xx:~/git/elk-compose-full$ docker service ls
ID NAME MODE REPLICAS IMAGE PORTS
q0u1pnz6zc2k elk_elasticsearch replicated 1/1 docker.elastic.co/elasticsearch/elasticsearch:5.5.2 *:9200->9200/tcp
xx@xx:~/git/elk-compose-full$ docker service logs q0u1pnz6zc2k
elk_elasticsearch.1.a83hfcmmfma7@xxx | [2017-08-29T09:08:52,929][WARN ][o.e.b.JNANatives ] Unable to lock JVM Memory: error=12, reason=Cannot allocate memory
elk_elasticsearch.1.a83hfcmmfma7@xxx | [2017-08-29T09:08:52,931][WARN ][o.e.b.JNANatives ] This can result in part of the JVM being swapped out.
elk_elasticsearch.1.a83hfcmmfma7@xxx | [2017-08-29T09:08:52,931][WARN ][o.e.b.JNANatives ] Increase RLIMIT_MEMLOCK, soft limit: 65536, hard limit: 65536
elk_elasticsearch.1.a83hfcmmfma7@xxx | [2017-08-29T09:08:52,931][WARN ][o.e.b.JNANatives ] These can be adjusted by modifying /etc/security/limits.conf, for example:
elk_elasticsearch.1.a83hfcmmfma7@xxx | # allow user 'elasticsearch' mlockall
elk_elasticsearch.1.a83hfcmmfma7@xxx | elasticsearch soft memlock unlimited
elk_elasticsearch.1.a83hfcmmfma7@xxx | elasticsearch hard memlock unlimited
elk_elasticsearch.1.a83hfcmmfma7@xxx | [2017-08-29T09:08:52,931][WARN ][o.e.b.JNANatives ] If you are logged in interactively, you will have to re-login for the new limits to take effect.
Output of docker version:
Client:
Version: 17.05.0-ce
API version: 1.29
Go version: go1.7.5
Git commit: 89658be
Built: Thu May 4 22:10:54 2017
OS/Arch: linux/amd64
Server:
Version: 17.05.0-ce
API version: 1.29 (minimum version 1.12)
Go version: go1.7.5
Git commit: 89658be
Built: Thu May 4 22:10:54 2017
OS/Arch: linux/amd64
Experimental: false
Expected behavior
i'm trying to deploy an elastic service across swarm cluster using compose file.
docker-compose
starts elastic container normally, applying ulimits settings from .yml file.but
docker stack deploy
ignoresulimits
directive, so elasticsearch doesn't start at all..yml file is always the same, ether it
docker-compose
deploy ordocker stack
deployActual behavior
Steps to reproduce the behavior
elastic-compose-single.yml:
Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.)
docker host on vmware guest esxi 6
The text was updated successfully, but these errors were encountered: