Flink各種報錯彙總及解決方法

這篇文章主要用來記錄一下Flink中的常見的報錯以及解決方案(以後會持續更新)

1,Table is not an append-only table. Use the toRetractStream() in order to handle add and retract messages.

這個是因爲動態表不是append-only模式的,需要用toRetractStream(回撤流)處理就好了.

tableEnv.toRetractStream[Person](result).print()

2.今天在啓動Flink任務的時候報錯Caused by: java.lang.RuntimeException: Couldn't deploy Yarn cluster,然後仔細看發現裏面有這麼一句話system times on machines may be out of sync,意思說是機器上的系統時間可能不同步.

(1)安裝ntpdate工具

yum -y install ntp ntpdate

(2)設置系統時間與網絡時間同步

ntpdate cn.pool.ntp.org

在三臺機器上分別執行完這個,在啓動任務,發現可以了.

3.Could not retrieve the redirect address of the current leader. Please try to refresh,Flink任務在運行了一段時間後,進程還在但是刷新UI界面提示報錯,你把這個job殺掉,重新啓動,還是會報這個錯.

解決方法是把這個目錄下的文件刪除,重啓就可以了

high-availability.zookeeper.path.root: /flink

ZooKeeper節點根目錄,其下放置所有集羣節點的namespa

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章