通过程序添加一个任务让任务跑起来,然后睡眠几秒,之后关闭注册中心会发现程序依旧有在调用。
com.dangdang.ddframe.job.reg.exception.RegException: java.lang.IllegalStateException: instance must be started before calling this method
at com.dangdang.ddframe.job.reg.exception.RegExceptionHandler.handleException(RegExceptionHandler.java:49) ~[elastic-job-common-core-2.1.3.jar:na]
at com.dangdang.ddframe.job.reg.zookeeper.ZookeeperRegistryCenter.getDirectly(ZookeeperRegistryCenter.java:162) ~[elastic-job-common-core-2.1.3.jar:na]
at com.dangdang.ddframe.job.reg.zookeeper.ZookeeperRegistryCenter.get(ZookeeperRegistryCenter.java:143) ~[elastic-job-common-core-2.1.3.jar:na]
at com.dangdang.ddframe.job.lite.internal.storage.JobNodeStorage.getJobNodeData(JobNodeStorage.java:72) ~[elastic-job-lite-core-2.1.3.jar:na]
at com.dangdang.ddframe.job.lite.internal.config.ConfigurationService.load(ConfigurationService.java:54) ~[elastic-job-lite-core-2.1.3.jar:na]
at com.dangdang.ddframe.job.lite.internal.schedule.LiteJobFacade.loadJobRootConfiguration(LiteJobFacade.java:78) ~[elastic-job-lite-core-2.1.3.jar:na]
at com.dangdang.ddframe.job.lite.internal.schedule.LiteJobFacade.loadJobRootConfiguration(LiteJobFacade.java:49) ~[elastic-job-lite-core-2.1.3.jar:na]
at com.dangdang.ddframe.job.executor.AbstractElasticJobExecutor.<init>(AbstractElasticJobExecutor.java:65) ~[elastic-job-common-core-2.1.3.jar:na]
at com.dangdang.ddframe.job.executor.type.SimpleJobExecutor.<init>(SimpleJobExecutor.java:35) ~[elastic-job-common-core-2.1.3.jar:na]
at com.dangdang.ddframe.job.executor.JobExecutorFactory.getJobExecutor(JobExecutorFactory.java:51) ~[elastic-job-common-core-2.1.3.jar:na]
at com.dangdang.ddframe.job.lite.internal.schedule.LiteJob.execute(LiteJob.java:26) ~[elastic-job-lite-core-2.1.3.jar:na]
at org.quartz.core.JobRunShell.run(JobRunShell.java:202) ~[quartz-2.2.1.jar:na]
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) [quartz-2.2.1.jar:na]
Caused by: java.lang.IllegalStateException: instance must be started before calling this method
at com.google.common.base.Preconditions.checkState(Preconditions.java:173) ~[guava-18.0.jar:na]
at org.apache.curator.framework.imps.CuratorFrameworkImpl.getData(CuratorFrameworkImpl.java:375) ~[curator-framework-2.10.0.jar:na]
at com.dangdang.ddframe.job.reg.zookeeper.ZookeeperRegistryCenter.getDirectly(ZookeeperRegistryCenter.java:158) ~[elastic-job-common-core-2.1.3.jar:na]
... 11 common frames omitted
[ERROR] 2017-06-08 10:10:10,014 --9811a376-a79d-4aa5-8bba-04914b4767a7_Worker-1-- [org.quartz.core.ErrorLogger] Job (DEFAULT.9811a376-a79d-4aa5-8bba-04914b4767a7 threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception.
at org.quartz.core.JobRunShell.run(JobRunShell.java:213) ~[quartz-2.2.1.jar:na]
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) [quartz-2.2.1.jar:na]
楼主这个问题解决了吗?
楼主,4年了,解决了吗
楼主,5年了,解决了吗
只是关了zk的连接,并未关闭作业,作业不会停止调度。reg.close仅用于进程退出时回收资源。
楼主,6年了,解决了吗