Search code examples
cluster-computingdroolsapache-zookeeperworkbenchvfs

Drools Workbench - VFS Repository Clustering - Workbench Assets Not synched


I am deploying Drools Workbench with VFS Clustering in place. I have followed the steps defined in Drools-6 documentation in section “VFS-CLUSTERING”, and the following link. But my repositories are not synching

http://mswiderski.blogspot.com.br/2013/06/clustering-in-jbpm-v6.html

but getting following Zookeeper exception.

NoNode for /jbpm-cluster/INSTANCES/nodeOne_11/MESSAGES/df7cda63-979b-47b2-ac9a-f2b218cb188

Problem BPMN process created in Workbench-A is not getting Synched with Workbench-B. Following are the screen shots for the difference in project assets. Images attached in “ServerAssets.png” Servers not synched. One server has one additional bpmn files.

DESIGN

Architecture design screen shot attached. Architecture design

Helix Commands Startup and Cluster Setup

1.       helix-core-0.6.3\bin>helix-admin.bat --zkSvr localhost:2199 --addCluster jbpm-cluster
2.       helix-core-0.6.3\bin>helix-admin.bat --zkSvr localhost:2199 --addNode jbpm-cluster nodeOne:11
3.       helix-core-0.6.3\bin>helix-admin.bat --zkSvr localhost:2199 --addNode jbpm-cluster nodeTwo:22
4.       helix-core-0.6.3\bin>helix-admin.bat --zkSvr localhost:2199 --addResource jbpm-cluster vfs-repo 1 LeaderStandby AUTO_REBALANCE
5.       helix-core-0.6.3\bin>helix-admin.bat --zkSvr localhost:2199 --rebalance jbpm-cluster vfs-repo 2
6.       helix-core-0.6.3\bin>run-helix-controller.bat --zkSvr localhost:2199 --cluster jbpm-cluster 2>&1 > /tmp/controller.log &

ZooKeeper Setup

    Changes done only in zoo.conf
1.       dataDir = /zooDir/zookeeper  (Not sure where this directory gets created as I could not find it in $zookeeper_home/)
2.       clientPort = 2199

Work-Bench A Configuration: Standalone.xml

 <property name="org.guvnor.m2repo.dir" value="D:\\Servers\\M2_REPO"/>
    <property name="org.uberfire.nio.git.dir" value="D:\Servers\Drools-6-Deployment\repo"/>
    <property name="jboss.node.name" value="nodeOne"/>
    <property name="org.uberfire.metadata.index.dir" value="D:\Servers\Drools-6-Deployment\repo"/>
    <property name="org.uberfire.cluster.id" value="jbpm-cluster"/>
    <property name="org.uberfire.cluster.zk" value="localhost:2199"/>
    <property name="org.uberfire.cluster.local.id" value="nodeOne_11"/>
    <property name="org.uberfire.cluster.vfs.lock" value="vfs-repo"/>
    <property name="org.uberfire.cluster.autostart" value="false"/>

Work-Bench B Configuration: Standalone.xml

>   <property name="org.guvnor.m2repo.dir"
> value="D:\\Servers\\M2_REPO"/>
>     <property name="org.uberfire.nio.git.dir" value="D:\Servers\Drools-6-Deployment\repoB"/>
>     <property name="org.kie.nio.git.deamon.port" value="9518"/>
>     <property name="org.uberfire.nio.git.daemon.port" value="9518"/>
>     <property name="org.uberfire.nio.git.ssh.port" value="8002"/>
>     <property name="jboss.node.name" value="nodeTwo"/>
>     <property name="org.uberfire.metadata.index.dir" value="D:\Servers\Drools-6-Deployment\repoB"/>
>     <property name="org.uberfire.cluster.id" value="jbpm-cluster"/>
>     <property name="org.uberfire.cluster.zk" value="localhost:2199"/>
>     <property name="org.uberfire.cluster.local.id" value="nodeTwo_22"/>
>     <property name="org.uberfire.cluster.vfs.lock" value="vfs-repo"/>
>     <property name="org.uberfire.cluster.autostart" value="false"/>

Sync Error :

14:44:19,780 ERROR [org.apache.helix.messaging.handling.HelixTask] (pool-18-thread-21) Exception while executing a message. java.lang.NullPointerException msgId: 939154ed-eedb-493f-a803-83883764276a type: USER_DEFINE_MSG: java.lang.NullPointerException
        at org.uberfire.metadata.io.IOServiceIndexedImpl.setupWatchService(IOServiceIndexedImpl.java:168) [uberfire-metadata-commons-io-0.3.1.Final.jar:0.3.1.Final]
        at org.uberfire.metadata.io.IOServiceIndexedImpl.getFileSystem(IOServiceIndexedImpl.java:126) [uberfire-metadata-commons-io-0.3.1.Final.jar:0.3.1.Final]
        at org.uberfire.io.impl.cluster.IOServiceClusterImpl$SyncFileSystemMessageHandler.handleMessage(IOServiceClusterImpl.java:919) [uberfire-io-0.3.1.Final.jar:0.3.1.Final]
        at org.uberfire.io.impl.cluster.helix.ClusterServiceHelix$MessageHandlerResolverWrapper$1$1.handleMessage(ClusterServiceHelix.java:289) [uberfire-io-0.3.1.Final.jar:0.3.1.Final]
        at org.apache.helix.messaging.handling.HelixTask.call(HelixTask.java:93) [helix-core-0.6.2-incubating.jar:0.6.2-incubating]
        at org.apache.helix.messaging.handling.HelixTask.call(HelixTask.java:50) [helix-core-0.6.2-incubating.jar:0.6.2-incubating]
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_25]
        at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_25]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_25]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_25]
        at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]

14:44:20,506 ERROR [org.apache.helix.messaging.handling.HelixTask] (pool-18-thread-21) Message execution failed. msgId: 939154ed-eedb-493f-a803-83883764276a, errorMsg: null
14:44:20,985 INFO  [org.apache.helix.messaging.handling.HelixTaskExecutor] (pool-18-thread-21) message finished: 939154ed-eedb-493f-a803-83883764276a, took 1260
14:44:20,995 INFO  [org.apache.helix.manager.zk.CallbackHandler] (ZkClient-EventThread-117-localhost:2199) 117 START:INVOKE /brms-cluster/INSTANCES/nodeTwo_22/MESSAGES listener:org.apache.helix.messaging.handling.HelixTaskExecutor

Solution

  • I found the solution.

    Jboss cluster should be configured in JBoss-Domain mode only.