Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A0BDE200C5B for ; Thu, 27 Apr 2017 21:36:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 9F5DE160BB2; Thu, 27 Apr 2017 19:36:08 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id ED790160B9E for ; Thu, 27 Apr 2017 21:36:07 +0200 (CEST) Received: (qmail 4055 invoked by uid 500); 27 Apr 2017 19:36:07 -0000 Mailing-List: contact dev-help@brooklyn.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@brooklyn.apache.org Delivered-To: mailing list dev@brooklyn.apache.org Received: (qmail 4043 invoked by uid 99); 27 Apr 2017 19:36:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Apr 2017 19:36:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 836061AF99E for ; Thu, 27 Apr 2017 19:36:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id pO-wM7cVQ0ez for ; Thu, 27 Apr 2017 19:36:05 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 5DD935FC62 for ; Thu, 27 Apr 2017 19:36:05 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id D562AE0BDD for ; Thu, 27 Apr 2017 19:36:04 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 2934821DE3 for ; Thu, 27 Apr 2017 19:36:04 +0000 (UTC) Date: Thu, 27 Apr 2017 19:36:04 +0000 (UTC) From: "Aled Sage (JIRA)" To: dev@brooklyn.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (BROOKLYN-346) NPE after restart, in AutoScalerPolicy.onMetricChanged (when using yaml DSL for config) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 27 Apr 2017 19:36:08 -0000 [ 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)