我尝试在具有2个节点的群集中启动弹性搜索:我运行命令:
service elasticsearch start
Run Code Online (Sandbox Code Playgroud)
然后我运行2个elasticsearch实例,以便通过命令加入集群:
/bin/elasticsearch
Run Code Online (Sandbox Code Playgroud)
但是当我检查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]"
}
}
Run Code Online (Sandbox Code Playgroud)
我做到了!正如预期的那样iptables问题我添加了这个规则
-A INPUT -m pkttype --pkt-type multicast -j ACCEPT
Run Code Online (Sandbox Code Playgroud)
一切顺利
归档时间: |
|
查看次数: |
5002 次 |
最近记录: |