# 从节点 192.168.1.32
vim /etc/elasticsearch/elasticsearch.yml
# 修改以下几项# 其他项配置与1.31配置相同
node.name: node-32
启动 参数-d为后台运行(测试通过后 可加上此参数)
su elastic
/usr/share/elasticsearch/bin/elasticsearch -d
可能遇到的错误
ERROR: [4] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
[2]: max number of threads [1024] for user [elastic] is too low, increase to at least [4096]
[3]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[4]: system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk
# 解决
1. 首先切换到root身份
2. 针对 问题[1]
vim /etc/security/limits.conf
# 添加以下内容:
* soft nofile 65536
* hard nofile 131072
* soft nproc 2048
* hard nproc 4096
3. 针对 问题[2]
vim /etc/security/limits.d/90-nproc.conf
修改"* soft nproc 1024"为"* soft nproc 4096"
4. 针对 问题[3]
# 编辑
vim /etc/sysctl.conf
#添加如下内容:
vm.max_map_count=655360
# 执行
sysctl -p
5. 针对 问题[4]
编辑 /etc/elasticsearch/elasticsearch.yml, Memory下修改:
bootstrap.memory_lock: false
bootstrap.system_call_filter: false