【問題解決】This scheduler instance is still active but was recovered by another instance in the cluster.

報錯信息

WARN org.quartz.impl.jdbcjobstore.JobStoreSupport.findFailedInstances(JobStoreSupport.java:3396) This scheduler instance (XXX) is still active but was recovered by another instance in the cluster. This may cause inconsistent behavior.

產生原因

使用Quartz時集羣下的各機器時間不同步,在相同的數據庫(集羣)下,存在另外一個相同的應用(可能是測試或其他開發環境)已經在執行該定時任務,Quartz爲保證數據一致性,後啓動的定時任務不會執行。

解決方案

關掉另外一個地方的定時任務,重啓當前應用。

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