problem deploying quickstart wildfly cluster-ha-singleton
euan-am Oct 3, 2014 9:22 AMHi,
I am trying to test this quickstart:
quickstart/cluster-ha-singleton at master · wildfly/quickstart · GitHub
I have built the project. I have started wildfly (version 8.1.0.Final) with this command:
standalone.sh -server-config=standalone-ha.xml -Djboss.node.name=jb.node1
When I deploy the quickstart, I get the following error:
15:03:31,803 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.deployment.unit."wildfly-cluster-ha-singleton-service.jar".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."wildfly-cluster-ha-singleton-service.jar".INSTALL: JBAS018733: Failed to process phase INSTALL of deployment "wildfly-cluster-ha-singleton-service.jar"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [wildfly-server-8.1.0.Final.jar:8.1.0.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_20]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_20]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_20]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: org.jboss.msc.service.ServiceNotFoundException: Service service jboss.clustering.singleton.builder.server.default not found
at org.jboss.as.server.deployment.service.ServiceActivatorProcessor.deploy(ServiceActivatorProcessor.java:72) [wildfly-server-8.1.0.Final.jar:8.1.0.Final]
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [wildfly-server-8.1.0.Final.jar:8.1.0.Final]
... 5 more
Caused by: org.jboss.msc.service.ServiceNotFoundException: Service service jboss.clustering.singleton.builder.server.default not found
at org.jboss.msc.service.ServiceContainerImpl.getRequiredService(ServiceContainerImpl.java:668) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at org.jboss.msc.service.DelegatingServiceRegistry.getRequiredService(DelegatingServiceRegistry.java:46) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at org.jboss.as.quickstarts.cluster.hasingleton.service.ejb.HATimerServiceActivator.install(HATimerServiceActivator.java:51)
at org.jboss.as.quickstarts.cluster.hasingleton.service.ejb.HATimerServiceActivator.activate(HATimerServiceActivator.java:44)
at org.jboss.as.server.deployment.service.ServiceActivatorProcessor.deploy(ServiceActivatorProcessor.java:70) [wildfly-server-8.1.0.Final.jar:8.1.0.Final]
... 6 more
Looking at the quickstart code for the org.jboss.as.quickstarts.cluster.hasingleton.service.ejb.HATimerServiceActivator class, I am unsure how the service "jboss.clustering.singleton.builder.server.default" would be registered. The code is:
InjectedValue env = new InjectedValue<>();
HATimerService service = new HATimerService(env);
ServiceController factoryService = context.getServiceRegistry().getRequiredService(SingletonServiceBuilderFactory.SERVICE_NAME.append(CONTAINER_NAME, CACHE_NAME));
SingletonServiceBuilderFactory factory = (SingletonServiceBuilderFactory) factoryService.getValue();
factory.createSingletonServiceBuilder(name, service)
.electionPolicy(new PreferredSingletonElectionPolicy(new SimpleSingletonElectionPolicy(), new NamePreference(PREFERRED_NODE + "/" + CONTAINER_NAME)))
.requireQuorum(quorum)
.build(context.getServiceTarget())
.addDependency(ServerEnvironmentService.SERVICE_NAME, ServerEnvironment.class, env)
.setInitialMode(ServiceController.Mode.ACTIVE)
.install();
Is there any additional configuration required to activate a clustered ha singleton?
Any help would be appreciated.
Regards