0 序言
- Flink : 1.12
job start running time : 2022-12-27 17:40:47
problem throw time : 2023-05-11 16:41:29,394
flink cdc : mysql --> redis
在此之前,本flink cdc job運(yùn)行一切正常(功能正常、日志正常)
1 問題描述
2023-05-11 16:41:29,394 ERROR org.apache.flink.runtime.rest.handler.taskmanager.TaskManagerLogFileHandler [] - Failed to transfer file from TaskExecutor flink-231840-taskmanager-1-1-7a7b81ea-1cec-4fc6-88b3-e0983c42b824.
java.util.concurrent.CompletionException: org.apache.flink.util.FlinkException: The file LOG does not exist on the TaskExecutor.
at org.apache.flink.runtime.taskexecutor.TaskExecutor.lambda$requestFileUploadByFilePath$25(TaskExecutor.java:2031) ~[flink-dist_2.11-1.12.2-h0.cbu.dli.233.r4.jar:1.12.2-h0.cbu.dli.233.r4]
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1604) ~[?:1.8.0_322]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_322]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_322]
at java.lang.Thread.run(Thread.java:750) ~[?:1.8.0_322]
Caused by: org.apache.flink.util.FlinkException: The file LOG does not exist on the TaskExecutor.
... 5 more
2023-05-11 16:41:29,395 ERROR org.apache.flink.runtime.rest.handler.taskmanager.TaskManagerLogFileHandler [] - Unhandled exception.
org.apache.flink.util.FlinkException: The file LOG does not exist on the TaskExecutor.
at org.apache.flink.runtime.taskexecutor.TaskExecutor.lambda$requestFileUploadByFilePath$25(TaskExecutor.java:2031) ~[flink-dist_2.11-1.12.2-h0.cbu.dli.233.r4.jar:1.12.2-h0.cbu.dli.233.r4]
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1604) ~[?:1.8.0_322]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_322]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_322]
at java.lang.Thread.run(Thread.java:750) ~[?:1.8.0_322]
2023-05-11 16:41:39,026 INFO org.apache.flink.runtime.checkpoint.CheckpointCoordinator [] - Triggering checkpoint 192727 (type=CHECKPOINT) @ 1683794498517 for job e091d022d9992d5c17eac075507ff1a2.
2 原因分析
該報錯主要是找不到
STDOUT
文件,原因是程序中沒有sout
輸出,當(dāng)你去web-ui
點(diǎn)擊stdout
目錄,就會報一個這兒樣的接口請求錯誤,并不影響程序運(yùn)行,可忽略。
3 解決方法
- 方式1:不影響程序正常運(yùn)行,忽略此ERROR即可
目前博主的做法 (經(jīng)驗證,確實(shí)不影響程序功能正常運(yùn)行)
- 方式2:修改Flink源碼 (未驗證)
如果一定要修復(fù),提供以下方案:
1. 修復(fù)flink runtime源碼
2. 如果沒有sout輸出,不要隨便點(diǎn)擊查看 stdout 目錄
3. 隨便加一點(diǎn)sout輸出在程序里
- 方式3 修改日志參數(shù)配置(未驗證)
網(wǎng)友:發(fā)現(xiàn)
flink客戶端
提交的任務(wù),jobManager
中多了兩個日志相關(guān)參數(shù)
文章來源:http://www.zghlxwxcb.cn/news/detail-438960.html
$internal.deployment.config-dir
$internal.yarn.log-config-file
網(wǎng)友測驗:手動在程序中參考YarnLogConfigUtil.discoverLogConfigFile
方法設(shè)置$internal.yarn.log-config-file
參數(shù),最終日志成功出現(xiàn)!
文章來源地址http://www.zghlxwxcb.cn/news/detail-438960.html
X 參考文獻(xiàn)
- flink1.13報錯:The file STDOUT does not exist on the TaskExecutor - CSDN 【推薦】
- The file LOG/STDOUT is not available on the TaskExecutor - CSDN 【推薦】
- 【Flink】FlinkException The file LOG does not exist on the TaskExecutor - CSDN 【推薦/需付費(fèi)】
- 大佬們,遇到過這個錯嗎?org.apache.flink.util.FlinkException: - Aliyun
到了這里,關(guān)于[Flink] Flink Job運(yùn)行狀態(tài)正常,但日志中偶報“FlinkException: The file LOG does not exist on the TaskExecutor.”的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!