Quartz集群调度出现的WARN警告问题

博客内容分析了Quartz集群调度中遇到的WARN警告问题,根源在于系统服务器时间不同步。当时间差超过7.5秒时,会导致JobStoreSupport的calcFailedIfAfter方法打印警告日志,并触发clusterRecover方法。解决此问题的方法是同步集群内所有服务器的时间。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1、报错内容如下:
在这里插入图片描述
具体描述如下图所示:

This scheduler instance xxxx is still active but was recovered by another instance in the cluster. This may cause inconsistent behavior.
ClusterManager detected 1 failed or restarted instances.

分析:
1、可以看到当前日志是由LocalDataSourceJobStore打印出来的,源码查看无日志信息,往父类和接口进行查找到JobStoreSupport,主要源码如下:

protected void clusterRecover(Connection conn, List<SchedulerStateRecord> failedInstances)
        throws JobPersistenceException {
   

        if (failedInstances.size() > 0) {
   

            long recoverIds = System.currentTimeMillis();

            logWarnIfNonZero(failedInstances.size(),
                    "ClusterManager: detected " + failedInstances.size()
                            + " failed or restarted instances.");
            
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值