项目场景:

最近实时平台flink任务频繁失败,报检查点方面的错误,最近集群的hdfs也经常报警:运行状况不良,不知道是否和该情况有关,我的状态后端位置是hdfs,废话不多说,干货搞起来~


问题描述

日志中报错如下:

2022-07-16 06:26:46,566 INFO  org.apache.flink.runtime.checkpoint.CheckpointCoordinator    [] - Checkpoint 670223 of job 61103d713243c4a71befb436fa3f32ee expired before completing.
2022-07-16 06:26:46,571 INFO  org.apache.flink.runtime.jobmaster.JobMaster                 [] - Trying to recover from a global failure.
org.apache.flink.util.FlinkRuntimeException: Exceeded checkpoint tolerable failure threshold.at org.apache.flink.runtime.checkpoint.CheckpointFailureManager.handleCheckpointException(CheckpointFailureManager.java:98) ~[flink-dist_2.11-1.13.1.jar:1.13.1]at org.apache.flink.runtime.checkpoint.CheckpointFailureManager.handleJobLevelCheckpointException(CheckpointFailureManager.java:67) ~[flink-dist_2.11-1.13.1.jar:1.13.1]at org.apache.flink.runtime.checkpoint.CheckpointCoordinator.abortPendingCheckpoint(CheckpointCoordinator.java:1934) ~[flink-dist_2.11-1.13.1.jar:1.13.1]at org.apache.flink.runtime.checkpoint.CheckpointCoordinator.abortPendingCheckpoint(CheckpointCoordinator.java:1906) ~[flink-dist_2.11-1.13.1.jar:1.13.1]at org.apache.flink.runtime.checkpoint.CheckpointCoordinator.access$600(CheckpointCoordinator.java:96) ~[flink-dist_2.11-1.13.1.jar:1.13.1]at org.apache.flink.runtime.checkpoint.CheckpointCoordinator$CheckpointCanceller.run(CheckpointCoordinator.java:1990) ~[flink-dist_2.11-1.13.1.jar:1.13.1]at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_201]at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_201]at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) ~[?:1.8.0_201]at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[?:1.8.0_201]at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_201]at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_201]at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_201]

注意:

在报Exceeded checkpoint tolerable failure threshold.错误的之前,是先报的是Checkpoint expired before completing.大概意思是检查点在完成前过期了。


解决方案:

这个错误也是头一次见,更让我好奇的是报这个错误的时间点大概差不多(每两天大概报一次,早晨6点多)。

最开始调整了检查点的频率(5s -> 10s)和任务重启间隔(5s -> 30s),以为频率太快了,但调整后并没能解决该问题。
后来又将jobmanager和taskmanager运行内存调大,但也没能解决…

通过查找flink检查点相关配置,发现了配置项TolerableCheckpointFailureNumber即可容忍检查点失败次数的配置,默认值为0表示不允许容忍任何检查点失败。
报的错就是超过检查点可容忍失败阈值,试试观察观察再说,因此在程序里加上了这个配置。

//设置可容忍的检查点失败数,默认值为0表示不允许容忍任何检查点失败
env.getCheckpointConfig().setTolerableCheckpointFailureNumber(2);

配置说明:

限制的是最大可容忍的连续失败checkpoint计数 continuousFailureCounter,例如将tolerableCheckpointFailureNumber设置成3,连续失败3次,continuousFailureCounter会累计到3,作业就会尝试重启。如果中间有一个checkpoint成功了,continuousFailureCounter 就会重置为零。


按之前的规律第二天任务就得报这个错误失败了,查看flink任务web界面,任务正常,但检查点确实失败过一次,也是大概那个时间失败的,失败原因和之前一样Checkpoint expired before completing.

说明该配置对报错的解决有效,问题解决!!!


记得点赞收藏奥,后续遇到问题会持续更新,关注不迷路~

Flink任务失败,检查点失效:Exceeded checkpoint tolerable failure threshold.相关推荐

  1. flink 出现反压场景, 异常场景造成Exceeded checkpoint tolerable failure threshold.

    flink 出现反压场景,异常场景造成Exceeded checkpoint tolerable failure threshold. 监控反压情况 根据算子的InPool, OutPool 的比例, ...

  2. Flink报错:org.apache.flink.util.FlinkRuntimeException: Exceeded checkpoint tolerable failure threshold

    org.apache.flink.util.FlinkRuntimeException: Exceeded checkpoint tolerable failure threshold 一.问题描述 ...

  3. org.apache.flink.util.FlinkRuntimeException: Exceeded checkpoint tolerable failure threshold

    org.apache.flink.util.FlinkRuntimeException: Exceeded checkpoint tolerable failure threshold. 原因 Che ...

  4. [Flink 日记]Exceeded checkpoint tolerable failure threshold.

    org.apache.flink.util.FlinkRuntimeException: Exceeded checkpoint tolerable failure threshold. 原因 Che ...

  5. 【Flink】Flink Exceeded checkpoint tolerable failure threshold

    文章目录 1.概述 2.源码 2.1 源码解析 2.2 小结 3.场景2 1.概述 Flink程序,如果单平行度运行是正常的,多并行度运行时有一个subtask的数据量很少,写kafka的数据为0,在 ...

  6. flink sql 报错:FlinkRuntimeException: Exceeded checkpoint tolerable failure threshold

    当出现这种错误时,原因一般是启动任务时,所给的资源不够. 可以调整 streamx 界面上的并行度.task的内存调大. 然后重启任务看下是否能行.

  7. Exceeded checkpoint tolerable failure threshould【记一次flink上线异常】

    最近完成一个业务需求,flink程序上线之后,跑了不到一分钟就挂了,查看日志,报错如下: org.apache.flink.util.FlinkRuntimeException: Exceeded c ...

  8. flink程序:Exceeded checkpoint tolerable failure threshould

    @[TOC]Exceeded checkpoint tolerable failure threshould 在写一个flink程序时报错, Exceeded checkpoint tolerable ...

  9. 【Flink】Flink检查点时间太小导致Exceeded checkpoint tolerable failure threshould

    文章目录 1.背景 2.场景2 1.背景 写了一个flink程序,大概如下 @Testpublic void flatMapStateBackendTest() throws Exception {S ...

最新文章

  1. 资料分享:送你一本《机器学习实战》电子书!
  2. 【Android 进程保活】提升进程优先级 ( 1 像素 Activity 提高进程优先级 | taskAffinity 亲和性说明 | 运行效果 | 源码资源 )
  3. js 操作select和option
  4. 营销心理学:如何挣女人的钱?
  5. 课程作业01——从命令行接收多个数字,求和之后输出结果
  6. 【Luogu1048】采药
  7. python 之图片转字符画
  8. hibernate的环境配置
  9. 微信【PC电脑版】消息提示音怎么还原
  10. 【论文】(COPRA)Finding overlapping communities in networks by label propagation
  11. leetcode题解日练--2016.8.6
  12. luoguP1357 花园
  13. mysql远程主机强迫关闭了_channal经常关闭
  14. (python热门库之)PyQt5常用代码
  15. 更改Google Chrome 用户文件存储目录User Data 最简单方法
  16. 怎么免费制作logo?logo免费设计在线生成,从此设计不求人
  17. 联想拯救者y7000p加内存条_联想 拯救者Y7000P 怎么升级内存?
  18. pacemaker+nginx+iscsi实现的nginx服务远程储存高可用
  19. 短网址短链接哪个好用?2021年最好的缩短链接短网址推荐
  20. 研究生论文写作和发表建议

热门文章

  1. 【推荐】搭建你的免费 R 云端服务器
  2. 区块链的概念定义是什么
  3. Python爬虫实战 | 利用多线程爬取 LOL 高清壁纸
  4. 松原计算机等级考试试题,2019年上半年吉林省松原市计算机等级考试注意事项...
  5. 与Lucene 4.10配合的中文分词比较
  6. 去中心化和p2p网络以及中心化为核心的传统通信
  7. 企业如何数据集成?数据集成解决方案
  8. easyUI easyui-datagrid (良好习惯:onClickRow,onSelect 都写上,事件同步)
  9. Eclipse4.6(neno)配置Tomcat插件的两种方式
  10. 知乎:月薪 2~3 万,码农的一天是怎么过的?