居然是你

es 6.3 关闭分片自动分配报错

Elasticsearch | 作者 juin | 发布于2018年07月25日 | 阅读数:5734

版本:es 6.3
 
想要禁用分片分配:
PUT _cluster/settings
{
"persistent": {
"cluster": {
"routing": {
"allocation.enable": "none"
}
}
}
}
报错信息如下:

  "error": {
  "root_cause": [
  {
  "type": "illegal_argument_exception",
  "reason":"unknown setting [archive.xpack.monitoring.collection.enabled] did you mean [xpack.monitoring.collection.enabled]?"
  }
  ],
  "type": "illegal_argument_exception"
  "reason": "unknown setting [archive.xpack.monitoring.collection.enabled] did you mean [xpack.monitoring.collection.enabled]?"
  },
  "status": 400
 }
不知道哪里出了问题,哪位大佬指点我一下,感激不尽..
 
已邀请:

rochy - rochy_he

赞同来自: juin

试一下下面的语句

PUT _cluster/settings
{
"persistent": {
"archived.*": null
}
}

rochy - rochy_he

赞同来自:

以验证没有问题,看报错信息你应该是其他配置项写错了,请仔细检查一下
 
{
"persistent": {
"cluster": {
"routing": {
"allocation.enable": "none"
}
}
}
}

juin - 大数据开发

赞同来自:

我尝试获取了集群的设置
GET  _cluster/settings
得到这些信息
{
"persistent": {
"archived": {
"xpack": {
"monitoring": {
"collection": {
"enabled": true
}
}
}
}
},
"transient": {}
}
,然而在另一个集群上同样的操作获取到的是
{
"persistent": {
"cluster": {
"routing": {
"allocation": {
"enabled": "all"
}
}
}
},
"transient": {}
}
怎么才能更改成第二种状态

rochy - rochy_he

赞同来自:

直接请求即可
360截图-453977250.jpg

 

ddys

赞同来自:

报错不是已经提示你了么
"unknown setting [archive.xpack.monitoring.collection.enabled] did you mean [xpack.monitoring.collection.enabled]
使用xpack.monitoring.collection.enabled这个试试呗

要回复问题请先登录注册