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