Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-4645

Documentation - Clustering quickstart race condition

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • Documentation

      From https://bugzilla.redhat.com/show_bug.cgi?id=1335495:

       jboss.quickstart.ha.singleton.timer.Eight.service: Could not initialize timer
      	at org.jboss.as.quickstarts.cluster.hasingleton.service.ejb.HATimerService.start(HATimerService.java:80)
      	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
      	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_91]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_91]
      	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_91]
      Caused by: javax.naming.NameNotFoundException: Error looking up global/jboss-cluster-ha-singleton-service/SchedulerEightBean!org.jboss.as.quickstarts.cluster.hasingleton.service.ejb.Scheduler, service service jboss.naming.context.java.global.jboss-cluster-ha-singleton-service."SchedulerEightBean!org.jboss.as.quickstarts.cluster.hasingleton.service.ejb.Scheduler" is not started
      	at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:133)
      	at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:81)
      	at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:197)
      	at org.jboss.as.naming.InitialContext$DefaultInitialContext.lookup(InitialContext.java:243)
      	at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:183)
      	at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:179)
      	at javax.naming.InitialContext.lookup(InitialContext.java:417) [rt.jar:1.8.0_91]
      	at javax.naming.InitialContext.lookup(InitialContext.java:417) [rt.jar:1.8.0_91]
      	at org.jboss.as.quickstarts.cluster.hasingleton.service.ejb.HATimerService.start(HATimerService.java:77)
      	... 5 more
      

      In this case the HATimerServiceActivator does not create any dependency against the ejb component create/start service causing a race condition:

      https://github.com/jboss-developer/jboss-eap-quickstarts/blob/6.4.x/cluster-ha-singleton/service/src/main/java/org/jboss/as/quickstarts/cluster/hasingleton/service/ejb/HATimerServiceActivator.java#L59

      .addDependency should be called there against the right ejb component.

              sgilda_jira Sande Gilda (Inactive)
              sgilda_jira Sande Gilda (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: