为什么Grails Quartz作业在生产几分钟后就消失了? [英] Why do grails Quartz jobs die after a few minutes on production?

查看:133
本文介绍了为什么Grails Quartz作业在生产几分钟后就消失了?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用grails Quartz插件(最新的稳定版本,0.4.2),我可以在开发环境中很好地运行四个不同的Jobs,其中大多数每分钟运行一次.

Using the grails Quartz plugin (latest stable version, 0.4.2), I have four different Jobs that run fine in my development environment, most of them every minute.

但是在生产环境中,它们运行了几分钟,然后死亡"-他们不再运行了.没有抛出异常或类似异常.该应用程序的其余部分仍然可以正常工作.

However in the production environment, they run for a few minutes and then "die" - they just don't run anymore. There is no Exception thrown or similar. The rest of the application still works fine.

有人知道这可能是什么原因吗?我应该在哪里/如何开始分析问题?

Does anybody have an idea what the reason for this could be? Where / How should I start analyzing the problem?

推荐答案

我还遇到了一个问题,使用了石英1.5.2.jar而不是石英插件中包含的石英1.7.3jar.我将其追溯到shiro中的一个依赖项,它本身包含了一个shiro-quartz.jar,它本身依赖于石英的确切版本.

I also ran into an issue with quartz-1.5.2.jar being used instead of the quartz-1.7.3.jar included in the quartz plugin. I traced it to a dependency in shiro, which itself includes a shiro-quartz.jar that itself has a dependency on that exact version of quartz.

我的解决方案是将其添加到我的BuildConfig.groovy:

My solution was to add this to my BuildConfig.groovy:

grails.project.dependency.resolution = {

    ...

    dependencies {
        compile("org.apache.shiro:shiro-quartz:1.0.0-incubating") {
            excludes("quartz")
        }
    }
}

如果不是shiro,请尝试运行grails dependency-report.从那里,您可以找到导致错误版本的石英的原因.

If it's not shiro, try running grails dependency-report. From there you can find out what is pulling in the wrong version of quartz.

这篇关于为什么Grails Quartz作业在生产几分钟后就消失了?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆