Hi Tharindu/Malaka,
Looks like this is an incompatibility issue between two clustering
mechanisms used in axis2Server and within the ESB itself. In the
axis2Server, it is using tribesClustering while ESB 4.8.0 is using
Hazlecast clustering. I have done some debugging on ESB and found that
clustering management group is not initialized.
In the first run, when following the same guidelines as in the sample, Got
the error which malaka has mentioned. Then I have enabled group management
inside the axis2.xml of sample axis2Server and then it throws some other
exception. When debugging I found that following code segment is causing
the issue.
(DynamicLoadBalanceEndpoint.java)
// prepare for a new session
currentMember =
lbMembershipHandler.getNextApplicationMember(algorithmContext);
(Axis2LoadBalanceEndpointHandler.java)
public Member getNextApplicationMember(AlgorithmContext context) {
algorithm.setApplicationMembers(groupMgtAgent.getMembers());
return algorithm.getNextApplicationMember(context);
}
here the groupMgtAgent object is null. It is not setting correctly within
this segment.
(Axis2LoadBalanceEndpointHandler.java)
public void setConfigurationContext(ConfigurationContext configCtx) {
this.configCtx = configCtx;
// The following code does the bridging between Axis2 and Synapse
load balancing
ClusteringAgent clusteringAgent =
configCtx.getAxisConfiguration().getClusteringAgent();
if(clusteringAgent == null){
String msg = "In order to enable load balancing across an Axis2
cluster, " +
"the cluster entry should be enabled in the
axis2.xml file";
log.error(msg);
throw new SynapseException(msg);
}
groupMgtAgent = clusteringAgent.getGroupManagementAgent(lbDomain);
if(groupMgtAgent == null){
String msg =
"A LoadBalanceEventHandler has not been specified in
the axis2.xml " +
"file for the domain " + lbDomain;
log.error(msg);
throw new SynapseException(msg);
}
}
In this code segment it is kind of bridging between axis2 and synapse. As
per my understanding it is here that incompatibility occurs. What I can
think of is changing the clustering configuration inside the axis2Server's
axis2.xml file such that it uses the Hazlecast clustering. WDYT?
Thanks,
Chanaka
On Mon, Dec 9, 2013 at 6:22 AM, Tharindu Perera <[email protected]> wrote:
> Hi Malaka,
>
> Above is the complete stack trace shown in the ESB log. The axis2 servers
> seem to be in a cluster as they communicate when nodes are added and
> released.
>
>
> On Mon, Dec 9, 2013 at 2:42 PM, Malaka Silva <[email protected]> wrote:
>
>> Hi Tharindu,
>>
>> Did you also get the following error?
>>
>> ERROR - Axis2LoadBalanceMembershipHandler A LoadBalanceEventHandler has
>> not been specified in the axis2.xml file for the domain
>> apache.axis2.application.domain
>>
>>
>> Best Regards,
>> Malaka
>>
>>
>> On Mon, Dec 9, 2013 at 1:58 PM, Tharindu Perera <[email protected]>wrote:
>>
>>> Hi all,
>>>
>>> when running ESB
>>> Sample 57: Dynamic load balancing between 3
>>> nodes<http://docs.wso2.org/display/ESB480/Sample+57%3A+Dynamic+load+balancing+between+3+nodes>
>>>
>>> I cannot seem to configure the cluster properly. I have edited the
>>> axis2.xml and set both mcastBindAddress , localMemberHost to 127.0.0.1 and
>>> enabled clustering. After running the ESB in the specific setup It does not
>>> communicate with the cluster.
>>>
>>> This is the Error that is logged
>>>
>>> [2013-12-09 13:44:20,004] ERROR - NativeWorkerPool Uncaught exception
>>> java.lang.NullPointerException
>>> at
>>> org.apache.synapse.core.axis2.Axis2LoadBalanceMembershipHandler.getNextApplicationMember(Axis2LoadBalanceMembershipHandler.java:92)
>>> at
>>> org.apache.synapse.endpoints.DynamicLoadbalanceEndpoint.send(DynamicLoadbalanceEndpoint.java:157)
>>> at
>>> org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:95)
>>> at
>>> org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71)
>>> at
>>> org.apache.synapse.mediators.filters.InMediator.mediate(InMediator.java:55)
>>> at
>>> org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71)
>>> at
>>> org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:114)
>>> at
>>> org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:199)
>>> at
>>> org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:83)
>>> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
>>> at
>>> org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:404)
>>> at
>>> org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:184)
>>> at
>>> org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
>>> at
>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>>> at
>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>>> at java.lang.Thread.run(Thread.java:722)
>>>
>>> What coulld be the problem? Do I have to configure the ESB in some way?
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> [email protected]
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>>
>> Best Regards,
>>
>> Malaka Silva
>> Senior Tech Lead
>> M: +94 777 219 791
>> Tel : 94 11 214 5345
>> Fax :94 11 2145300
>> LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
>> Blog : http://mrmalakasilva.blogspot.com/
>>
>> WSO2, Inc.
>> lean . enterprise . middleware
>> http://www.wso2.com/
>> http://www.wso2.com/about/team/malaka-silva/<http://wso2.com/about/team/malaka-silva/>
>>
>> Save a tree -Conserve nature & Save the world for your future. Print this
>> email only if it is absolutely necessary.
>>
>
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
--
--
Chanaka Fernando
Technical Lead
WSO2, Inc.; http://wso2.com
lean.enterprise.middleware
mobile: +94 773337238
Blog : http://soatutorials.blogspot.com
LinkedIn:http://www.linkedin.com/pub/chanaka-fernando/19/a20/5b0
Twitter:https://twitter.com/chanakaudaya
Wordpress:http://chanakaudaya.wordpress.com
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev