我运行elasticsearch 5.5.1-1和x-pack进行监控。
Elasticsearch的文档说,我应该能够将以下代码添加到我的elasticsearch.yml文件中,用于跨集群搜索播种:
search:
remote:
cluster_one:
seeds: 1.1.1.1:9300
cluster_two:
seeds: 2.2.2.2:9300这不起作用,所以我按如下方式使用了API:
PUT _cluster/settings
{
"persistent": {
"search": {
"remote": {
"cluster_one": {
"seeds": [
"1.1.1.1:9300"
]
},
"cluster_two": {
"seeds": [
"2.2.2.2:9300"
]
}
}
}
}
}它工作得很好,但是我需要删除cluster_one,直到它升级到5.5.1-1,根据elasticsearch的文档,它应该完成如下:
PUT _cluster/settings
{
"persistent": {
"search": {
"remote": {
"cluster_one": {
"seeds": null
}
}
}
}
}当我得到确认的时候,它似乎是这样的:
{
"acknowledged" : true,
"persistent" : { },
"transient" : { }
}但是,如果我卷曲集群设置,我仍然可以看到两个节点,如下所示:
{
"persistent" : {
"search" : {
"remote" : {
"cluster_one" : {
"seeds" : [
"1.1.1.1:9300"
]
},
"cluster_two" : {
"seeds" : [
"2.2.2.2:9300"
]
}
}
}
},
"transient" : { }
}我不认为我需要在API调用后重新启动elasticsearch,但我也没有尝试过。
我还尝试了引用/大写null,并得到了这条返回消息,它使我相信null是一个有效值:
{
"error" : {
"root_cause" : [
{
"type" : "json_parse_exception",
"reason" : "Unrecognized token 'NULL': was expecting 'null', 'true', 'false' or NaN\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@6053e99; line: 7, column: 25]"
}发布于 2017-10-23 19:28:08
在我的elasticsearch 5.5安装中,将'null‘放在方括号中:
PUT _cluster/settings
{
"persistent": {
"search": {
"remote": {
"cluster_one": {
"seeds": [
null
]
}
}
}
}
}https://stackoverflow.com/questions/45581311
复制相似问题