我如何让弹性搜索5.6.3跨集群搜索工作

  • 本文关键字:搜索 工作 elasticsearch
  • 更新时间 :
  • 英文 :


我一直在使用elasticsearch/kibana 5.6.3。我需要启用跨集群搜索。我本可以在6.8.6版本中使用它,但后来发现我现在被旧版本卡住了(因为我们必须升级几十台使用旧版本fluentd发送数据的服务器(。文档中说要从控制台启用集群设置:

PUT _cluster/settings
{
"persistent": {
"cluster": {
"remote": {
"cluster-two": {
"seeds": ["localhost:9301"]
} 
}
}
}
}

生成以下错误消息:

{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "persistent setting [cluster.remote.cluster-two.seeds.0], not dynamically updateable"
}
],
"type": "illegal_argument_exception",
"reason": "persistent setting [cluster.remote.cluster-two.seeds.0], not dynamically updateable"
},
"status": 400
}

我的弹性搜索配置文件:

cluster.name: cluster
node.name: node-1
http.port: 9200
transport.tcp.port: 9300

远程集群:

cluster.name: remote-cluster
node.name: node-1
http.port: 9201
transport.tcp.port: 9301

我认为我的错误意味着我需要直接更新配置文件中的此属性。我在elasticsearch.yml中尝试了几个选项,但没有成功。知道我需要做什么更新才能让跨集群搜索工作吗?

不工作:

cluster.remote.cluster_two.seeds: ["127.0.0.1:9301"] 
cluster.remote.cluster_two.seeds: 127.0.0.1:9301 
cluster:
remote:
cluster_two: 
seeds: 127.0.0.1:9301

bleh。。。我想我在这里找到了它,但需要测试它是否有效。他们对yaml配置有不同的名称:

  • 5.6:search.remote.cluster_to.seeds
  • 6.8:cluster.remote.cluster_to.seeds

至少服务器现在启动了。此外,我可以在控制台中设置它而不会出错:

PUT _cluster/settings
{
"persistent": {
"search": {
"remote": {
"cluster_two": {
"seeds": ["localhost:9301"]
} 
}
}
}
}

最新更新