docker部署ES遇到的问题

在使用docker部署ES 集群时遇到了一些问题,自己记录一下

集群启动成功后有一个节点加入不了集群

failed to validate incoming join request from node Caused by: org.elasticsearch.cluster.coordination.CoordinationStateRejectedException: This node previously joined a cluster with UUID Kzs2RYf-Qe6Y5VWrtmSrQw and is now trying to join a different cluster with UUID eRJNKjZjRfCpXJZbavulUQ. This is forbidden and usually indicates an incorrect discovery or cluster bootstrapping configuration. Note that the cluster UUID persists across restarts and can only be changed by deleting the contents of the node's data paths \[\] which will also remove any data held by this node.

原因:推测是因为该节点之前启动过ES,已经创建了data文件夹,与要加入的集群冲突。

解决:因为该节点之前已经启动过,有历史数据没有清理,把该节点的data文件夹删了,再次启动就行

容器启动失败,Xpack问题(包括集群状态问题)

容器启动默认是以root用户启动的,需要注意权限问题,直接递归给相关目录授予权限

bash 复制代码
chmod -R 777 data

只开启一个节点的xpack功能,另一个节点不能加入改es集群,取消xpack功能,又可以加入,问题出现在哪里?

所有节点都要配置xpack

导入索引数据时,如果索引状态显示为红色(red),则需要安装IK分词插件解决(先安装ik分词再导入数据)

索引数据未成功显示时,先停止容器,删除nodes,重新导入数据

bash 复制代码
[root@elk-node3 elasticsearch2]# ls
conf  data  log  plugins
[root@elk-node3 elasticsearch2]# cd plugins/
[root@elk-node3 plugins]# ls
elasticsearch-analysis-ik-7.17.13
[root@elk-node3 plugins]# cd elasticsearch-analysis-ik-7.17.13/
[root@elk-node3 elasticsearch-analysis-ik-7.17.13]# ls
commons-codec-1.9.jar    config                                httpclient-4.5.2.jar  plugin-descriptor.properties
commons-logging-1.2.jar  elasticsearch-analysis-ik-7.16.3.jar  httpcore-4.4.4.jar    plugin-security.policy
相关推荐
Elasticsearch18 小时前
Elasticsearch ES|QL:现已支持视图、子查询和读取时模式定义
elasticsearch
Patrick_Wilson1 天前
从「改个端口」到 502:Next.js on k8s 的容器端口、Service 映射与 env 覆盖
docker·kubernetes·next.js
Suroy2 天前
DockerView-Go:用 Go 写一个终端 Docker 监控工具,顺便做了个 Web 仪表盘
docker
云恒要逆袭2 天前
运行你的第一个Docker容器
后端·docker·容器
宋均浩3 天前
# Docker 镜像瘦身实战:从 1.2G 到 80MB 的五个优化步骤
ci/cd·docker
程序员老赵3 天前
10 分钟部署 OpenCode:Docker 一键安装,浏览器打开就能用 AI 写代码(附完整命令与排错)
docker·容器·ai编程
Elasticsearch4 天前
Kibana 中的 SNMP 拓扑数据:从采集到 Canvas
elasticsearch
WangMingHua1114 天前
LM Studio Docker 部署——本地大模型一键启动
docker
曲幽5 天前
别再用网页翻译看源码了!你的私人翻译神器LibreTranslate,部署避坑指南来了
python·docker·web·pot·translate·libretranslate·arogstranslate