一、注意elasticsearch不支持root用户启动
报错
Caused by: java.lang.RuntimeException: can not run elasticsearch as root
解决
groupadd es
//添加用户组
useradd es -g es
//添加用户到用户组
passwd es
//密码
chown -R es:es /usr/local/elasticsearch/
//给es赋权
su es
//进入es用户
./elasticsearch
//在启动
二、max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
解决
vim /etc/sysctl.conf
//编辑
vm.max_map_count = 262144
//在最低下添加
sysctl -p
//生效
三、elasticsearch.yml配置原因报错
示例:
# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
# Before you set out to tweak and tune the configuration, make sure you
# understand what are you trying to accomplish and the consequences.
#
# The primary way of confi

本文介绍了Elasticsearch部署中常见的问题及解决方案,包括避免使用root用户启动、调整系统内存映射参数,以及配置文件elasticsearch.yml的具体设置,确保集群稳定运行。
最低0.47元/天 解锁文章
5008

被折叠的 条评论
为什么被折叠?



