Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-87074

Unscheduling a job from the master node causes NPE on slave rejoin

    Details

      Description

      Steps to reproduce - master

      1. Start master node (any node in the cluster).
      2. Run the attached unschedule_master.groovy to unschedule one of the job "com.liferay.portlet.blogs.messaging.CheckEntryMessageListener" on master node. You can unschedule any of the job by changing the name in groovy.
      3. Check if "com.liferay.portlet.blogs.messaging.CheckEntryMessageListener" job is UNSCHEDULE by running scheduler_state_master.groovy attached for state.
      4. Start second node (slave node)
      5. Stop master node and see if there is NullPointerException as below when slave becomes master:
        2019-02-25 17:12:46.738 WARN  [default-17][BaseClusterMasterTokenTransitionListener:33] Unable to process the token acquired event
        java.lang.NullPointerException
        	at com.liferay.portal.scheduler.multiple.internal.ClusterSchedulerEngine$SchedulerClusterMasterTokenTransitionListener.doMasterTokenAcquired(ClusterSchedulerEngine.java:891)
        	at com.liferay.portal.kernel.cluster.BaseClusterMasterTokenTransitionListener.masterTokenAcquired(BaseClusterMasterTokenTransitionListener.java:29)
        	at com.liferay.portal.cluster.multiple.internal.ClusterMasterExecutorImpl.notifyMasterTokenTransitionListeners(ClusterMasterExecutorImpl.java:227)
        	at com.liferay.portal.cluster.multiple.internal.ClusterMasterExecutorImpl.getMasterClusterNodeId(ClusterMasterExecutorImpl.java:213)
        	at com.liferay.portal.cluster.multiple.internal.ClusterMasterExecutorImpl$ClusterMasterTokenClusterEventListener.processClusterEvent(ClusterMasterExecutorImpl.java:273)
        	at com.liferay.portal.cluster.multiple.internal.ClusterExecutorImpl.fireClusterEvent(ClusterExecutorImpl.java:354)
        	at com.liferay.portal.cluster.multiple.internal.ClusterRequestReceiver.doCoordinatorAddressUpdated(ClusterRequestReceiver.java:74)
        	at com.liferay.portal.cluster.multiple.internal.BaseClusterReceiver$CoordinatorAddressUpdatedRunnable.run(BaseClusterReceiver.java:220)
        	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        	at java.lang.Thread.run(Thread.java:748)
        

      Steps to reproduce - 6.2.x

      1. Start master node (any node in the cluster).
      2. Run the attached unschedule.groovy to unschedule one of the job "com.liferay.portlet.blogs.messaging.CheckEntryMessageListener" on master node. You can unschedule any of the job by changing the name in groovy.
      3. Check if "com.liferay.portlet.blogs.messaging.CheckEntryMessageListener" job is UNSCHEDULE by running scheduler_state.groovy attached for state.
      4. Start second node (slave node) and see if there is NullPointerException as below:
        17:04:53,650 ERROR [localhost-startStop-1][ClusterSchedulerEngine:603] Unable to load memory clustered jobs from master in 10 seconds, you might need to increase value set to "clusterable.advice.call.master.timeout", will retry again
        java.lang.NullPointerException
        	at com.liferay.portal.scheduler.ClusterSchedulerEngine.addMemoryClusteredJob(ClusterSchedulerEngine.java:533)
        	at com.liferay.portal.scheduler.ClusterSchedulerEngine.initMemoryClusteredJobs(ClusterSchedulerEngine.java:572)
        	at com.liferay.portal.scheduler.ClusterSchedulerEngine.start(ClusterSchedulerEngine.java:395)
        	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        	at java.lang.reflect.Method.invoke(Method.java:498)
        	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
        	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:48)
        	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
        	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
        	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
        	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
        	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
        	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
        	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
        	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
        	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
        	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
        	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
        	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
        	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
        	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
        	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
        	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
        	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
        	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
        	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
        	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
        	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
        	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
        	at com.sun.proxy.$Proxy282.start(Unknown Source)
        	at com.liferay.portal.scheduler.SchedulerEngineHelperImpl.start(SchedulerEngineHelperImpl.java:683)
        	at com.liferay.portal.kernel.scheduler.SchedulerEngineHelperUtil.start(SchedulerEngineHelperUtil.java:307)
        	at com.liferay.portal.kernel.scheduler.SchedulerLifecycle.doPortalInit(SchedulerLifecycle.java:30)
        	at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:44)
        	at com.liferay.portal.kernel.util.PortalLifecycleUtil.flushInits(PortalLifecycleUtil.java:50)
        	at com.liferay.portal.servlet.MainServlet.initPlugins(MainServlet.java:837)
        	at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:372)
        	at javax.servlet.GenericServlet.init(GenericServlet.java:158)
        	at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
        	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
        	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)
        	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5266)
        	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5554)
        	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
        	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
        	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
        	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:677)
        	at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1912)
        	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        	at java.lang.Thread.run(Thread.java:748)
        

        Attachments

          Activity

            People

            • Assignee:
              summer.zhang Summer Zhang
              Reporter:
              istvan.sajtos Istvan Sajtos
              Participants of an Issue:
              Recent user:
              Brian Chan
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                23 weeks, 5 days ago

                Packages

                Version Package
                7.1.X
                7.2.X
                Master