当前位置: 首页 > news >正文

elasticsearch报错fully-formed single-node cluster with cluster UUID

1.问题描述

k8s集群内部署的es中间件起不来,查看日志发现如下警告,节点发现功能开启,但是目前我是单节点服务,所以尝试编辑sts将节点发现功能去掉或者在部署时将你的sts的yaml文件和chart文件修改重新部署以去掉该功能

{"@timestamp":"2024-11-25T15:25:39.730Z", "log.level": "WARN", "message":"This node is a fully-formed single-node cluster with cluster UUID [CHfiZM08TKimVoEvLnfBbw], 
but it is configured as if to discover other nodes and form a multi-node cluster via the [discovery.seed_hosts=[elasticsearch-headless]] setting. 
Fully-formed clusters do not attempt to discover other nodes, and nodes with different cluster UUIDs cannot belong to the same cluster. 
The cluster UUID persists across restarts and can only be changed by deleting the contents of the node's data path(s). Remove the discovery configuration to suppress this message.", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"elasticsearch[elasticsearch-0][cluster_coordination]
[T#1]","log.logger":"org.elasticsearch.cluster.coordination.Coordinator","elasticsearch.cluster.uuid":"CHfiZM08TKimVoEvLnfBbw","elasticsearch.node.id":"1HTqcojWQxGciuVa71gb-g","elasticsearch.node.name":"elasticsearch-0","elasticsearch.cluster.name":"elasticsearch"}kubectl edit sts elasticsearch
#去掉以下部分
name: discovery.seed_hosts
value: elasticsearch-headless

2.修改后报错服务和集群uuid绑定,无法加入新集群

此时需要清除数据目录让其重新运行

注意:生产环境需慎重

{"@timestamp":"2024-11-26T09:50:06.905Z", "log.level": "WARN", "message":"this node is locked into cluster UUID [xxx] 
but [cluster.initial_master_nodes] is set to [elasticsearch-0]; remove this setting to avoid possible data loss caused by subsequent cluster bootstrap attempts; 
for further information see https://www.elastic.co/guide/en/elasticsearch/reference/8.11/important-settings.html#initial_master_nodes", "ecs.version": 
"1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main",
"log.logger":"org.elasticsearch.cluster.coordination.ClusterBootstrapService","elasticsearch.node.name":"elasticsearch-0","elasticsearch.cluster.name":"elasticsearch"}

3.若有重要数据需要备份数据目录

#删除前请按需备份数据
kubectl scale --replicas=0 sts elasticsearch
kubectl delete pvc elasticsearch-elasticsearch-0
kubectl scale --replicas=1 sts elasticsearch

4.等待pod重建后已正常

http://www.lryc.cn/news/495138.html

相关文章:

  • Milvus×Florence:一文读懂如何构建多任务视觉模型
  • DAPP
  • 生产环境中,nginx 最多可以代理多少台服务器,这个应该考虑哪些参数 ?怎么计算呢
  • 【深度学习|目标跟踪】StrongSORT 详解(以及StrongSORT++)
  • 23种设计模式-原型(Prototype)设计模式
  • Qt—QLineEdit 使用总结
  • go-zero使用自定义模板实现统一格式的 body 响应
  • BUGKU printf
  • 深度学习:梯度下降法
  • `console.log`调试完全指南
  • ROS VSCode调试方法
  • 16 —— Webpack多页面打包
  • 微服务即时通讯系统的实现(服务端)----(3)
  • .net6.0 mvc 传递 model 实体参数(无法对 null 引用执行运行时绑定)
  • VUE 入门级教程:开启 Vue.js 编程之旅
  • Ubantu系统docker运行成功拉取失败【成功解决】
  • mvn-mac操作小记
  • 机器学习——生成对抗网络(GANs):原理、进展与应用前景分析
  • 「Mac畅玩鸿蒙与硬件33」UI互动应用篇10 - 数字猜谜游戏
  • Ps:存储 Adobe PDF
  • DDR3保姆级使用教程:ZYNQ 7010
  • OpenCV 模板匹配全解析:从单模板到多模板的实战指南
  • 【JAVA] 杂谈: java中的拷贝(克隆方法)
  • 使用 PDF API 合并 PDF 文件
  • 关于BeanUtils.copyProperties是否能正常复制字段【详细版】
  • 爬虫框架快速入门——Scrapy
  • 鸿蒙开发-HMS Kit能力集(应用内支付、推送服务)
  • TYUT设计模式大题
  • Webman中实现定时任务
  • 《以 C++破局:人工智能系统可解释性的探索与实现》