使用2个节点启动Elasticsearch服务

 ub皓祉 发布于 2023-01-31 18:04

我尝试在具有2个节点的群集中启动弹性搜索:我运行命令:

service elasticsearch start

然后我运行2个elasticsearch实例,以便通过命令加入集群:

/bin/elasticsearch 

但是当我检查head_plugin时:localhost:2900/_plugin/head/我得到群集健康状态为黄色,并且节点没有加入群集
如何配置这两个节点以使它们加入群集?谢谢 编辑: 这就是我得到的:

root@vmi17663:~# curl -XGET 'http://localhost:9200/_cluster/nodes?pretty=true'
{
  "ok" : true,
  "cluster_name" : "nearCluster",
  "nodes" : {
    "aHUjm3SjQa6MbRoWCnL4pQ" : {
      "name" : "Primary node",
      "transport_address" : "inet[/ip@dress:9300]",
      "hostname" : "HOSTNAME",
      "version" : "0.90.5",
      "http_address" : "inet[/ip@dress:9200]"
    }
  }
}root@vmi17663:~# curl -XGET 'http://localhost:9201/_cluster/nodes?pretty=true'
{
  "ok" : true,
  "cluster_name" : "nearCluster",
  "nodes" : {
    "pz7dfIABSbKRc92xYCbtgQ" : {
      "name" : "Second Node",
      "transport_address" : "inet[/ip@dress:9301]",
      "hostname" : "HOSTNAME",
      "version" : "0.90.5",
      "http_address" : "inet[/ip@dress:9201]"
    }
  }

Sekai.. 5

我做到了!正如预期的那样iptables问题我添加了这个规则

-A INPUT -m pkttype --pkt-type multicast -j ACCEPT

一切顺利

撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有