brooklyncentral / clocker

Apache Brooklyn cloud native infrastructure blueprints
Apache License 2.0
428 stars 66 forks source link

NPE in VirtualNetworkImpl.stop, when stopping app #255

Closed aledsage closed 8 years ago

aledsage commented 8 years ago

I deployed the "riak-cluster-demo-application:1.0.0" to a vanilla single-host clocker infrastructure. It failed (attempting to use non-root username for haproxy instance - but that's not the purpose of this bug report).

When I called stop() effector on the riak-app, it failed: the VirtualNetwork entity threw a NullPointerException. This caused the app's stop to fail entirely. I had to "unmanage" the entity via the "advanced" tab in the web-console.

Failed after 9ms: Error invoking stop at BasicApplicationImpl{id=NVotjods}: 2 of 4 parallel child tasks failed; 2 errors including: Error invoking stop at VirtualNetworkImpl{id=Vsrz1kMP}: NullPointerException

org.apache.brooklyn.core.mgmt.internal.EffectorUtils$EffectorCallPropagatedRuntimeException: Error invoking stop at BasicApplicationImpl{id=NVotjods}: 2 of 4 parallel child tasks failed; 2 errors including: Error invoking stop at VirtualNetworkImpl{id=Vsrz1kMP}: NullPointerException
    at org.apache.brooklyn.core.mgmt.internal.EffectorUtils$EffectorCallPropagatedRuntimeException.propagate(EffectorUtils.java:299)
    at org.apache.brooklyn.core.mgmt.internal.EffectorUtils$EffectorCallPropagatedRuntimeException.access$100(EffectorUtils.java:266)
    at org.apache.brooklyn.core.mgmt.internal.EffectorUtils.handleEffectorException(EffectorUtils.java:306)
    at org.apache.brooklyn.core.mgmt.internal.EffectorUtils.invokeMethodEffector(EffectorUtils.java:260)
    at org.apache.brooklyn.core.effector.MethodEffector.call(MethodEffector.java:149)
    at org.apache.brooklyn.core.entity.trait.Startable$StopEffectorBody.call(Startable.java:68)
    at org.apache.brooklyn.core.entity.trait.Startable$StopEffectorBody.call(Startable.java:60)
    at org.apache.brooklyn.core.effector.EffectorTasks$EffectorBodyTaskFactory$1.call(EffectorTasks.java:82)
    at org.apache.brooklyn.util.core.task.DynamicSequentialTask$DstJob.call(DynamicSequentialTask.java:359)
    at org.apache.brooklyn.util.core.task.BasicExecutionManager$SubmissionCallable.call(BasicExecutionManager.java:518)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    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)
Caused by: java.util.concurrent.ExecutionException: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: 2 of 4 parallel child tasks failed; 2 errors including: Error invoking stop at VirtualNetworkImpl{id=Vsrz1kMP}: NullPointerException
    at org.apache.brooklyn.core.mgmt.internal.AbstractManagementContext.invokeEffectorMethodSync(AbstractManagementContext.java:337)
    at org.apache.brooklyn.core.mgmt.internal.EffectorUtils.invokeMethodEffector(EffectorUtils.java:255)
    ... 10 more
Caused by: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: 2 of 4 parallel child tasks failed; 2 errors including: Error invoking stop at VirtualNetworkImpl{id=Vsrz1kMP}: NullPointerException
    at org.apache.brooklyn.util.exceptions.Exceptions.propagate(Exceptions.java:128)
    at org.apache.brooklyn.util.core.task.BasicTask.getUnchecked(BasicTask.java:372)
    at org.apache.brooklyn.core.entity.trait.StartableMethods.stop(StartableMethods.java:59)
    at org.apache.brooklyn.core.entity.AbstractApplication.doStop(AbstractApplication.java:239)
    at org.apache.brooklyn.core.entity.AbstractApplication.stop(AbstractApplication.java:214)
    at sun.reflect.GeneratedMethodAccessor116.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016)
    at groovy.lang.DelegatingMetaClass.invokeMethod(DelegatingMetaClass.java:149)
    at groovy.lang.MetaObjectProtocol$invokeMethod.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
    at groovy.lang.MetaObjectProtocol$invokeMethod.call(Unknown Source)
    at org.apache.brooklyn.util.groovy.GroovyJavaMethods.invokeMethodOnMetaClass(GroovyJavaMethods.java:191)
    at org.apache.brooklyn.core.mgmt.internal.AbstractManagementContext.invokeEffectorMethodLocal(AbstractManagementContext.java:309)
    at org.apache.brooklyn.core.mgmt.internal.AbstractManagementContext.invokeEffectorMethodSync(AbstractManagementContext.java:333)
    ... 11 more
Caused by: java.util.concurrent.ExecutionException: org.apache.brooklyn.util.exceptions.CompoundRuntimeException: 2 of 4 parallel child tasks failed; 2 errors including: Error invoking stop at VirtualNetworkImpl{id=Vsrz1kMP}: NullPointerException
    at java.util.concurrent.FutureTask.report(FutureTask.java:122)
    at java.util.concurrent.FutureTask.get(FutureTask.java:188)
    at com.google.common.util.concurrent.ForwardingFuture.get(ForwardingFuture.java:63)
    at org.apache.brooklyn.util.core.task.BasicTask.get(BasicTask.java:361)
    at org.apache.brooklyn.util.core.task.BasicTask.getUnchecked(BasicTask.java:370)
    ... 28 more
Caused by: org.apache.brooklyn.util.exceptions.CompoundRuntimeException: 2 of 4 parallel child tasks failed; 2 errors including: Error invoking stop at VirtualNetworkImpl{id=Vsrz1kMP}: NullPointerException
    at org.apache.brooklyn.util.exceptions.Exceptions.create(Exceptions.java:393)
    at org.apache.brooklyn.util.exceptions.Exceptions.propagate(Exceptions.java:374)
    at org.apache.brooklyn.util.core.task.ParallelTask.runJobs(ParallelTask.java:81)
    at org.apache.brooklyn.util.core.task.CompoundTask$1.call(CompoundTask.java:81)
    at org.apache.brooklyn.util.core.task.CompoundTask$1.call(CompoundTask.java:79)
    ... 5 more
Caused by: java.util.concurrent.ExecutionException: org.apache.brooklyn.core.mgmt.internal.EffectorUtils$EffectorCallPropagatedRuntimeException: Error invoking stop at VirtualNetworkImpl{id=Vsrz1kMP}: NullPointerException
    at java.util.concurrent.FutureTask.report(FutureTask.java:122)
    at java.util.concurrent.FutureTask.get(FutureTask.java:188)
    at com.google.common.util.concurrent.ForwardingFuture.get(ForwardingFuture.java:63)
    at org.apache.brooklyn.util.core.task.BasicTask.get(BasicTask.java:361)
    at org.apache.brooklyn.util.core.task.ParallelTask.runJobs(ParallelTask.java:63)
    ... 7 more
Caused by: org.apache.brooklyn.core.mgmt.internal.EffectorUtils$EffectorCallPropagatedRuntimeException: Error invoking stop at VirtualNetworkImpl{id=Vsrz1kMP}: NullPointerException
    at org.apache.brooklyn.core.mgmt.internal.EffectorUtils$EffectorCallPropagatedRuntimeException.propagate(EffectorUtils.java:299)
    at org.apache.brooklyn.core.mgmt.internal.EffectorUtils$EffectorCallPropagatedRuntimeException.access$100(EffectorUtils.java:266)
    at org.apache.brooklyn.core.mgmt.internal.EffectorUtils.handleEffectorException(EffectorUtils.java:306)
    at org.apache.brooklyn.core.mgmt.internal.EffectorUtils.invokeMethodEffector(EffectorUtils.java:260)
    at org.apache.brooklyn.core.effector.MethodEffector.call(MethodEffector.java:149)
    at org.apache.brooklyn.core.entity.trait.Startable$StopEffectorBody.call(Startable.java:68)
    at org.apache.brooklyn.core.entity.trait.Startable$StopEffectorBody.call(Startable.java:60)
    at org.apache.brooklyn.core.effector.EffectorTasks$EffectorBodyTaskFactory$1.call(EffectorTasks.java:82)
    at org.apache.brooklyn.util.core.task.DynamicSequentialTask$DstJob.call(DynamicSequentialTask.java:359)
    ... 5 more
Caused by: java.util.concurrent.ExecutionException: java.lang.NullPointerException
    at org.apache.brooklyn.core.mgmt.internal.AbstractManagementContext.invokeEffectorMethodSync(AbstractManagementContext.java:337)
    at org.apache.brooklyn.core.mgmt.internal.EffectorUtils.invokeMethodEffector(EffectorUtils.java:255)
    ... 10 more
Caused by: java.lang.NullPointerException
    at brooklyn.networking.VirtualNetworkImpl.stop(VirtualNetworkImpl.java:108)
    at sun.reflect.GeneratedMethodAccessor116.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016)
    at groovy.lang.DelegatingMetaClass.invokeMethod(DelegatingMetaClass.java:149)
    at groovy.lang.MetaObjectProtocol$invokeMethod.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
    at groovy.lang.MetaObjectProtocol$invokeMethod.call(Unknown Source)
    at org.apache.brooklyn.util.groovy.GroovyJavaMethods.invokeMethodOnMetaClass(GroovyJavaMethods.java:191)
    at org.apache.brooklyn.core.mgmt.internal.AbstractManagementContext.invokeEffectorMethodLocal(AbstractManagementContext.java:309)
    at org.apache.brooklyn.core.mgmt.internal.AbstractManagementContext.invokeEffectorMethodSync(AbstractManagementContext.java:333)
    ... 11 more
grkvlt commented 8 years ago

Fixed by #260