Elasticsearch 写入失败的原因很多,通常需要结合错误日志 / 返回信息来判断。下面按常见原因 → 表现 → 排查方式系统说明。
cluster_block_exceptionindex read-only / allow deleteGET _cluster/health
GET _cat/allocation?v
cluster.routing.allocation.disk.watermark.low: 85%
cluster.routing.allocation.disk.watermark.high: 90%
index [xxx] blocked by: [FORBIDDEN/12/index read-only / allow delete]
PUT _all/_settings
{
"index.blocks.read_only_allow_delete": null
}
age: integerage: "18"(字符串)mapper_parsing_exception
ignore_malformedillegal_argument_exception
limit of total fields [1000] has been exceeded
PUT index/_settings
{
"index.mapping.total_fields.limit": 2000
}
errors: truePOST _bulk
{ "index": { "_index": "test" } }
{ "field": "value" }
看 items[].status
routing 但分片计算失败http.max_content_lengthsecurity_exception
write / bulk)GET _nodes/stats/thread_pool
es_rejected_execution_exception
GET _cluster/healthGET _cat/indices?v如果你愿意,可以把具体的报错信息或写入方式(curl / Java / Logstash / Filebeat)发出来,我可以直接帮你定位是哪一类问题。
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。