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

Quickstarts - Clustering quickstart race condition

    XMLWordPrintable

Details

    • Hide

      Add Thread.sleep(5000) to the start of HATimerService.stop.
      Deploy.
      Undeploy.
      WARN [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000004: Failure during stop of service jboss.quickstart.ha.singleton.timer.service: java.lang.IllegalArgumentException: WFLYNAM0041: NamingStore is null is produced.

      Show
      Add Thread.sleep(5000) to the start of HATimerService.stop . Deploy. Undeploy. WARN [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000004: Failure during stop of service jboss.quickstart.ha.singleton.timer.service: java.lang.IllegalArgumentException: WFLYNAM0041: NamingStore is null is produced.

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: