ElasticSearch在安装完x-pack后,
存在客户端通过Transport访问ES出现异常:java.lang.IllegalArgumentException: Unknown NamedWriteable [org.elasticsearch.cluster.metadata.MetaData$Custom][ml]
具体异常可参考:
https://discuss.elastic.co/t/bulk-indexing-with-x-pack-exception/92086
https://github.com/elastic/elasticsearch/issues/25564
x-pack相关配置可以通过如下命令进行查询:
curl localhost:9200/.monitoring*/_search?pretty | grep "ml.enabled"
并且需要修改ES和Kibana的配置,增加如下配置项:
xpack.ml.enabled: false
xpack.security.enabled: false
修改完后,把ES和Kibana服务都进行重启
然后将ES中的.monitoring*的索引都删除掉,让x-pack自动重新创建
再通过命令查询则没有返回结果了,ml.enabled的配置确认就改掉了
curl localhost:9200/.monitoring*/_search?pretty | grep "ml.enabled"
注:kibana的ml.enabled属性默认是true的。
https://www.elastic.co/guide/en/x-pack/6.0/xpack-settings.html
转载于:https://www.cnblogs.com/willdoop/p/9835926.html