1、启动容器 elasticsearch
docker run -e ES_JAVA_OPTS="-Xms256m -Xmx256m" -d -p 9200:9200 -p 9300:9300 --name m-es 6adeafaff184
2、查看容器运行情况,容器未启动成功
[root@localhost ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
aa9d265fd652 6adeafaff184 "/bin/tini -- /usr..." 14 minutes ago Exited (78) 13 minutes ago m-es
3、查看容器启动日志
[root@localhost ~]# docker logs m-es
报错提示:
1)max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
2)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文章来源:https://www.toymoban.com/news/detail-777444.html
4、解决方案
1) 修改参数 vm.max_map_count
[root@localhost ~]# sysctl -a|grep vm.max_map_count
vm.max_map_count = 65530
[root@localhost ~]# sysctl -w vm.max_map_count=262144
vm.max_map_count = 262144
[root@localhost ~]# sysctl -a|grep vm.max_map_count
vm.max_map_count = 262144
2)如果重启虚拟机 1)失效则在 /etc/sysctl.conf文件最后添加一行(永久修改)
vm.max_map_count=262144文章来源地址https://www.toymoban.com/news/detail-777444.html
到了这里,关于ES启动报错:max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!