Justin,
if you want to have a look at the details, just open the issues the
Marco mentioned below and check the linked commits on the 2_0_X branch.
The idea behind such changes is to fix the Quartz configuration and
setup in Syncope, rather than specifically adjusting one of the various
Quartz jobs run by Syncope, e.g. AfterHandlingJob
Regards.
On 17/04/19 23:24, Isenhour, Justin wrote:
Marco,
We will add the upgrade to latest version to our road map but what
options would we have now on our current version? Also, I looked at
the code for 2.0.12 and it looks like the AfterHandlingJob is still
creating a new bean for each job and adding it to the Application
Context and the AutowiringSpringBeanJobFactory is looking in App
Context for a bean matching the job name. Wouldn’t this version still
have this same problem or is there additional code added somewhere
else to make this work?
*From:*Marco Di Sabatino Di Diodoro [mailto:[email protected]]
*Sent:* Wednesday, April 17, 2019 4:29 AM
*To:* [email protected]; Isenhour, Justin
<[email protected]>
*Subject:* [Ext] Re: AfterHandlingJob fails in clustered environment
Hi Justin
Il 17/04/19 03:21, justin.isenhour ha scritto:
Hello,
We are currently running v2.0.6 in a clustered environment and have noticed
that some notifications are not being generated when we bulk create users
related to a migration effort from a legacy system. The error we are
getting in the logs is listed below. Based on the code that I have reviewed
it looks like when the AfterHandlingJob is scheduled that a new bean is
created and added to the ApplicationContext of that server instance and then
when the Quartz job is run the SpringBeanJobFactory tries to find that bean
in the Application Context of the server running the job. It looks like a
situation where the Job is initially being created on server A and the run
from server B which doesn't have the job bean. I have reviewed the document
on setting up Syncope with High Availability and the only thing mentioned
there really is setting up second level caching for OpenJPA, which we have
configured. Is there something else that we have missed in our clustering
configuration?
There were several fixes on Syncope for quartz after 2.0.6:
SYNCOPE-1285 [1]
SYNCOPE-1244 [2]
SYNCOPE-1103 [3]
I suggest to upgrade to the latest stable version of Syncope 2_0_X,
following the guide that you can find here [4].
Regards
M
[1] https://issues.apache.org/jira/browse/SYNCOPE-1285
<https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FSYNCOPE-1285&data=02%7C01%7Cjustin.isenhour%40compass-usa.com%7C7dff469df310406c067808d6c30ec555%7Ccd62b7dd4b4844bd90e7e143a22c8ead%7C0%7C1%7C636910865592545365&sdata=bTU80QgrYRZfOzAq%2F2y6GPvB7AVG%2F6ElZhX1GivAUOQ%3D&reserved=0>
[2] https://issues.apache.org/jira/browse/SYNCOPE-1244
<https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FSYNCOPE-1244&data=02%7C01%7Cjustin.isenhour%40compass-usa.com%7C7dff469df310406c067808d6c30ec555%7Ccd62b7dd4b4844bd90e7e143a22c8ead%7C0%7C1%7C636910865592545365&sdata=1O%2FKWkTkM3M%2F1%2FL%2B0W2wN7lNlsrMz8NyhcwtycT2SMM%3D&reserved=0>
[3] https://issues.apache.org/jira/browse/SYNCOPE-1103
<https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FSYNCOPE-1103&data=02%7C01%7Cjustin.isenhour%40compass-usa.com%7C7dff469df310406c067808d6c30ec555%7Ccd62b7dd4b4844bd90e7e143a22c8ead%7C0%7C1%7C636910865592555371&sdata=zXmEmIMdDw0hg7Mn9hxaW%2BtNmFs808hXrkeDHsV1zfM%3D&reserved=0>
[4] https://cwiki.apache.org/confluence/display/SYNCOPE/Jazz
<https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcwiki.apache.org%2Fconfluence%2Fdisplay%2FSYNCOPE%2FJazz&data=02%7C01%7Cjustin.isenhour%40compass-usa.com%7C7dff469df310406c067808d6c30ec555%7Ccd62b7dd4b4844bd90e7e143a22c8ead%7C0%7C1%7C636910865592565382&sdata=wl03Ge1XuFBoLl18IIkKf5ZAfpfEOa8HjnDfu%2FFeQlA%3D&reserved=0>
2019-04-16 18:27:02.286 [scheduler_QuartzSchedulerThread] [ERROR]
[org.quartz.core.ErrorLogger] - An error occured instantiating job to be
executed. job=
'DEFAULT.org.apache.syncope.core.provisioning.java.job.AfterHandlingJob0b8943b2-e6b5-4b07-9cff-97559924777b'
org.quartz.SchedulerException: Job instantiation failed
at
org.springframework.scheduling.quartz.AdaptableJobFactory.newJob(AdaptableJobFactory.java:45)
~[spring-context-support-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.quartz.core.JobRunShell.initialize(JobRunShell.java:127)
~[quartz-2.3.0.jar:?]
at
org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:392)
~[quartz-2.3.0.jar:?]
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException:
No bean named
'org.apache.syncope.core.provisioning.java.job.AfterHandlingJob0b8943b2-e6b5-4b07-9cff-97559924777b'
available
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:687)
~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1207)
~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:284)
~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at
org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1081)
~[spring-context-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at
org.apache.syncope.core.provisioning.java.job.SpringBeanJobFactory.createJobInstance(SpringBeanJobFactory.java:56)
~[syncope-core-provisioning-java-2.0.6.jar:2.0.6]
at
org.springframework.scheduling.quartz.AdaptableJobFactory.newJob(AdaptableJobFactory.java:41)
~[spring-context-support-4.3.6.RELEASE.jar:4.3.6.RELEASE]
... 2 more
--
Francesco Chicchiriccò
Tirasa - Open Source Excellence
http://www.tirasa.net/
Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/