kibana创建pipeline后对索引执行发现500报错
reason: “There are no ingest nodes in this cluster, unable to forward request to an ingest node”
这是说es8集群中缺少ingest角色节点
可以新增或者找一台数据节点添加”ingest”角色
#修改配置文件
cat /etc/elasticsearch/elasticsearch.yml | grep "node.roles"
node.roles: [ data, ingest ]
# 重启es节点
systemctl restart elasticsearch
对索引执行删除\修改时发现403报错
message: “blocked by: [FORBIDDEN/8/index write (api)];: [cluster_block_exception] blocked by: [FORBIDDEN/8/index write (api)];”
由于集群生命周期策略配置了日志索引在一段时间后转存到冷节点上, 索引配置中会添加上写锁
GET app_access_log*/_settings
{
"index.blocks.write": true
}
可以去掉index.blocks.write锁
PUT app_access_log*/_settings
{
"index.blocks.write": null
}
对索引执行删除\修改时发现409报错
message: “version conflict, required seqNo [xxxxx0], primary term [1]. current document has seqNo [xxxxx1] and primary term [xxxxx0]”
出现这个的原因主要是因为使用随机_id,es内的乐观锁造成的索引修改不够完全,导致版本号冲突, 可以在操作索引的时候加上wait_for_completion=false取消等待队列.
POST app_access_log*/_update_by_query?pipeline=logs-yunshu&wait_for_completion=false
{
"query": {
"match_all": {}
}
}
转载请注明来源, 欢迎对文章中的引用来源进行考证, 欢迎指出任何有错误或不够清晰的表达, 可以邮件至 chinaops666@gmail.com