You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Manula Chathurika Thantriwatte <ma...@wso2.com> on 2014/01/09 19:02:48 UTC

Erro in unsubscribing cartridge

Hi,

I'm getting following error in unsubscribing cartridge. In CE2 side
instance successfully terminated.

[2014-01-09 17:58:33,108] ERROR
{org.apache.stratos.cloud.controller.impl.CloudControllerServiceImpl} -
Instance termination failed. MemberContext
[memberId=lahiru1.isuruh.lk.php.domain8315891c-4fc8-4fb5-8288-2b89729ef140,
nodeId=ap-southeast-1/i-12f46c44, clusterId=lahiru1.isuruh.lk.php.domain,
cartridgeType=php, privateIpAddress=10.144.163.177,
publicIpAddress=54.255.12.250, allocatedIpAddress=null,
initTime=1389289619778, lbClusterId=lb304542170.isuruh.lk.lb.domain,
networkPartitionId=ec2]
java.lang.NullPointerException
    at
org.apache.stratos.cloud.controller.topology.TopologyBuilder.handleMemberTerminated(TopologyBuilder.java:326)
    at
org.apache.stratos.cloud.controller.impl.CloudControllerServiceImpl.logTermination(CloudControllerServiceImpl.java:787)
    at
org.apache.stratos.cloud.controller.impl.CloudControllerServiceImpl.access$300(CloudControllerServiceImpl.java:59)
    at
org.apache.stratos.cloud.controller.impl.CloudControllerServiceImpl$InstanceTerminator.run(CloudControllerServiceImpl.java:448)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Exception in thread "pool-65-thread-3"
org.apache.stratos.cloud.controller.exception.CloudControllerException:
Instance termination failed. MemberContext
[memberId=lahiru1.isuruh.lk.php.domain8315891c-4fc8-4fb5-8288-2b89729ef140,
nodeId=ap-southeast-1/i-12f46c44, clusterId=lahiru1.isuruh.lk.php.domain,
cartridgeType=php, privateIpAddress=10.144.163.177,
publicIpAddress=54.255.12.250, allocatedIpAddress=null,
initTime=1389289619778, lbClusterId=lb304542170.isuruh.lk.lb.domain,
networkPartitionId=ec2]
    at
org.apache.stratos.cloud.controller.impl.CloudControllerServiceImpl$InstanceTerminator.run(CloudControllerServiceImpl.java:454)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
    at
org.apache.stratos.cloud.controller.topology.TopologyBuilder.handleMemberTerminated(TopologyBuilder.java:326)
    at
org.apache.stratos.cloud.controller.impl.CloudControllerServiceImpl.logTermination(CloudControllerServiceImpl.java:787)
    at
org.apache.stratos.cloud.controller.impl.CloudControllerServiceImpl.access$300(CloudControllerServiceImpl.java:59)
    at
org.apache.stratos.cloud.controller.impl.CloudControllerServiceImpl$InstanceTerminator.run(CloudControllerServiceImpl.java:448)
    ... 3 more


-- 
Regards,
Manula Chathurika Thantriwatte
Software Engineer
WSO2 Inc. : http://wso2.com
lean . enterprise . middleware

email : manulac@wso2.com / manula@apache.org
phone : +94 772492511
blog : http://manulachathurika.blogspot.com/

Re: Erro in unsubscribing cartridge

Posted by Reka Thirunavukkarasu <re...@wso2.com>.
Hi all,

When went through the code, we are calling terminateAllInstances(terminate
instance one by one and publish MemberTerminatedEvent) and
unRegisterSerivce(Removing the subscription data from CC and publish
ClusterRemovedEvent) from SM.

So, the flow should be synchronous here for terminateAllInstances and
unRegisterSerivce. But it is not, since we use thread pool in the
terminateAllInstances to terminate an instance.  unregisterService gets
called which remove the subscription, remove the cluster from Topology and
send the clusterRemovedEvent while the instances are being terminated. So,
the instance which is getting terminated, can't find the MemberConext or
Cluster from Topology due to those information already removed. So that we
faced the NPE.

In order to fix this, we have to make the call synchronous between
terminateAllInstances and unRegisterSerivce. Please suggest, whether it is
good approach to make the calls synchronous? or is there any other way to
overcome this issue?

Thanks,
Reka


On Fri, Jan 10, 2014 at 9:26 AM, Manula Chathurika Thantriwatte <
manulac@wso2.com> wrote:

> Sure will do it.
>
>
> On Fri, Jan 10, 2014 at 8:44 AM, Nirmal Fernando <ni...@gmail.com>wrote:
>
>> Manula,
>>
>> Can you please debug and provide a fix for this issue? Probably some
>> not-null field is null in the received event. Please also handle the
>> possible NPEs you will come across.
>>
>> Thanks.
>>
>>
>> On Fri, Jan 10, 2014 at 8:14 AM, Udara Liyanage <ud...@wso2.com> wrote:
>>
>>> Me too encountered the same continuously.
>>>
>>> Touched, not typed. Erroneous words are a feature, not a typo.
>>>
>>
>>
>>
>> --
>> Best Regards,
>> Nirmal
>>
>> Nirmal Fernando.
>> PPMC Member & Committer of Apache Stratos,
>> Senior Software Engineer, WSO2 Inc.
>>
>> Blog: http://nirmalfdo.blogspot.com/
>>
>
>
>
> --
> Regards,
> Manula Chathurika Thantriwatte
> Software Engineer
> WSO2 Inc. : http://wso2.com
> lean . enterprise . middleware
>
> email : manulac@wso2.com / manula@apache.org
> phone : +94 772492511
> blog : http://manulachathurika.blogspot.com/
>
>
>
>


-- 
Reka Thirunavukkarasu
Software Engineer,
WSO2, Inc.:http://wso2.com,
Mobile: +94776442007

Re: Erro in unsubscribing cartridge

Posted by Manula Chathurika Thantriwatte <ma...@wso2.com>.
Sure will do it.


On Fri, Jan 10, 2014 at 8:44 AM, Nirmal Fernando <ni...@gmail.com>wrote:

> Manula,
>
> Can you please debug and provide a fix for this issue? Probably some
> not-null field is null in the received event. Please also handle the
> possible NPEs you will come across.
>
> Thanks.
>
>
> On Fri, Jan 10, 2014 at 8:14 AM, Udara Liyanage <ud...@wso2.com> wrote:
>
>> Me too encountered the same continuously.
>>
>> Touched, not typed. Erroneous words are a feature, not a typo.
>>
>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>



-- 
Regards,
Manula Chathurika Thantriwatte
Software Engineer
WSO2 Inc. : http://wso2.com
lean . enterprise . middleware

email : manulac@wso2.com / manula@apache.org
phone : +94 772492511
blog : http://manulachathurika.blogspot.com/

Re: Erro in unsubscribing cartridge

Posted by Nirmal Fernando <ni...@gmail.com>.
Manula,

Can you please debug and provide a fix for this issue? Probably some
not-null field is null in the received event. Please also handle the
possible NPEs you will come across.

Thanks.


On Fri, Jan 10, 2014 at 8:14 AM, Udara Liyanage <ud...@wso2.com> wrote:

> Me too encountered the same continuously.
>
> Touched, not typed. Erroneous words are a feature, not a typo.
>



-- 
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

Re: Erro in unsubscribing cartridge

Posted by Udara Liyanage <ud...@wso2.com>.
Me too encountered the same continuously.

Touched, not typed. Erroneous words are a feature, not a typo.