2 Replies Latest reply on Nov 8, 2012 1:11 PM by wdfink

    JDF Quickstarts cluster-ha-singleton

    lukasz.antoniak

      Hello Community,

       

      I have been playing with "cluster-ha-singleton" sample available from http://www.jboss.org/jdf/quickstarts/jboss-as-quickstart/cluster-ha-singleton/. Failover works fine, but when I am trying to undeploy and redeploy the application again, I am receiving the error saying that service is already registered. Complete log messages posted below (environment EAP 6.0). Has anyone encountered such error in the past?

       

      [Server:server-three-master] 10:11:37,189 INFO  [org.jboss.as.server] (Controller Boot Thread) JBAS018559: Deployed "jboss-as-cluster-ha-singleton-service.jar"

      [Server:server-three-master] 10:11:37,284 INFO  [org.jboss.as]        (Controller Boot Thread) JBAS015874: JBoss EAP 6.0.0.GA (AS 7.1.2.Final-redhat-1) started in 11132ms - Started 254 of 397 services (142 services are passive or on-demand)

      [Server:server-three-master] 10:14:36,218 INFO  [org.jboss.as.quickstarts.cluster.hasingleton.service.ejb.Init] (MSC service thread 1-1) StartupSingleton will be removed!

      [Server:server-three-master] 10:14:36,221 INFO  [org.jboss.as.quickstarts.cluster.hasingleton.service.ejb.Init] (MSC service thread 1-1) Service controller state is UP, waiting for transition to REMOVED

      [Server:server-three-master] 10:14:36,221 INFO  [org.jboss.as.osgi]   (MSC service thread 1-2) JBAS011908: Unregister module: Module "deployment.jboss-as-cluster-ha-singleton-service.jar:main" from Service Module Loader

      [Server:server-three-master] 10:14:36,251 INFO  [org.jboss.as.quickstarts.cluster.hasingleton.service.ejb.Init] (MSC service thread 1-1) Service controller state is STOPPING, waiting for transition to REMOVED

      [Server:server-three-master] 10:14:36,267 INFO  [org.jboss.as.quickstarts.cluster.hasingleton.service.ejb.Init] (MSC service thread 1-1) Service controller state is now DOWN

      [Server:server-three-master] 10:14:36,268 WARN  [org.jboss.as.quickstarts.cluster.hasingleton.service.ejb.Init] (MSC service thread 1-1) Singleton Service service jboss.quickstart.ha.singleton.timer has not be stopped correctly!

      [Server:server-three-master] 10:14:36,305 INFO  [org.jboss.as.clustering.infinispan] (MSC service thread 1-1) JBAS010282: Stopped default cache from cluster container

      [Server:server-three-master] 10:14:36,399 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment jboss-as-cluster-ha-singleton-service.jar in 190ms

      [Server:server-three-master] 10:14:36,608 INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-1) ISPN000082: Stopping the RpcDispatcher

      [Server:server-three-master] 10:14:51,739 INFO  [org.jboss.as.server] (host-controller-connection-threads - 2) JBAS018558: Undeployed "jboss-as-cluster-ha-singleton-service.jar"

      [Server:server-three-master] 10:14:51,740 INFO  [org.jboss.as.repository] (host-controller-connection-threads - 2) JBAS014901: Content removed from location /opt/jboss1/domain/servers/server-three-master/data/content/0b/1b453d527ac0cd94eeb1726a76c805ae5c61e7/content

      [Host Controller] 10:14:57,027 INFO  [org.jboss.as.repository] (HttpManagementService-threads - 4) JBAS014901: Content removed from location /opt/jboss1/domain/data/content/0b/1b453d527ac0cd94eeb1726a76c805ae5c61e7/content

      [Host Controller] 10:15:24,333 INFO  [org.jboss.as.repository] (HttpManagementService-threads - 4) JBAS014900: Content added at location /opt/jboss1/domain/data/content/0b/1b453d527ac0cd94eeb1726a76c805ae5c61e7/content

      [Server:server-three-master] 10:15:29,060 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "jboss-as-cluster-ha-singleton-service.jar"

      [Server:server-three-master] 10:15:29,135 WARN  [org.jboss.as.dependency.private] (MSC service thread 1-1) JBAS018567: Deployment "deployment.jboss-as-cluster-ha-singleton-service.jar" is using a private module ("org.jboss.as.clustering.singleton:main") which may be changed or removed in future versions without notice.

      [Server:server-three-master] 10:15:29,144 WARN  [org.jboss.as.dependency.private] (MSC service thread 1-1) JBAS018567: Deployment "deployment.jboss-as-cluster-ha-singleton-service.jar" is using a private module ("org.jboss.as.server:main") which may be changed or removed in future versions without notice.

      [Server:server-three-master] 10:15:29,164 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-2) JNDI bindings for session bean named SchedulerBean in deployment unit deployment "jboss-as-cluster-ha-singleton-service.jar" are as follows:

      [Server:server-three-master]

      [Server:server-three-master] java:global/jboss-as-cluster-ha-singleton-service/SchedulerBean!org.jboss.as.quickstarts.cluster.hasingleton.service.ejb.Scheduler

      [Server:server-three-master] java:app/jboss-as-cluster-ha-singleton-service/SchedulerBean!org.jboss.as.quickstarts.cluster.hasingleton.service.ejb.Scheduler

      [Server:server-three-master] java:module/SchedulerBean!org.jboss.as.quickstarts.cluster.hasingleton.service.ejb.Scheduler

      [Server:server-three-master] java:global/jboss-as-cluster-ha-singleton-service/SchedulerBean

      [Server:server-three-master] java:app/jboss-as-cluster-ha-singleton-service/SchedulerBean

      [Server:server-three-master] java:module/SchedulerBean

      [Server:server-three-master]

      [Server:server-three-master] 10:15:29,165 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-2) JNDI bindings for session bean named ServiceAccessBean in deployment unit deployment "jboss-as-cluster-ha-singleton-service.jar" are as follows:

      [Server:server-three-master]

      [Server:server-three-master] java:global/jboss-as-cluster-ha-singleton-service/ServiceAccessBean!org.jboss.as.quickstarts.cluster.hasingleton.service.ejb.ServiceAccess

      [Server:server-three-master] java:app/jboss-as-cluster-ha-singleton-service/ServiceAccessBean!org.jboss.as.quickstarts.cluster.hasingleton.service.ejb.ServiceAccess

      [Server:server-three-master] java:module/ServiceAccessBean!org.jboss.as.quickstarts.cluster.hasingleton.service.ejb.ServiceAccess

      [Server:server-three-master] java:jboss/exported/jboss-as-cluster-ha-singleton-service/ServiceAccessBean!org.jboss.as.quickstarts.cluster.hasingleton.service.ejb.ServiceAccess

      [Server:server-three-master] java:global/jboss-as-cluster-ha-singleton-service/ServiceAccessBean

      [Server:server-three-master] java:app/jboss-as-cluster-ha-singleton-service/ServiceAccessBean

      [Server:server-three-master] java:module/ServiceAccessBean

      [Server:server-three-master]

      [Server:server-three-master] 10:15:29,166 INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-2) JNDI bindings for session bean named Init in deployment unit deployment "jboss-as-cluster-ha-singleton-service.jar" are as follows:

      [Server:server-three-master]

      [Server:server-three-master] java:global/jboss-as-cluster-ha-singleton-service/Init!org.jboss.as.quickstarts.cluster.hasingleton.service.ejb.Init

      [Server:server-three-master] java:app/jboss-as-cluster-ha-singleton-service/Init!org.jboss.as.quickstarts.cluster.hasingleton.service.ejb.Init

      [Server:server-three-master] java:module/Init!org.jboss.as.quickstarts.cluster.hasingleton.service.ejb.Init

      [Server:server-three-master] java:global/jboss-as-cluster-ha-singleton-service/Init

      [Server:server-three-master] java:app/jboss-as-cluster-ha-singleton-service/Init

      [Server:server-three-master] java:module/Init

      [Server:server-three-master]

      [Server:server-three-master] 10:15:29,405 INFO  [org.jboss.as.osgi] (MSC service thread 1-2) JBAS011907: Register module: Module "deployment.jboss-as-cluster-ha-singleton-service.jar:main" from Service Module Loader

      [Server:server-three-master] 10:15:29,443 INFO  [org.jboss.as.quickstarts.cluster.hasingleton.service.ejb.Init] (MSC service thread 1-2) StartupSingleton will be initialized!

      [Server:server-three-master] 10:15:29,499 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.unit."jboss-as-cluster-ha-singleton-service.jar".component.Init.START: org.jboss.msc.service.StartException in service jboss.deployment.unit."jboss-as-cluster-ha-singleton-service.jar".component.Init.START: Failed to start service

      [Server:server-three-master]    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.2.GA-redhat-1.jar:1.0.2.GA-redhat-1]

      [Server:server-three-master]    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_31]

      [Server:server-three-master]    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_31]

      [Server:server-three-master]    at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_31]

      [Server:server-three-master] Caused by: java.lang.IllegalStateException: JBAS011048: Failed to construct component instance

      [Server:server-three-master]    at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:163)

      [Server:server-three-master]    at org.jboss.as.ee.component.BasicComponent.createInstance(BasicComponent.java:85)

      [Server:server-three-master]    at org.jboss.as.ejb3.component.singleton.SingletonComponent.getComponentInstance(SingletonComponent.java:119)

      [Server:server-three-master]    at org.jboss.as.ejb3.component.singleton.SingletonComponent.start(SingletonComponent.java:134)

      [Server:server-three-master]    at org.jboss.as.ee.component.ComponentStartService.start(ComponentStartService.java:44)

      [Server:server-three-master]    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA-redhat-1.jar:1.0.2.GA-redhat-1]

      [Server:server-three-master]    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA-redhat-1.jar:1.0.2.GA-redhat-1]

      [Server:server-three-master]    ... 3 more

      [Server:server-three-master] Caused by: javax.ejb.EJBException: org.jboss.msc.service.DuplicateServiceException: Service jboss.quickstart.ha.singleton.timer.service is already registered

      [Server:server-three-master]    at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:165)

      [Server:server-three-master]    at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:229)

      [Server:server-three-master]    at org.jboss.as.ejb3.tx.CMTTxInterceptor.requiresNew(CMTTxInterceptor.java:332)

      [Server:server-three-master]    at org.jboss.as.ejb3.tx.SingletonLifecycleCMTTxInterceptor.processInvocation(SingletonLifecycleCMTTxInterceptor.java:57)

      [Server:server-three-master]    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]

      [Server:server-three-master]    at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)

      [Server:server-three-master]    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]

      [Server:server-three-master]    at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45)

      [Server:server-three-master]    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]

      [Server:server-three-master]    at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]

      [Server:server-three-master]    at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:161)

      [Server:server-three-master]    ... 9 more

      [Server:server-three-master] Caused by: org.jboss.msc.service.DuplicateServiceException: Service jboss.quickstart.ha.singleton.timer.service is already registered

      [Server:server-three-master]    at org.jboss.msc.service.ServiceRegistrationImpl.setInstance(ServiceRegistrationImpl.java:154) [jboss-msc-1.0.2.GA-redhat-1.jar:1.0.2.GA-redhat-1]

      [Server:server-three-master]    at org.jboss.msc.service.ServiceControllerImpl.startInstallation(ServiceControllerImpl.java:227) [jboss-msc-1.0.2.GA-redhat-1.jar:1.0.2.GA-redhat-1]

      [Server:server-three-master]    at org.jboss.msc.service.ServiceContainerImpl.install(ServiceContainerImpl.java:560) [jboss-msc-1.0.2.GA-redhat-1.jar:1.0.2.GA-redhat-1]

      [Server:server-three-master]    at org.jboss.msc.service.ServiceBuilderImpl.install(ServiceBuilderImpl.java:307) [jboss-msc-1.0.2.GA-redhat-1.jar:1.0.2.GA-redhat-1]

      [Server:server-three-master]    at org.jboss.as.clustering.singleton.SingletonService.build(SingletonService.java:88)

      [Server:server-three-master]    at org.jboss.as.clustering.singleton.SingletonService.build(SingletonService.java:78)

      [Server:server-three-master]    at org.jboss.as.quickstarts.cluster.hasingleton.service.ejb.Init.startup(Init.java:63)

      [Server:server-three-master]    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_31]

      [Server:server-three-master]    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_31]

      [Server:server-three-master]    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_31]

      [Server:server-three-master]    at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_31]

      [Server:server-three-master]    at org.jboss.as.ee.component.ManagedReferenceLifecycleMethodInterceptorFactory$ManagedReferenceLifecycleMethodInterceptor.processInvocation(ManagedReferenceLifecycleMethodInterceptorFactory.java:130)

      [Server:server-three-master]    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]

      [Server:server-three-master]    at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]

      [Server:server-three-master]    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]

      [Server:server-three-master]    at org.jboss.as.ee.component.ManagedReferenceInterceptorFactory$ManagedReferenceInterceptor.processInvocation(ManagedReferenceInterceptorFactory.java:95)

      [Server:server-three-master]    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]

      [Server:server-three-master]    at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]

      [Server:server-three-master]    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]

      [Server:server-three-master]    at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)

      [Server:server-three-master]    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]

      [Server:server-three-master]    at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:227)

      [Server:server-three-master]    ... 18 more

      [Server:server-three-master]

      [Server:server-three-master] 10:15:29,576 INFO  [org.jboss.as.server] (host-controller-connection-threads - 2) JBAS015870: Deploy of deployment "jboss-as-cluster-ha-singleton-service.jar" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"jboss-as-cluster-ha-singleton-service.jar\".component.Init.START" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"jboss-as-cluster-ha-singleton-service.jar\".component.Init.START: Failed to start service

      [Server:server-three-master]     Caused by: java.lang.IllegalStateException: JBAS011048: Failed to construct component instance

      [Server:server-three-master]     Caused by: javax.ejb.EJBException: org.jboss.msc.service.DuplicateServiceException: Service jboss.quickstart.ha.singleton.timer.service is already registered

      [Server:server-three-master]     Caused by: org.jboss.msc.service.DuplicateServiceException: Service jboss.quickstart.ha.singleton.timer.service is already registered"}}

      [Server:server-three-master] 10:15:29,582 INFO  [org.jboss.as.osgi] (MSC service thread 1-1) JBAS011908: Unregister module: Module "deployment.jboss-as-cluster-ha-singleton-service.jar:main" from Service Module Loader

      [Server:server-three-master] 10:15:29,656 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment jboss-as-cluster-ha-singleton-service.jar in 79ms

       

      Regards,

      Lukasz Antoniak