I just added a null check for this, please try again: public static String extractRegion(IaasProvider iaas) { String region; // try to find region if ((region = iaas.getProperty(CloudControllerConstants.REGION_PROPERTY)) == null) { // if the property, isn't specified, try to obtain from the image id // image id can be in following format - {region}/{UUID} region = (iaas.getImage() != null) && (iaas.getImage().contains("/")) ? iaas.getImage().split("/")[0] : null; } return region; }
On Fri, Dec 12, 2014 at 1:04 AM, Lahiru Sandaruwan <lahi...@wso2.com> wrote: > It seems that issue is fixed now, A new error appered, > > ID: [0] [STRATOS] [2014-12-11 19:32:35,719] ERROR > {org.apache.stratos.cloud.controller.services.impl.InstanceTerminator} - > Instance termination failed! MemberContext > [memberId=mytomcat.tomcat.domaind745a023-b4dc-4013-aab3-e1e464dacf96, > nodeId=RegionOne/04f23b26-eda2-44e5-bcd1-85a083d93d48, > instanceId=app_cartridge_v1_1, clusterId=mytomcat.tomcat.domain, > partition=Partition [id=P1, description=null, isPublic=false, > provider=openstack, partitionMin=0, partitionMax=0, properties=Properties > [properties=[Property [name=region, value=RegionOne]]]], > cartridgeType=tomcat, privateIpAddress=10.0.0.12, > publicIpAddress=192.168.17.105, allocatedIpAddress=192.168.17.105, > initTime=1418325357000, lbClusterId=null, networkPartitionId=openstack_R1, > properties=Properties [properties=[Property [name=PRIMARY, value=false], > Property [name=MIN_COUNT, value=2]]]] > > java.lang.NullPointerException > > at > org.apache.stratos.cloud.controller.util.ComputeServiceBuilderUtil.extractRegion(ComputeServiceBuilderUtil.java:97) > > at > org.apache.stratos.cloud.controller.iaases.openstack.networking.NovaNetworkingApi.releaseAddress(NovaNetworkingApi.java:236) > > at > org.apache.stratos.cloud.controller.iaases.JcloudsOpenstackIaas.releaseAddress(JcloudsOpenstackIaas.java:238) > > at > org.apache.stratos.cloud.controller.iaases.JcloudsIaas.destroyNode(JcloudsIaas.java:315) > > at > org.apache.stratos.cloud.controller.iaases.JcloudsIaas.terminateInstance(JcloudsIaas.java:296) > > at > org.apache.stratos.cloud.controller.services.impl.InstanceTerminator.run(InstanceTerminator.java:56) > > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > > at java.lang.Thread.run(Thread.java:745) > > TID: [0] [STRATOS] [2014-12-11 19:32:35,720] INFO {org > > On Thu, Dec 11, 2014 at 11:04 PM, Imesh Gunaratne <im...@apache.org> > wrote: > >> I will have a look at this Lahiru. >> >> Thanks >> >> On Thu, Dec 11, 2014 at 6:24 PM, Lahiru Sandaruwan <lahi...@wso2.com> >> wrote: >> >>> Hi all, >>> >>> $subject in Openstack. It seems computeService become null. >>> >>> TID: [0] [STRATOS] [2014-12-11 12:09:06,853] INFO >>> {org.apache.stratos.autoscaler.client.CloudControllerClient} - Terminating >>> instance via cloud controller: [member] >>> mytomcat.tomcat.domainff51d231-d5d3-4c40-ab28-0334071ff14b >>> >>> TID: [0] [STRATOS] [2014-12-11 12:09:06,856] INFO >>> {org.apache.stratos.cloud.controller.iaases.JcloudsIaas} - Starting to >>> terminate member: [cartridge-type] tomcat [member-id] >>> mytomcat.tomcat.domainff51d231-d5d3-4c40-ab28-0334071ff14b >>> >>> TID: [0] [STRATOS] [2014-12-11 12:09:06,857] ERROR >>> {org.apache.stratos.cloud.controller.services.impl.InstanceTerminator} - >>> Instance termination failed! MemberContext >>> [memberId=mytomcat.tomcat.domainff51d231-d5d3-4c40-ab28-0334071ff14b, >>> nodeId=RegionOne/9818a8e6-3c1f-4319-8ea8-b3192d1b6c15, >>> instanceId=app_cartridge_v1_1, clusterId=mytomcat.tomcat.domain, >>> partition=Partition [id=P1, description=null, isPublic=false, >>> provider=openstack, partitionMin=0, partitionMax=0, properties=Properties >>> [properties=[Property [name=region, value=RegionOne]]]], >>> cartridgeType=tomcat, privateIpAddress=10.0.0.65, >>> publicIpAddress=192.168.17.114, allocatedIpAddress=192.168.17.114, >>> initTime=1418298486474, lbClusterId=null, networkPartitionId=openstack_R1, >>> properties=Properties [properties=[Property [name=PRIMARY, value=false], >>> Property [name=MIN_COUNT, value=2]]]] >>> >>> java.lang.NullPointerException >>> >>> at >>> org.apache.stratos.cloud.controller.iaases.JcloudsIaas.destroyNode(JcloudsIaas.java:311) >>> >>> at >>> org.apache.stratos.cloud.controller.iaases.JcloudsIaas.terminateInstance(JcloudsIaas.java:296) >>> >>> at >>> org.apache.stratos.cloud.controller.services.impl.InstanceTerminator.run(InstanceTerminator.java:56) >>> >>> at >>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) >>> >>> at >>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) >>> >>> at java.lang.Thread.run(Thread.java:745) >>> Thanks. >>> -- >>> -- >>> Lahiru Sandaruwan >>> Committer and PMC member, Apache Stratos, >>> Senior Software Engineer, >>> WSO2 Inc., http://wso2.com >>> lean.enterprise.middleware >>> >>> email: lahi...@wso2.com blog: http://lahiruwrites.blogspot.com/ >>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146 >>> >>> >> >> >> -- >> Imesh Gunaratne >> >> Technical Lead, WSO2 >> Committer & PMC Member, Apache Stratos >> > > > > -- > -- > Lahiru Sandaruwan > Committer and PMC member, Apache Stratos, > Senior Software Engineer, > WSO2 Inc., http://wso2.com > lean.enterprise.middleware > > email: lahi...@wso2.com blog: http://lahiruwrites.blogspot.com/ > linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146 > > -- Imesh Gunaratne Technical Lead, WSO2 Committer & PMC Member, Apache Stratos