Elasticsearch7 安装报错

博客主要记录了Elasticsearch的常见报错,如不能以root身份运行、用户线程数过低、虚拟内存区域配置不足、默认发现设置不适用于生产环境等,还给出单机版本需设置cluster.initial_master_nodes的解决建议。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

报错

can not run elasticsearch as root

groupadd genghua
useradd genghua -g genghua -p genghua
chown -R genghua:genghua elasticsearch-7.0.1
su genghua

报错

max number of threads [3894] for user [genghua] is too low, increase to at least [4096]

vim /etc/security/limits.conf

增加配置

*               soft    nproc           4096
*               hard    nproc           4096

在这里插入图片描述

报错

max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

vi /etc/sysctl.conf

在这里插入图片描述

报错

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
单机版本需要设置:

vim /usr/local/elasticsearch-7.0.1/config/elasticsearch.yml

cluster.initial_master_nodes: [“node-1”]

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值