Reputation: 17566
I received a modified docker-compose.yml file during the last git pull. A colleague added elasticSerach to the docker-compose.
It works for her and not for me. I can start the container with docker-compose up
and get it running. But as soon as I want to sync elastic search, the container kills itself. I then looked at the container log and got several error messages. Can someone help me to fix these errors?
Maybe an important hint. My colleague works on a Mac and uses Docker Desktop and I work on a Linux system and only use the command line.
{"log":"{\"type\": \"server\", \"timestamp\": \"2022-01-27T08:31:28,148Z\", \"level\": \"INFO\", \"component\": \"o.e.x.s.c.f.PersistentCache\", \"cluster.name\": \"es-docker-cluster\", \"node.name\": \"es01\", \"message\": \"persistent cache index loaded\" }\n","stream":"stdout","time":"2022-01-27T08:31:28.148417236Z"}
{"log":"{\"type\": \"server\", \"timestamp\": \"2022-01-27T08:31:28,148Z\", \"level\": \"INFO\", \"component\": \"o.e.x.d.l.DeprecationIndexingComponent\", \"cluster.name\": \"es-docker-cluster\", \"node.name\": \"es01\", \"message\": \"deprecation component started\" }\n","stream":"stdout","time":"2022-01-27T08:31:28.148994292Z"}
{"log":"{\"type\": \"server\", \"timestamp\": \"2022-01-27T08:31:28,242Z\", \"level\": \"INFO\", \"component\": \"o.e.t.TransportService\", \"cluster.name\": \"es-docker-cluster\", \"node.name\": \"es01\", \"message\": \"publish_address {17x.2x.x.x:9300}, bound_addresses {0.0.0.0:9300}\" }\n","stream":"stdout","time":"2022-01-27T08:31:28.242811316Z"}
{"log":"{\"type\": \"server\", \"timestamp\": \"2022-01-27T08:31:28,355Z\", \"level\": \"INFO\", \"component\": \"o.e.b.BootstrapChecks\", \"cluster.name\": \"es-docker-cluster\", \"node.name\": \"es01\", \"message\": \"bound or publishing to a non-loopback address, enforcing bootstrap checks\" }\n","stream":"stdout","time":"2022-01-27T08:31:28.355514869Z"}
{"log":"\n","stream":"stderr","time":"2022-01-27T08:31:28.363280214Z"}
{"log":"ERROR: [1] bootstrap checks failed. You must address the points described in the following [1] lines before starting Elasticsearch.\n","stream":"stderr","time":"2022-01-27T08:31:28.363310562Z"}
{"log":"bootstrap check failure [1] of [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]\n","stream":"stderr","time":"2022-01-27T08:31:28.363318535Z"}
{"log":"ERROR: Elasticsearch did not exit normally - check the logs at /usr/share/elasticsearch/logs/es-docker-cluster.log\n","stream":"stderr","time":"2022-01-27T08:31:28.363326669Z"}
{"log":"{\"type\": \"server\", \"timestamp\": \"2022-01-27T08:31:28,364Z\", \"level\": \"INFO\", \"component\": \"o.e.n.Node\", \"cluster.name\": \"es-docker-cluster\", \"node.name\": \"es01\", \"message\": \"stopping ...\" }\n","stream":"stdout","time":"2022-01-27T08:31:28.364606976Z"}
{"log":"{\"type\": \"server\", \"timestamp\": \"2022-01-27T08:31:28,396Z\", \"level\": \"INFO\", \"component\": \"o.e.n.Node\", \"cluster.name\": \"es-docker-cluster\", \"node.name\": \"es01\", \"message\": \"stopped\" }\n","stream":"stdout","time":"2022-01-27T08:31:28.3965249Z"}
{"log":"{\"type\": \"server\", \"timestamp\": \"2022-01-27T08:31:28,396Z\", \"level\": \"INFO\", \"component\": \"o.e.n.Node\", \"cluster.name\": \"es-docker-cluster\", \"node.name\": \"es01\", \"message\": \"closing ...\" }\n","stream":"stdout","time":"2022-01-27T08:31:28.396754682Z"}
{"log":"{\"type\": \"server\", \"timestamp\": \"2022-01-27T08:31:28,407Z\", \"level\": \"INFO\", \"component\": \"o.e.n.Node\", \"cluster.name\": \"es-docker-cluster\", \"node.name\": \"es01\", \"message\": \"closed\" }\n","stream":"stdout","time":"2022-01-27T08:31:28.407816795Z"}
{"log":"{\"type\": \"server\", \"timestamp\": \"2022-01-27T08:31:28,409Z\", \"level\": \"INFO\", \"component\": \"o.e.x.m.p.NativeController\", \"cluster.name\": \"es-docker-cluster\", \"node.name\": \"es01\", \"message\": \"Native controller process has stopped - no new native processes can be started\" }\n","stream":"stdout","time":"2022-01-27T08:31:28.409846634Z"}
Upvotes: 3
Views: 1862
Reputation: 484
The error and it's resolution is already mentioned in the stack trace.
{"log":"bootstrap check failure [1] of [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]\n","stream":"stderr","time":"2022-01-27T08:31:28.363318535Z"}
The virtual memory available for a docker process is set to a lower limit than what elasticsearch is requesting for. So you need to increase this limit. Specifically, increase the limit of vm.max_map_count
to 262144 (going by suggestion in stack trace)
For Mac - You can find ways to do it here.
For Linux - sysctl -w vm.max_map_count=262144
Upvotes: 3