这里填写标题
- 1. elasticsearch 使用
-
- 1.1. elasticsearch 启动报错解决
-
- 1.1.1. `max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]`
- 1.1.2. 无法通过外部 ip 访问 elasticsearch
- 1.1.3. `ERROR: [1] bootstrap checks failed [1]: 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`
- 1.1.4. `ERROR: [1] bootstrap checks failed [1]: 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`
- 1.1.5. `ERROR: bootstrap checks failed memory locking requested for elasticsearch process but memory is not locked`
- 1.1.6. docker 版本的数据目录与日志目录持载到本地无法启动, 提示 `Permission Denied`
- 1.2. 限制 elasticsearch 使用的内存容量
1. elasticsearch 使用
1.1. elasticsearch 启动报错解决
1.1.1. max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
临时解决办法: 切换 root 用户执行如下命令
sysctl -w vm.max_map_count=262144
永久解决办法: 在 /etc/sysctl.conf
文件最后添加一行
echo "vm.max_map_count=262144" >> /etc/sysctl.conf
sysctl -p #使修改立即生效
查看修改结果:
sysctl -a|grep vm.max_map_count
显示:
vm.max_map_count = 262144
1.1.2. 无法通过外部 ip 访问 elasticsearch
<