wordpress防黑網(wǎng)站優(yōu)化seo
這個問題排除了很久,其中更換了Flink版本,也更換了Hadoop版本一直無法解決,JobManager跑著跑著就異常退出了。資源管理器上是提示運行結束,運行狀態(tài)是被Kill掉。
網(wǎng)上搜了一圈,都說內存不足、資源不足,配置錯誤。但是報錯非常不明顯。
最后終于看到了一條警告日志。
是客戶端與jobmanager心跳超時,協(xié)商退出的jobmanager。后面就開始取消任務,回收資源逐步退出。除了這條關鍵退出日志,就沒有明顯的報錯了。
2024-10-24 17:41:15,073 WARN org.apache.flink.runtime.dispatcher.MiniDispatcher [] - The heartbeat from the job client is timeout and cancel the job cc0f9dcadc79ee561632518539baf513. You can adjust the heartbeat interval by 'client.heartbeat.interval' and the timeout by 'client.heartbeat.timeout'
?其實提交Flink on Yarn的Pro-Job程序,從開始到結束都有心跳異常的錯誤。最后超過默認的超時時間180s就開始協(xié)商退出了,所以程序每次跑3分鐘后就開始退出了。
2024-10-24 17:40:15,725 ERROR org.apache.flink.runtime.rest.handler.job.JobClientHeartbeatHandler [] - Exception occurred in REST handler: Request did not match expected format JobClientHeartbeatRequestBody.
?只在yarn-per-job與yarn-application模式下會觸發(fā),session模式下不會。因為session模式是一直存在jobmanager,他會接受任何客戶端的任務。不需要用完就釋放資源。
Flink 1.13.1、Flink1.15.2、Flink1.16.3都不存在以上問題
但是1.17.1和1.18.1、1.20都存在該問題。應該是1.17以上都存在
某大神說的1.17引入新的心跳機制:
The issue you're encountering is related to a new heartbeat mechanism between the client and job in Flink-1.17. If the job does not receive any heartbeats from the client within a specific timeout, it will cancel itself to avoid hanging indefinitely.To address this, you have two options: 1. Run your job in detached mode by adding the -d option in your command line 2. Increase the client heartbeat timeout setting to a larger value, the default value is 180 seconds
解決辦法總結了下,大概三種
1、用舊點的Flink版本:例如Flink1.16.3以下;
2、分離模式,加 -d參數(shù);
3、增加心跳超時時間;這個其實無法根本解決;?
新版本還是多坑,其實很有一個可能flink1.17開始去除java代碼,導致的bug問題