You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by "Aled Sage (JIRA)" <ji...@apache.org> on 2017/04/27 19:36:04 UTC

[jira] [Commented] (BROOKLYN-346) NPE after restart, in AutoScalerPolicy.onMetricChanged (when using yaml DSL for config)

    [ https://issues.apache.org/jira/browse/BROOKLYN-346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15987384#comment-15987384 ] 

Aled Sage commented on BROOKLYN-346:
------------------------------------

See https://issues.apache.org/jira/browse/BROOKLYN-345?focusedCommentId=15670344&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15670344 (which explains the underlying error), and https://github.com/apache/brooklyn-server/pull/440 for the fix.

> NPE after restart, in AutoScalerPolicy.onMetricChanged (when using yaml DSL for config)
> ---------------------------------------------------------------------------------------
>
>                 Key: BROOKLYN-346
>                 URL: https://issues.apache.org/jira/browse/BROOKLYN-346
>             Project: Brooklyn
>          Issue Type: Bug
>            Reporter: Aled Sage
>            Priority: Minor
>             Fix For: 0.10.0
>
>
> After restarting Brooklyn (using 0.10.0-SNAPSHOT), I saw the NPE below in the log:
> {noformat}
> 2016-09-09 09:33:11,913 WARN  o.a.b.c.m.i.LocalSubscriptionManager [brooklyn-execmanager-VtZheMDn-10]: Error processing subscriptions to LSM.publish(DynamicClusterImpl{id=pwty9ia4ww}.Sensor: cpu.average (java.lang.Double)=0.005 @ 1473409991910): java.lang.NullPointerException
> java.lang.NullPointerException: null
>         at org.apache.brooklyn.policy.autoscaling.AutoScalerPolicy.onMetricChanged(AutoScalerPolicy.java:755) ~[brooklyn-policy-0.10.0-20160907.0931.jar:0.10.0-20160907.0931]
>         at org.apache.brooklyn.policy.autoscaling.AutoScalerPolicy.access$700(AutoScalerPolicy.java:80) ~[brooklyn-policy-0.10.0-20160907.0931.jar:0.10.0-20160907.0931]
>         at org.apache.brooklyn.policy.autoscaling.AutoScalerPolicy$11.onEvent(AutoScalerPolicy.java:448) ~[brooklyn-policy-0.10.0-20160907.0931.jar:0.10.0-20160907.0931]
>         at org.apache.brooklyn.core.mgmt.internal.LocalSubscriptionManager$2.run(LocalSubscriptionManager.java:244) ~[brooklyn-core-0.10.0-20160907.0931.jar:0.10.0-20160907.0931]
>         at org.apache.brooklyn.util.concurrent.CallableFromRunnable.call(CallableFromRunnable.java:43) [brooklyn-utils-common-0.10.0-20160907.0931.jar:0.10.0-20160907.0931]
>         at org.apache.brooklyn.util.core.task.BasicExecutionManager$SubmissionCallable.call(BasicExecutionManager.java:519) [brooklyn-core-0.10.0-20160907.0931.jar:0.10.0-20160907.0931]
>         at org.apache.brooklyn.util.core.task.SingleThreadedScheduler$1.call(SingleThreadedScheduler.java:116) [brooklyn-core-0.10.0-20160907.0931.jar:0.10.0-20160907.0931]
>         at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_95]
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_95]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_95]
>         at java.lang.Thread.run(Thread.java:745) [na:1.7.0_95]
> {noformat}
> That line is executing {{getMetricUpperBound().doubleValue()}}.
> I suspect this is the same underlying cause as https://issues.apache.org/jira/browse/BROOKLYN-345.
> The policy is configured with:
> {noformat}
> autoscaler.metricUpperBound:
>   $brooklyn:entity("docker-swarm-nodes").parent().config("swarm.scaling.cpu.limit")
> {noformat}
> And the entity is configured with:
> {noformat}
> brooklyn.parameters:
>   - name: swarm.scaling.cpu.limit
>     label: Swarm Scaling CPU Limit
>     type: double
>     default: 0.95
> {noformat}  



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)