生产环境ES的一个持续转换(continuous transform)报错,问题排查

背景:有一天突然发现,业务统计的一个数据异常,遂立即排查原因,查看后发现一个mode是continuous 的transform是stop状态;日志如下

报错时间:2023-03-26 14:05:24

报错的节点:node-217

报错的详细日志:task encountered irrecoverable failure: ElasticsearchParseException[failed to parse date field [-9223372036854775808] with format [epoch_millis]: [failed to parse date field [-9223372036854775808] with format [epoch_millis]]]; nested: IllegalArgumentException[failed to parse date field [-9223372036854775808] with format [epoch_millis]]; nested: NotSerializableExceptionWrapper[date_time_parse_exception: Failed to parse with all enclosed parsers];; java.lang.IllegalArgumentException: failed to parse date field [-9223372036854775808] with format [epoch_millis]

初步分析:时间字段存入了值为-9223372036854775808的数据,导致时间解析失败,发生错误,导致transform stop!
问题排查:查看mysql原始数据未发现,类似错误数据,时间字段都是正常的。

继续排查得知:2023-03-26 xx云故障,mysql数据库挂了,导致售后和订单产生脏数据;导致transform失败。服务器故障恢复后,数据库脏数据被开发删除或修正。但是相关同事并未发现影响到持续转换的es transform。导致后续统计业务收到影响。
解决办法:立即 stop transform,start transform,相关统计业务数据展示正常。数据不是很多,几分钟即可自动处理完历史数据。

其他优化:由于transform异常停止后,无法自动恢复,需要重新手动重启才可从故障中恢复;因此可以考虑增加报警机制(失败则发送钉钉、微信消息提醒)。

posted @ 2024-01-16 18:10  下午喝什么茶  阅读(9)  评论(0编辑  收藏  举报