brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aled Sage (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (BROOKLYN-346) NPE after restart, in AutoScalerPolicy.onMetricChanged (when using yaml DSL for config)
Date Thu, 27 Apr 2017 19:36:04 GMT

     [ https://issues.apache.org/jira/browse/BROOKLYN-346?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Aled Sage resolved BROOKLYN-346.
--------------------------------
       Resolution: Fixed
    Fix Version/s: 0.10.0

> 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)

Mime
View raw message