You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by "Martin Eppel (meppel)" <me...@cisco.com> on 2015/01/28 20:04:12 UTC

4.1.0-alpha : Exception thrown when spawning an instance, see also jira STRATOS-1155

I am running into the following exception using the 4.1 alpha tagged stratos code in a rather basic scenario. I opened a jira (https://issues.apache.org/jira/browse/STRATOS-1155)

Btw, the instance gets started but fails to properly initialize (I suspect because of the exception) but never gets killed or moved to obsolete state.

Thanks

Martin

https://issues.apache.org/jira/browse/STRATOS-1155

Log snipplet:

TID: [0] [STRATOS] [2015-01-28 18:05:02,498] DEBUG {org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl} -  Payload: APPLICATION_ID=cisco_sample,GROUP_NAME=null,SERVICE_NAME=cisco-sample-vm,HOST_NAME=csco_sample_cartridge.qmog.cisco.com,MULTITENANT=false,TENANT_ID=-1234,TENANT_RANGE=*,CARTRIDGE_ALIAS=csco_sample_cartridge,CLUSTER_ID=csco_sample_cartridge.cisco-sample-vm.domain,CARTRIDGE_KEY=OW8htf5FfED64WV4,DEPLOYMENT=default,APPLICATION_PATH=/var/www,REPO_URL=null,PORTS=22,PROVIDER=cisco,PUPPET_IP=PUPPET_IP,PUPPET_HOSTNAME=PUPPET_HOSTNAME,PUPPET_DNS_AVAILABLE=null,PUPPET_ENV=false,,,DEPENDENCY_CLUSTER_IDS=,TRUSTSTORE_PASSWORD=wso2carbon,SIMPLE_PROPERTY=value,QTCM_DNS_SEGMENT=,CEP_PORT=7611,MONITORING_SERVER_SECURE_PORT=0,MB_PORT=1883,MB_IP=octl.qmog.cisco.com,QTCM_NETWORK_COUNT=1,CEP_IP=octl.qmog.cisco.com,ENABLE_DATA_PUBLISHER=false,MONITORING_SERVER_IP=octl.qmog.cisco.com,MONITORING_SERVER_ADMIN_PASSWORD=xxxx,MONITORING_SERVER_ADMIN_USERNAME=xxxx,CERT_TRUSTSTORE=/opt/apache-stratos-cartridge-agent/security/client-truststore.jks,MONITORING_SERVER_PORT=0,TOKEN=eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjgzNDExMTMxNCwic3ViIjoiYWRtaW4iLCJhenAiOiJvT1ZiVzBkNzlJWjFpZWJCRkF1WVMwNTJuSE1hIiwiYXBwSWQiOiJjaXNjb19zYW1wbGUiLCJhdWQiOlsib09WYlcwZDc5SVoxaWViQkZBdVlTMDUybkhNYSJdLCJpc3MiOiJodHRwczpcL1wvbG9jYWxob3N0Ojk0NDNcL29hdXRoMmVuZHBvaW50c1wvdG9rZW4iLCJpYXQiOjgzNDExMjMxNH0.X6txhcyTq1x5tRqGPSy0MAV4vqVfUnixUL9oj1q_9d1tnvhYKqx88VBuA_DBbmQ9zgRI5x1P-itB5KLNt7P4CbO3ZesEVamk0E1oF4JdT-L1xUu5QUMnHkQB1cBTMMRMaHF6EZTNayBHNi67TpceGooNVG8rrSSOoOj6WuC39tc,MEMBER_ID=csco_sample_cartridge.cisco-sample-vm.domain26605a6b-0296-4bba-b373-ecff150c9a40,INSTANCE_ID=null,CLUSTER_INSTANCE_ID=cisco_sample-1,LB_CLUSTER_ID=null,NETWORK_PARTITION_ID=N1,PARTITION_ID=RegionOne-Core,INTERNAL=false,PRIMARY=false,MIN_COUNT=1 {org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl}
TID: [0] [STRATOS] [2015-01-28 18:05:02,499] DEBUG {org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl} -  Starting the instance creator thread... {org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl}
TID: [0] [STRATOS] [2015-01-28 18:05:02,501] DEBUG {org.apache.stratos.cloud.controller.messaging.topology.TopologyManager} -  Write lock acquired {org.apache.stratos.cloud.controller.messaging.topology.TopologyManager}
TID: [0] [STRATOS] [2015-01-28 18:05:02,501] DEBUG {org.apache.stratos.messaging.domain.topology.lifecycle.LifeCycleStateManager} -  Lifecycle state manager initialized: [identifier] csco_sample_cartridge.cisco-sample-vm.domain26605a6b-0296-4bba-b373-ecff150c9a40 [state] Created {org.apache.stratos.messaging.domain.topology.lifecycle.LifeCycleStateManager}
TID: [0] [STRATOS] [2015-01-28 18:05:02,501] DEBUG {org.apache.stratos.cloud.controller.messaging.topology.TopologyManager} -  Write lock released {org.apache.stratos.cloud.controller.messaging.topology.TopologyManager}
TID: [0] [STRATOS] [2015-01-28 18:05:02,502] DEBUG {org.apache.stratos.cloud.controller.iaases.JcloudsIaas} -  Cloud controller is delegating request to start an instance for MemberContext [applicationId=cisco_sample, cartridgeType=cisco-sample-vm, clusterId=csco_sample_cartridge.cisco-sample-vm.domain, memberId=csco_sample_cartridge.cisco-sample-vm.domain26605a6b-0296-4bba-b373-ecff150c9a40, instanceId=null, partition=Partition [id=RegionOne-Core, description=null, isPublic=false, provider=Core, partitionMin=0, partitionMax=0, properties=Properties [properties=[Property [name=region, value=RegionOne]]]], defaultPrivateIP=null, defaultPublicIP=null, allocatedIPs=null, publicIPs=null, privateIPs=null, initTime=1422468302498, lbClusterId=null, networkPartitionId=N1, instanceMetadata=null, properties=Properties [properties=[Property [name=PRIMARY, value=false], Property [name=MIN_COUNT, value=1]]]] to jclouds {org.apache.stratos.cloud.controller.iaases.JcloudsIaas}
TID: [0] [STRATOS] [2015-01-28 18:05:02,503] ERROR {org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl} -  Failed to start instance: org.apache.stratos.cloud.controller.domain.InstanceContext@f58ed13 {org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl}
java.lang.ArrayIndexOutOfBoundsException: -1
               at java.util.Vector.elementData(Vector.java:730)
               at java.util.Vector.get(Vector.java:746)
               at org.apache.stratos.messaging.domain.topology.lifecycle.LifeCycleStateManager.getPreviousState(LifeCycleStateManager.java:130)
               at org.apache.stratos.messaging.domain.topology.lifecycle.LifeCycleStateManager.changeState(LifeCycleStateManager.java:95)
               at org.apache.stratos.messaging.domain.topology.Member.setStatus(Member.java:107)
               at org.apache.stratos.cloud.controller.messaging.topology.TopologyBuilder.handleMemberCreatedEvent(TopologyBuilder.java:409)
               at org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl.startInstance(CloudControllerServiceImpl.java:408)
               at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
               at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
               at java.lang.reflect.Method.invoke(Method.java:606)
               at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:212)
               at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:117)
               at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
               at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
               at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
               at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
               at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146)

Re: 4.1.0-alpha : Exception thrown when spawning an instance, see also jira STRATOS-1155

Posted by Imesh Gunaratne <im...@apache.org>.
Hi Martin,

Thanks for the information, I will check this in latest codebase and get
back to you soon.

Thanks

On Fri, Jan 30, 2015 at 1:29 AM, Martin Eppel (meppel) <me...@cisco.com>
wrote:

>  Imesh,
>
>
>
> The exception (shown below) only occurs when debug settings are turned on.
> When off, it seems to work fine,
>
>
>
> Please disregard the exception mentioned when debug is turned off which
> was caused by some other issue in my environment (I’ll update the jira
> accordingly)
>
>
>
> Thanks
>
>
>
> Martin
>
>
>
>
>
> TID: [0] [STRATOS] [2015-01-29 19:50:02,382] DEBUG
> {org.apache.stratos.cloud.controller.iaases.JcloudsIaas} -  Cloud
> controller is delegating request to start an instance for MemberContext
> [applicationId=cisco_sample, cartridgeType=cisco-sample-vm,
> clusterId=csco_sample_cartridge.cisco-sample-vm.domain,
> memberId=csco_sample_cartridge.cisco-sample-vm.domain757bdc9c-0fc6-4f78-a2d1-c5a4663e68c9,
> instanceId=null, partition=Partition [id=RegionOne-Core, description=null,
> isPublic=false, provider=Core, partitionMin=0, partitionMax=0,
> properties=Properties [properties=[Property [name=region,
> value=RegionOne]]]], defaultPrivateIP=null, defaultPublicIP=null,
> allocatedIPs=null, publicIPs=null, privateIPs=null, initTime=1422561002379,
> lbClusterId=null, networkPartitionId=N1, instanceMetadata=null,
> properties=Properties [properties=[Property [name=PRIMARY, value=false],
> Property [name=MIN_COUNT, value=1]]]] to jclouds
> {org.apache.stratos.cloud.controller.iaases.JcloudsIaas}TID: [0] [STRATOS]
> [2015-01-29 19:50:02,383] ERROR
> {org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl}
> -  Failed to start instance:
> org.apache.stratos.cloud.controller.domain.InstanceContext@14418844 *{org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl}java.lang.ArrayIndexOutOfBoundsException:
> -1*        at java.util.Vector.elementData(Vector.java:730)        at
> java.util.Vector.get(Vector.java:746)        at
> org.apache.stratos.messaging.domain.topology.lifecycle.LifeCycleStateManager.getPreviousState(LifeCycleStateManager.java:130)
> at
> org.apache.stratos.messaging.domain.topology.lifecycle.LifeCycleStateManager.changeState(LifeCycleStateManager.java:95)
> at
> org.apache.stratos.messaging.domain.topology.Member.setStatus(Member.java:107)
> at
> org.apache.stratos.cloud.controller.messaging.topology.TopologyBuilder.handleMemberCreatedEvent(TopologyBuilder.java:409)
>
>         at
> org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl.startInstance(CloudControllerServiceImpl.java:408)
>
>
>
>
>
>
>
> *From:* Imesh Gunaratne [mailto:imesh@apache.org]
> *Sent:* Thursday, January 29, 2015 2:27 AM
> *To:* dev
> *Subject:* Re: 4.1.0-alpha : Exception thrown when spawning an instance,
> see also jira STRATOS-1155
>
>
>
> Hi Martin,
>
>
>
> As it looks like this error has been raised due to the limited number of
> validations we have in the application creation process. May be there is a
> problem in the application definition which is not detected:
>
>
>
> java.lang.NullPointerException
> at
> org.apache.stratos.autoscaler.monitor.cluster.ClusterMonitor.handleMemberActivatedEvent(ClusterMonitor.java:1133)
> at
> org.apache.stratos.autoscaler.event.receiver.topology.AutoscalerTopologyEventReceiver$12.onEvent(AutoscalerTopologyEventReceiver.java:392)
> at
> org.apache.stratos.messaging.listener.EventListener.update(EventListener.java:42)
>
>
>
>   According to the code, it looks like the cluster instance context
> becomes null, we will try to re-create this in the latest codebase.
>
>
>
> Thanks
>
>
>
> On Thu, Jan 29, 2015 at 12:34 AM, Martin Eppel (meppel) <me...@cisco.com>
> wrote:
>
> I am running into the following exception using the 4.1 alpha tagged
> stratos code in a rather basic scenario. I opened a jira (
> https://issues.apache.org/jira/browse/STRATOS-1155)
>
>
>
> Btw, the instance gets started but fails to properly initialize (I suspect
> because of the exception) but never gets killed or moved to obsolete state.
>
>
>
> Thanks
>
>
>
> Martin
>
>
>
> https://issues.apache.org/jira/browse/STRATOS-1155
>
>
>
> Log snipplet:
>
>
>
> TID: [0] [STRATOS] [2015-01-28 18:05:02,498] DEBUG
> {org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl}
> -  Payload:
> APPLICATION_ID=cisco_sample,GROUP_NAME=null,SERVICE_NAME=cisco-sample-vm,HOST_NAME=
> csco_sample_cartridge.qmog.cisco.com
> ,MULTITENANT=false,TENANT_ID=-1234,TENANT_RANGE=*,CARTRIDGE_ALIAS=csco_sample_cartridge,CLUSTER_ID=csco_sample_cartridge.cisco-sample-vm.domain,CARTRIDGE_KEY=OW8htf5FfED64WV4,DEPLOYMENT=default,APPLICATION_PATH=/var/www,REPO_URL=null,PORTS=22,PROVIDER=cisco,PUPPET_IP=PUPPET_IP,PUPPET_HOSTNAME=PUPPET_HOSTNAME,PUPPET_DNS_AVAILABLE=null,PUPPET_ENV=false,,,DEPENDENCY_CLUSTER_IDS=,TRUSTSTORE_PASSWORD=wso2carbon,SIMPLE_PROPERTY=value,QTCM_DNS_SEGMENT=,CEP_PORT=7611,MONITORING_SERVER_SECURE_PORT=0,MB_PORT=1883,MB_IP=
> octl.qmog.cisco.com,QTCM_NETWORK_COUNT=1,CEP_IP=octl.qmog.cisco.com
> ,ENABLE_DATA_PUBLISHER=false,MONITORING_SERVER_IP=octl.qmog.cisco.com,MONITORING_SERVER_ADMIN_PASSWORD=xxxx,MONITORING_SERVER_ADMIN_USERNAME=xxxx,CERT_TRUSTSTORE=/opt/apache-stratos-cartridge-agent/security/client-truststore.jks,MONITORING_SERVER_PORT=0,TOKEN=eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjgzNDExMTMxNCwic3ViIjoiYWRtaW4iLCJhenAiOiJvT1ZiVzBkNzlJWjFpZWJCRkF1WVMwNTJuSE1hIiwiYXBwSWQiOiJjaXNjb19zYW1wbGUiLCJhdWQiOlsib09WYlcwZDc5SVoxaWViQkZBdVlTMDUybkhNYSJdLCJpc3MiOiJodHRwczpcL1wvbG9jYWxob3N0Ojk0NDNcL29hdXRoMmVuZHBvaW50c1wvdG9rZW4iLCJpYXQiOjgzNDExMjMxNH0.X6txhcyTq1x5tRqGPSy0MAV4vqVfUnixUL9oj1q_9d1tnvhYKqx88VBuA_DBbmQ9zgRI5x1P-itB5KLNt7P4CbO3ZesEVamk0E1oF4JdT-L1xUu5QUMnHkQB1cBTMMRMaHF6EZTNayBHNi67TpceGooNVG8rrSSOoOj6WuC39tc,MEMBER_ID=csco_sample_cartridge.cisco-sample-vm.domain26605a6b-0296-4bba-b373-ecff150c9a40,INSTANCE_ID=null,CLUSTER_INSTANCE_ID=cisco_sample-1,LB_CLUSTER_ID=null,NETWORK_PARTITION_ID=N1,PARTITION_ID=RegionOne-Core,INTERNAL=false,PRIMARY=false,MIN_COUNT=1
> {org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl}
>
> TID: [0] [STRATOS] [2015-01-28 18:05:02,499] DEBUG
> {org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl}
> -  Starting the instance creator thread...
> {org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl}
>
> TID: [0] [STRATOS] [2015-01-28 18:05:02,501] DEBUG
> {org.apache.stratos.cloud.controller.messaging.topology.TopologyManager} -
> Write lock acquired
> {org.apache.stratos.cloud.controller.messaging.topology.TopologyManager}
>
> TID: [0] [STRATOS] [2015-01-28 18:05:02,501] DEBUG
> {org.apache.stratos.messaging.domain.topology.lifecycle.LifeCycleStateManager}
> -  Lifecycle state manager initialized: [identifier]
> csco_sample_cartridge.cisco-sample-vm.domain26605a6b-0296-4bba-b373-ecff150c9a40
> [state] Created
> {org.apache.stratos.messaging.domain.topology.lifecycle.LifeCycleStateManager}
>
> TID: [0] [STRATOS] [2015-01-28 18:05:02,501] DEBUG
> {org.apache.stratos.cloud.controller.messaging.topology.TopologyManager} -
> Write lock released
> {org.apache.stratos.cloud.controller.messaging.topology.TopologyManager}
>
> TID: [0] [STRATOS] [2015-01-28 18:05:02,502] DEBUG
> {org.apache.stratos.cloud.controller.iaases.JcloudsIaas} -  Cloud
> controller is delegating request to start an instance for MemberContext
> [applicationId=cisco_sample, cartridgeType=cisco-sample-vm,
> clusterId=csco_sample_cartridge.cisco-sample-vm.domain,
> memberId=csco_sample_cartridge.cisco-sample-vm.domain26605a6b-0296-4bba-b373-ecff150c9a40,
> instanceId=null, partition=Partition [id=RegionOne-Core, description=null,
> isPublic=false, provider=Core, partitionMin=0, partitionMax=0,
> properties=Properties [properties=[Property [name=region,
> value=RegionOne]]]], defaultPrivateIP=null, defaultPublicIP=null,
> allocatedIPs=null, publicIPs=null, privateIPs=null, initTime=1422468302498,
> lbClusterId=null, networkPartitionId=N1, instanceMetadata=null,
> properties=Properties [properties=[Property [name=PRIMARY, value=false],
> Property [name=MIN_COUNT, value=1]]]] to jclouds
> {org.apache.stratos.cloud.controller.iaases.JcloudsIaas}
>
> TID: [0] [STRATOS] [2015-01-28 18:05:02,503] ERROR
> {org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl}
> -  Failed to start instance:
> org.apache.stratos.cloud.controller.domain.InstanceContext@f58ed13
> {org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl}
>
> java.lang.ArrayIndexOutOfBoundsException: -1
>
>                at java.util.Vector.elementData(Vector.java:730)
>
>                at java.util.Vector.get(Vector.java:746)
>
>                at
> org.apache.stratos.messaging.domain.topology.lifecycle.LifeCycleStateManager.getPreviousState(LifeCycleStateManager.java:130)
>
>                at
> org.apache.stratos.messaging.domain.topology.lifecycle.LifeCycleStateManager.changeState(LifeCycleStateManager.java:95)
>
>                at
> org.apache.stratos.messaging.domain.topology.Member.setStatus(Member.java:107)
>
>                at
> org.apache.stratos.cloud.controller.messaging.topology.TopologyBuilder.handleMemberCreatedEvent(TopologyBuilder.java:409)
>
>                at
> org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl.startInstance(CloudControllerServiceImpl.java:408)
>
>                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
>
>                at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>
>                at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>
>                at java.lang.reflect.Method.invoke(Method.java:606)
>
>                at
> org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:212)
>
>                at
> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:117)
>
>                at
> org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
>
>                at
> org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
>
>                at
> org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
>
>                at
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
>
>                at
> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146)
>
>
>
>
>
>
> --
>
> Imesh Gunaratne
>
>
>
> Technical Lead, WSO2
>
> Committer & PMC Member, Apache Stratos
>



-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

RE: 4.1.0-alpha : Exception thrown when spawning an instance, see also jira STRATOS-1155

Posted by "Martin Eppel (meppel)" <me...@cisco.com>.
Imesh,

The exception (shown below) only occurs when debug settings are turned on. When off, it seems to work fine,

Please disregard the exception mentioned when debug is turned off which was caused by some other issue in my environment (I’ll update the jira accordingly)

Thanks

Martin


TID: [0] [STRATOS] [2015-01-29 19:50:02,382] DEBUG {org.apache.stratos.cloud.controller.iaases.JcloudsIaas} -  Cloud controller is delegating request to start an instance for MemberContext [applicationId=cisco_sample, cartridgeType=cisco-sample-vm, clusterId=csco_sample_cartridge.cisco-sample-vm.domain, memberId=csco_sample_cartridge.cisco-sample-vm.domain757bdc9c-0fc6-4f78-a2d1-c5a4663e68c9, instanceId=null, partition=Partition [id=RegionOne-Core, description=null, isPublic=false, provider=Core, partitionMin=0, partitionMax=0, properties=Properties [properties=[Property [name=region, value=RegionOne]]]], defaultPrivateIP=null, defaultPublicIP=null, allocatedIPs=null, publicIPs=null, privateIPs=null, initTime=1422561002379, lbClusterId=null, networkPartitionId=N1, instanceMetadata=null, properties=Properties [properties=[Property [name=PRIMARY, value=false], Property [name=MIN_COUNT, value=1]]]] to jclouds {org.apache.stratos.cloud.controller.iaases.JcloudsIaas}TID: [0] [STRATOS] [2015-01-29 19:50:02,383] ERROR {org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl} -  Failed to start instance: org.apache.stratos.cloud.controller.domain.InstanceContext@14418844 {org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl}java.lang.ArrayIndexOutOfBoundsException: -1        at java.util.Vector.elementData(Vector.java:730)        at java.util.Vector.get(Vector.java:746)        at org.apache.stratos.messaging.domain.topology.lifecycle.LifeCycleStateManager.getPreviousState(LifeCycleStateManager.java:130)        at org.apache.stratos.messaging.domain.topology.lifecycle.LifeCycleStateManager.changeState(LifeCycleStateManager.java:95)        at org.apache.stratos.messaging.domain.topology.Member.setStatus(Member.java:107)        at org.apache.stratos.cloud.controller.messaging.topology.TopologyBuilder.handleMemberCreatedEvent(TopologyBuilder.java:409)
        at org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl.startInstance(CloudControllerServiceImpl.java:408)



From: Imesh Gunaratne [mailto:imesh@apache.org]
Sent: Thursday, January 29, 2015 2:27 AM
To: dev
Subject: Re: 4.1.0-alpha : Exception thrown when spawning an instance, see also jira STRATOS-1155

Hi Martin,

As it looks like this error has been raised due to the limited number of validations we have in the application creation process. May be there is a problem in the application definition which is not detected:

java.lang.NullPointerException
at org.apache.stratos.autoscaler.monitor.cluster.ClusterMonitor.handleMemberActivatedEvent(ClusterMonitor.java:1133)
at org.apache.stratos.autoscaler.event.receiver.topology.AutoscalerTopologyEventReceiver$12.onEvent(AutoscalerTopologyEventReceiver.java:392)
at org.apache.stratos.messaging.listener.EventListener.update(EventListener.java:42)

[cid:image002.png@01D03BBA.FAC98110]
According to the code, it looks like the cluster instance context becomes null, we will try to re-create this in the latest codebase.

Thanks

On Thu, Jan 29, 2015 at 12:34 AM, Martin Eppel (meppel) <me...@cisco.com>> wrote:
I am running into the following exception using the 4.1 alpha tagged stratos code in a rather basic scenario. I opened a jira (https://issues.apache.org/jira/browse/STRATOS-1155)

Btw, the instance gets started but fails to properly initialize (I suspect because of the exception) but never gets killed or moved to obsolete state.

Thanks

Martin

https://issues.apache.org/jira/browse/STRATOS-1155

Log snipplet:

TID: [0] [STRATOS] [2015-01-28 18:05:02,498] DEBUG {org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl} -  Payload: APPLICATION_ID=cisco_sample,GROUP_NAME=null,SERVICE_NAME=cisco-sample-vm,HOST_NAME=csco_sample_cartridge.qmog.cisco.com<http://csco_sample_cartridge.qmog.cisco.com>,MULTITENANT=false,TENANT_ID=-1234,TENANT_RANGE=*,CARTRIDGE_ALIAS=csco_sample_cartridge,CLUSTER_ID=csco_sample_cartridge.cisco-sample-vm.domain,CARTRIDGE_KEY=OW8htf5FfED64WV4,DEPLOYMENT=default,APPLICATION_PATH=/var/www,REPO_URL=null,PORTS=22,PROVIDER=cisco,PUPPET_IP=PUPPET_IP,PUPPET_HOSTNAME=PUPPET_HOSTNAME,PUPPET_DNS_AVAILABLE=null,PUPPET_ENV=false,,,DEPENDENCY_CLUSTER_IDS=,TRUSTSTORE_PASSWORD=wso2carbon,SIMPLE_PROPERTY=value,QTCM_DNS_SEGMENT=,CEP_PORT=7611,MONITORING_SERVER_SECURE_PORT=0,MB_PORT=1883,MB_IP=octl.qmog.cisco.com<http://octl.qmog.cisco.com>,QTCM_NETWORK_COUNT=1,CEP_IP=octl.qmog.cisco.com<http://octl.qmog.cisco.com>,ENABLE_DATA_PUBLISHER=false,MONITORING_SERVER_IP=octl.qmog.cisco.com<http://octl.qmog.cisco.com>,MONITORING_SERVER_ADMIN_PASSWORD=xxxx,MONITORING_SERVER_ADMIN_USERNAME=xxxx,CERT_TRUSTSTORE=/opt/apache-stratos-cartridge-agent/security/client-truststore.jks,MONITORING_SERVER_PORT=0,TOKEN=eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjgzNDExMTMxNCwic3ViIjoiYWRtaW4iLCJhenAiOiJvT1ZiVzBkNzlJWjFpZWJCRkF1WVMwNTJuSE1hIiwiYXBwSWQiOiJjaXNjb19zYW1wbGUiLCJhdWQiOlsib09WYlcwZDc5SVoxaWViQkZBdVlTMDUybkhNYSJdLCJpc3MiOiJodHRwczpcL1wvbG9jYWxob3N0Ojk0NDNcL29hdXRoMmVuZHBvaW50c1wvdG9rZW4iLCJpYXQiOjgzNDExMjMxNH0.X6txhcyTq1x5tRqGPSy0MAV4vqVfUnixUL9oj1q_9d1tnvhYKqx88VBuA_DBbmQ9zgRI5x1P-itB5KLNt7P4CbO3ZesEVamk0E1oF4JdT-L1xUu5QUMnHkQB1cBTMMRMaHF6EZTNayBHNi67TpceGooNVG8rrSSOoOj6WuC39tc,MEMBER_ID=csco_sample_cartridge.cisco-sample-vm.domain26605a6b-0296-4bba-b373-ecff150c9a40,INSTANCE_ID=null,CLUSTER_INSTANCE_ID=cisco_sample-1,LB_CLUSTER_ID=null,NETWORK_PARTITION_ID=N1,PARTITION_ID=RegionOne-Core,INTERNAL=false,PRIMARY=false,MIN_COUNT=1 {org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl}
TID: [0] [STRATOS] [2015-01-28 18:05:02,499] DEBUG {org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl} -  Starting the instance creator thread... {org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl}
TID: [0] [STRATOS] [2015-01-28 18:05:02,501] DEBUG {org.apache.stratos.cloud.controller.messaging.topology.TopologyManager} -  Write lock acquired {org.apache.stratos.cloud.controller.messaging.topology.TopologyManager}
TID: [0] [STRATOS] [2015-01-28 18:05:02,501] DEBUG {org.apache.stratos.messaging.domain.topology.lifecycle.LifeCycleStateManager} -  Lifecycle state manager initialized: [identifier] csco_sample_cartridge.cisco-sample-vm.domain26605a6b-0296-4bba-b373-ecff150c9a40 [state] Created {org.apache.stratos.messaging.domain.topology.lifecycle.LifeCycleStateManager}
TID: [0] [STRATOS] [2015-01-28 18:05:02,501] DEBUG {org.apache.stratos.cloud.controller.messaging.topology.TopologyManager} -  Write lock released {org.apache.stratos.cloud.controller.messaging.topology.TopologyManager}
TID: [0] [STRATOS] [2015-01-28 18:05:02,502] DEBUG {org.apache.stratos.cloud.controller.iaases.JcloudsIaas} -  Cloud controller is delegating request to start an instance for MemberContext [applicationId=cisco_sample, cartridgeType=cisco-sample-vm, clusterId=csco_sample_cartridge.cisco-sample-vm.domain, memberId=csco_sample_cartridge.cisco-sample-vm.domain26605a6b-0296-4bba-b373-ecff150c9a40, instanceId=null, partition=Partition [id=RegionOne-Core, description=null, isPublic=false, provider=Core, partitionMin=0, partitionMax=0, properties=Properties [properties=[Property [name=region, value=RegionOne]]]], defaultPrivateIP=null, defaultPublicIP=null, allocatedIPs=null, publicIPs=null, privateIPs=null, initTime=1422468302498, lbClusterId=null, networkPartitionId=N1, instanceMetadata=null, properties=Properties [properties=[Property [name=PRIMARY, value=false], Property [name=MIN_COUNT, value=1]]]] to jclouds {org.apache.stratos.cloud.controller.iaases.JcloudsIaas}
TID: [0] [STRATOS] [2015-01-28 18:05:02,503] ERROR {org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl} -  Failed to start instance: org.apache.stratos.cloud.controller.domain.InstanceContext@f58ed13<ma...@f58ed13> {org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl}
java.lang.ArrayIndexOutOfBoundsException: -1
               at java.util.Vector.elementData(Vector.java:730)
               at java.util.Vector.get(Vector.java:746)
               at org.apache.stratos.messaging.domain.topology.lifecycle.LifeCycleStateManager.getPreviousState(LifeCycleStateManager.java:130)
               at org.apache.stratos.messaging.domain.topology.lifecycle.LifeCycleStateManager.changeState(LifeCycleStateManager.java:95)
               at org.apache.stratos.messaging.domain.topology.Member.setStatus(Member.java:107)
               at org.apache.stratos.cloud.controller.messaging.topology.TopologyBuilder.handleMemberCreatedEvent(TopologyBuilder.java:409)
               at org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl.startInstance(CloudControllerServiceImpl.java:408)
               at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
               at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
               at java.lang.reflect.Method.invoke(Method.java:606)
               at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:212)
               at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:117)
               at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
               at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
               at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
               at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
               at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146)



--
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Re: 4.1.0-alpha : Exception thrown when spawning an instance, see also jira STRATOS-1155

Posted by Imesh Gunaratne <im...@apache.org>.
Hi Martin,

As it looks like this error has been raised due to the limited number of
validations we have in the application creation process. May be there is a
problem in the application definition which is not detected:

java.lang.NullPointerException
at
org.apache.stratos.autoscaler.monitor.cluster.ClusterMonitor.handleMemberActivatedEvent(ClusterMonitor.java:1133)
at
org.apache.stratos.autoscaler.event.receiver.topology.AutoscalerTopologyEventReceiver$12.onEvent(AutoscalerTopologyEventReceiver.java:392)
at
org.apache.stratos.messaging.listener.EventListener.update(EventListener.java:42)



According to the code, it looks like the cluster instance context becomes
null, we will try to re-create this in the latest codebase.

Thanks

On Thu, Jan 29, 2015 at 12:34 AM, Martin Eppel (meppel) <me...@cisco.com>
wrote:

>  I am running into the following exception using the 4.1 alpha tagged
> stratos code in a rather basic scenario. I opened a jira (
> https://issues.apache.org/jira/browse/STRATOS-1155)
>
>
>
> Btw, the instance gets started but fails to properly initialize (I suspect
> because of the exception) but never gets killed or moved to obsolete state.
>
>
>
> Thanks
>
>
>
> Martin
>
>
>
> https://issues.apache.org/jira/browse/STRATOS-1155
>
>
>
> Log snipplet:
>
>
>
> TID: [0] [STRATOS] [2015-01-28 18:05:02,498] DEBUG
> {org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl}
> -  Payload:
> APPLICATION_ID=cisco_sample,GROUP_NAME=null,SERVICE_NAME=cisco-sample-vm,HOST_NAME=
> csco_sample_cartridge.qmog.cisco.com
> ,MULTITENANT=false,TENANT_ID=-1234,TENANT_RANGE=*,CARTRIDGE_ALIAS=csco_sample_cartridge,CLUSTER_ID=csco_sample_cartridge.cisco-sample-vm.domain,CARTRIDGE_KEY=OW8htf5FfED64WV4,DEPLOYMENT=default,APPLICATION_PATH=/var/www,REPO_URL=null,PORTS=22,PROVIDER=cisco,PUPPET_IP=PUPPET_IP,PUPPET_HOSTNAME=PUPPET_HOSTNAME,PUPPET_DNS_AVAILABLE=null,PUPPET_ENV=false,,,DEPENDENCY_CLUSTER_IDS=,TRUSTSTORE_PASSWORD=wso2carbon,SIMPLE_PROPERTY=value,QTCM_DNS_SEGMENT=,CEP_PORT=7611,MONITORING_SERVER_SECURE_PORT=0,MB_PORT=1883,MB_IP=
> octl.qmog.cisco.com,QTCM_NETWORK_COUNT=1,CEP_IP=octl.qmog.cisco.com
> ,ENABLE_DATA_PUBLISHER=false,MONITORING_SERVER_IP=octl.qmog.cisco.com,MONITORING_SERVER_ADMIN_PASSWORD=xxxx,MONITORING_SERVER_ADMIN_USERNAME=xxxx,CERT_TRUSTSTORE=/opt/apache-stratos-cartridge-agent/security/client-truststore.jks,MONITORING_SERVER_PORT=0,TOKEN=eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjgzNDExMTMxNCwic3ViIjoiYWRtaW4iLCJhenAiOiJvT1ZiVzBkNzlJWjFpZWJCRkF1WVMwNTJuSE1hIiwiYXBwSWQiOiJjaXNjb19zYW1wbGUiLCJhdWQiOlsib09WYlcwZDc5SVoxaWViQkZBdVlTMDUybkhNYSJdLCJpc3MiOiJodHRwczpcL1wvbG9jYWxob3N0Ojk0NDNcL29hdXRoMmVuZHBvaW50c1wvdG9rZW4iLCJpYXQiOjgzNDExMjMxNH0.X6txhcyTq1x5tRqGPSy0MAV4vqVfUnixUL9oj1q_9d1tnvhYKqx88VBuA_DBbmQ9zgRI5x1P-itB5KLNt7P4CbO3ZesEVamk0E1oF4JdT-L1xUu5QUMnHkQB1cBTMMRMaHF6EZTNayBHNi67TpceGooNVG8rrSSOoOj6WuC39tc,MEMBER_ID=csco_sample_cartridge.cisco-sample-vm.domain26605a6b-0296-4bba-b373-ecff150c9a40,INSTANCE_ID=null,CLUSTER_INSTANCE_ID=cisco_sample-1,LB_CLUSTER_ID=null,NETWORK_PARTITION_ID=N1,PARTITION_ID=RegionOne-Core,INTERNAL=false,PRIMARY=false,MIN_COUNT=1
> {org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl}
>
> TID: [0] [STRATOS] [2015-01-28 18:05:02,499] DEBUG
> {org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl}
> -  Starting the instance creator thread...
> {org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl}
>
> TID: [0] [STRATOS] [2015-01-28 18:05:02,501] DEBUG
> {org.apache.stratos.cloud.controller.messaging.topology.TopologyManager} -
> Write lock acquired
> {org.apache.stratos.cloud.controller.messaging.topology.TopologyManager}
>
> TID: [0] [STRATOS] [2015-01-28 18:05:02,501] DEBUG
> {org.apache.stratos.messaging.domain.topology.lifecycle.LifeCycleStateManager}
> -  Lifecycle state manager initialized: [identifier]
> csco_sample_cartridge.cisco-sample-vm.domain26605a6b-0296-4bba-b373-ecff150c9a40
> [state] Created
> {org.apache.stratos.messaging.domain.topology.lifecycle.LifeCycleStateManager}
>
> TID: [0] [STRATOS] [2015-01-28 18:05:02,501] DEBUG
> {org.apache.stratos.cloud.controller.messaging.topology.TopologyManager} -
> Write lock released
> {org.apache.stratos.cloud.controller.messaging.topology.TopologyManager}
>
> TID: [0] [STRATOS] [2015-01-28 18:05:02,502] DEBUG
> {org.apache.stratos.cloud.controller.iaases.JcloudsIaas} -  Cloud
> controller is delegating request to start an instance for MemberContext
> [applicationId=cisco_sample, cartridgeType=cisco-sample-vm,
> clusterId=csco_sample_cartridge.cisco-sample-vm.domain,
> memberId=csco_sample_cartridge.cisco-sample-vm.domain26605a6b-0296-4bba-b373-ecff150c9a40,
> instanceId=null, partition=Partition [id=RegionOne-Core, description=null,
> isPublic=false, provider=Core, partitionMin=0, partitionMax=0,
> properties=Properties [properties=[Property [name=region,
> value=RegionOne]]]], defaultPrivateIP=null, defaultPublicIP=null,
> allocatedIPs=null, publicIPs=null, privateIPs=null, initTime=1422468302498,
> lbClusterId=null, networkPartitionId=N1, instanceMetadata=null,
> properties=Properties [properties=[Property [name=PRIMARY, value=false],
> Property [name=MIN_COUNT, value=1]]]] to jclouds
> {org.apache.stratos.cloud.controller.iaases.JcloudsIaas}
>
> TID: [0] [STRATOS] [2015-01-28 18:05:02,503] ERROR
> {org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl}
> -  Failed to start instance:
> org.apache.stratos.cloud.controller.domain.InstanceContext@f58ed13
> {org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl}
>
> java.lang.ArrayIndexOutOfBoundsException: -1
>
>                at java.util.Vector.elementData(Vector.java:730)
>
>                at java.util.Vector.get(Vector.java:746)
>
>                at
> org.apache.stratos.messaging.domain.topology.lifecycle.LifeCycleStateManager.getPreviousState(LifeCycleStateManager.java:130)
>
>                at
> org.apache.stratos.messaging.domain.topology.lifecycle.LifeCycleStateManager.changeState(LifeCycleStateManager.java:95)
>
>                at
> org.apache.stratos.messaging.domain.topology.Member.setStatus(Member.java:107)
>
>                at
> org.apache.stratos.cloud.controller.messaging.topology.TopologyBuilder.handleMemberCreatedEvent(TopologyBuilder.java:409)
>
>                at
> org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl.startInstance(CloudControllerServiceImpl.java:408)
>
>                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
>
>                at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>
>                at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>
>                at java.lang.reflect.Method.invoke(Method.java:606)
>
>                at
> org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:212)
>
>                at
> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:117)
>
>                at
> org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
>
>                at
> org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
>
>                at
> org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
>
>                at
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
>
>                at
> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146)
>



-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos