Hi.
I'm trying to run Elasticsearch in a Docker container using a docker-compose.
This is for non-production, so I'm trying to set the single node environment variable.
Even though I'm setting it in my docker-compose, I'm still getting an error because bootstrap checks are still being performed.
Here's my docker-compose:
version: "3"
services:
elasticsearch:
image: 'elasticsearch'
ports:
- '9200:9200'
- '9300:9300'
environment:
- bootstrap.memory_lock=true
- discovery.type=single-node
- "ES_JAVA_OPTS=-Xms2g -Xmx2g"
- cluster.routing.allocation.disk.threshold_enabled=false
ulimits:
memlock:
soft: -1
hard: -1
user: 'elasticsearch'
Here's the error I'm receiving:
elasticsearch_1 | {"type": "server", "timestamp": "2019-05-19T19:01:41,377+0000", "level": "INFO", "component": "o.e.b.BootstrapChecks", "cluster.name": "docker-cluster", "node.name": "1cb4ad6ee202", "message": "bound or publishing to a non-loopback address, enforcing bootstrap checks" }
elasticsearch_1 | ERROR: [3] bootstrap checks failed
elasticsearch_1 | [1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
elasticsearch_1 | [2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
elasticsearch_1 | [3]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
elasticsearch_1 | {"type": "server", "timestamp": "2019-05-19T19:01:41,386+0000", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "docker-cluster", "node.name": "1cb4ad6ee202", "message": "stopping ..." }
elasticsearch_1 | {"type": "server", "timestamp": "2019-05-19T19:01:41,400+0000", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "docker-cluster", "node.name": "1cb4ad6ee202", "message": "stopped" }
elasticsearch_1 | {"type": "server", "timestamp": "2019-05-19T19:01:41,400+0000", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "docker-cluster", "node.name": "1cb4ad6ee202", "message": "closing ..." }
elasticsearch_1 | {"type": "server", "timestamp": "2019-05-19T19:01:41,409+0000", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "docker-cluster", "node.name": "1cb4ad6ee202", "message": "closed" }
elasticsearch_1 | {"type": "server", "timestamp": "2019-05-19T19:01:41,412+0000", "level": "INFO", "component": "o.e.x.m.p.NativeController", "cluster.name": "docker-cluster", "node.name": "1cb4ad6ee202", "message": "Native controller process has stopped - no new native processes can be started" }
elasticsearch_elasticsearch_1 exited with code 78
Any suggestions would be appreciated.
Thanks.