TWCable / grabbit

Grabbit - Fast Content Sync tool for AEM/CQ
Apache License 2.0
125 stars 64 forks source link

Grabbit AEM components are in 'unsatisfied' state after service restart #215

Open lakshmin opened 6 years ago

lakshmin commented 6 years ago

Hi,

After installing Grabbit and restarting the AEM6.3 instance, following components goes in to 'unsatisfied' state. Please find below the service names which are in 'unsatisfied' state. We are able to consistently reproduce the issue. Since the components are in 'unsatisfied' state, servlets are not working and not able to submit content migration job.

http://localhost:4502/system/console/components

com.twcable.grabbit.client.batch.workflows.impl.DefaultWorkFlowManager active
com.twcable.grabbit.client.services.impl.DefaultClientService unsatisfied (reference) com.twcable.grabbit.client.servlets.GrabbitJobServlet unsatisfied (reference) com.twcable.grabbit.client.servlets.GrabbitRootServlet active
com.twcable.grabbit.client.servlets.GrabbitTransactionServlet unsatisfied (reference) com.twcable.grabbit.resources.GrabbitResourceProvider active
com.twcable.grabbit.server.GrabbitContentPullServlet unsatisfied (reference) com.twcable.grabbit.server.services.impl.DefaultServerService unsatisfied (reference) com.twcable.grabbit.spring.batch.repository.services.impl.DefaultCleanJobRepository unsatisfied (reference) com.twcable.grabbit.spring.batch.repository.servlets.GrabbitCleanJobRepositoryServlet unsatisfied (reference)

Reference configurableApplicationContext Unsatisfied Service Name: org.springframework.context.ConfigurableApplicationContext Cardinality: 1..1 Policy: static Policy Option: reluctant No Services bound

Reference clientService Unsatisfied Service Name: com.twcable.grabbit.client.services.ClientService Cardinality: 1..1 Policy: static Policy Option: reluctant No Services bound

Reference configurableApplicationContext Unsatisfied Service Name: org.springframework.context.ConfigurableApplicationContext Cardinality: 1..1 Policy: static Policy Option: reluctant No Services bound

Reference serverService Unsatisfied Service Name: com.twcable.grabbit.server.services.ServerService Cardinality: 1..1 Policy: static Policy Option: reluctant No Services bound

Reference configurableApplicationContext Unsatisfied Service Name: org.springframework.context.ConfigurableApplicationContext Cardinality: 1..1 Policy: static Policy Option: reluctant No Services bound

Reference cleanJobRepository Unsatisfied Service Name: com.twcable.grabbit.spring.batch.repository.services.CleanJobRepository Cardinality: 1..1 Policy: static Policy Option: reluctant No Services bound

What version of AEM are you running?

AEM 6.3

How do you produce the issue?

Install Grabbit, it installs fine and after restarting the AEM 6.3 isntance, above mentioned components goes in to 'unsatisfied' state. If I uninstall the Grabbit 7.5 and reinstall it work, but the issue happens again after restarting AEM6.3 service.

Does the issue occur consistently?

Yes

Any additional details?

Packages installed - Sun-Misc-Fragment-Bundle-1.0.0.zip Grabbit-Deserialization-Firewall-Configuration-1.0.zip Grabbit-Apache-Sling-Login-Whitelist-1.0.zip Grabbit-7.1.5.zip

Thanks!

josephh commented 5 years ago

Trying out grabbit I'm seeing similar problems to @lakshmin. The grabbit packages/ bundles/ components are all Ok when installed to a 'fresh' aem instance. The problem arises when the grabbit packages are installed after our custom aem components code is already installed 😒. So presumably there is some contention with service dependencies (all bundles show as active)? Any pointers or help much appreciated!

AEM 6.3 with service pack 6.3.1

Sun-Misc-Fragment-Bundle-1.0.0.zip Grabbit-7.1.5.zip Grabbit-Deserialization-Firewall-Configuration-1.0.zip Grabbit-Apache-Sling-Login-Whitelist-1.0.zip

system/console/components shows,

id name status
3166 com.twcable.grabbit.client.batch.workflows.impl.DefaultWorkFlowManager active
3167 com.twcable.grabbit.client.services.impl.DefaultClientService unsatisfied (reference)  
3168 com.twcable.grabbit.client.servlets.GrabbitJobServlet unsatisfied (reference)
3169 com.twcable.grabbit.client.servlets.GrabbitRootServlet active
3170 com.twcable.grabbit.client.servlets.GrabbitTransactionServlet unsatisfied (reference)  
3171 com.twcable.grabbit.resources.GrabbitResourceProvider active
3172 com.twcable.grabbit.server.GrabbitContentPullServlet unsatisfied (reference)
3173 com.twcable.grabbit.server.services.impl.DefaultServerService unsatisfied (reference)  
3174 com.twcable.grabbit.spring.batch.repository.services.impl.DefaultCleanJobRepository unsatisfied (reference)  
3175 com.twcable.grabbit.spring.batch.repository.servlets.GrabbitCleanJobRepositoryServlet unsatisfied (reference)

When the client tries to kick off a copy from the source to the (local) target, target (client) server logs,

24.09.2018 10:48:00.588 *INFO* [SpringOsgiExtenderThread-2] com.twcable.grabbit.spring.batch.repository.JcrJobRepositoryFactoryBean Create JobExecution
24.09.2018 10:48:00.601 *INFO* [SpringOsgiExtenderThread-2] com.twcable.grabbit.spring.batch.repository.JcrJobRepositoryFactoryBean Create StepExecution
24.09.2018 10:48:00.617 *INFO* [SpringOsgiExtenderThread-2] com.twcable.grabbit.spring.batch.repository.JcrJobRepositoryFactoryBean Create ExecutionContext
24.09.2018 10:48:00.673 *INFO* [SpringOsgiExtenderThread-2] org.springframework.batch.core.launch.support.SimpleJobLauncher No TaskExecutor has been set, defaulting to synchronous executor.
24.09.2018 10:48:00.684 *INFO* [SpringOsgiExtenderThread-2] org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor Initializing ExecutorService  'clientJobLauncherTaskExecutor'
24.09.2018 10:48:00.711 *INFO* [SpringOsgiExtenderThread-2] org.springframework.beans.factory.support.DefaultListableBeanFactory Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@6424f534: defining beans [clientJobLauncher,clientJobRegistry,clientJobOperator,clientJobExplorer,jobRegistryBeanPostProcessor,clientJobRepository,clientTransactionManager,clientJobLauncherTaskExecutor,executionContextSerializer,validJobDecider,clientNamespaceSyncTasklet,clientProtobufNodesReader,clientJcrNodesWriter,deleteBeforeWriteDecider,deleteBeforeWriteTasklet,createHttpConnectionTasklet,org.springframework.batch.core.scope.internalStepScope,org.springframework.beans.factory.config.CustomEditorConfigurer,org.springframework.batch.core.configuration.xml.CoreNamespacePostProcessor,clientWorkflowOff,deleteBeforeWrite,startHttpConnection,clientNamespaceSync,clientJcrNodes,clientWorkflowOn,clientJob,clientBatchJobListener,loggingStepExecutionListener,serverJcrNodesReader,serverJcrNodesProcessor,serverProtobufNodesWriter,clientWorkflowOnTasklet,serverJobLauncher,serverJobRepository,serverTransactionManager,serverNamespaceReader,serverNamespaceProcessor,serverNamespaceWriter,serverNamespaceSync,serverJcrNodes,serverJob,serverBatchJobListener,clientWorkflowOffTasklet,slingRepository,workflowManager,resourceResolverFactory,scopedTarget.deleteBeforeWriteTasklet,scopedTarget.org.springframework.batch.repeat.policy.SimpleCompletionPolicy#0,org.springframework.batch.repeat.policy.SimpleCompletionPolicy#0,scopedTarget.serverJcrNodesProcessor,scopedTarget.clientWorkflowOnTasklet,scopedTarget.clientWorkflowOffTasklet]; root of factory hierarchy
24.09.2018 10:48:00.712 *INFO* [SpringOsgiExtenderThread-2] org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor Shutting down ExecutorService 'clientJobLauncherTaskExecutor'
24.09.2018 10:48:00.715 *ERROR* [SpringOsgiExtenderThread-2] org.springframework.osgi.extender.internal.activator.ContextLoaderListener Application context refresh failed (OsgiBundleXmlApplicationContext(bundle=com.twcable.grabbit, config=osgibundle:/META-INF/spring/*.xml))
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'clientWorkflowOff': Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/transaction/annotation/Isolation
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:529)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:615)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
    at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:62)
    at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:327)
    at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:87)
    at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:292)
    at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:138)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoClassDefFoundError: org/springframework/transaction/annotation/Isolation
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
    at java.lang.Class.privateGetPublicMethods(Class.java:2902)
    at java.lang.Class.getMethods(Class.java:1615)
    at org.springframework.beans.ExtendedBeanInfoFactory.supports(ExtendedBeanInfoFactory.java:53)
    at org.springframework.beans.ExtendedBeanInfoFactory.getBeanInfo(ExtendedBeanInfoFactory.java:45)
    at org.springframework.beans.CachedIntrospectionResults.<init>(CachedIntrospectionResults.java:270)
    at org.springframework.beans.CachedIntrospectionResults.forClass(CachedIntrospectionResults.java:195)
    at org.springframework.beans.BeanWrapperImpl.getCachedIntrospectionResults(BeanWrapperImpl.java:321)
    at org.springframework.beans.BeanWrapperImpl.getPropertyDescriptorInternal(BeanWrapperImpl.java:351)
    at org.springframework.beans.BeanWrapperImpl.isWritableProperty(BeanWrapperImpl.java:427)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1419)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1158)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
    ... 13 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.springframework.transaction.annotation.Isolation not found by org.springframework.batch.core [548]
    at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1574)
    at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
    at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 27 common frames omitted