Details

    • Type: Bug
    • Status: Resolved (View workflow)
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 8.6.3.0
    • Component/s: None
    • Labels:
      None
    • Sprint:
      Sprint 148
    • Story Points:
      1
    • Capitalizable:
      True

      Description

      Andrew Widdersheim on the Valkyrie team noticed this bug and reported it on Slack.

      I believe the issue is that in the Phone Home service, we subscribe to the system model using a method that immediately calls back to the configuration listener before we retrieve the Akka service client. The listener would normally send an update to the Phone Home server, but since the service client is null, attempting to do so results in a NPE.

      The fix would be to retrieve and set the Akka service client before subscribing to the system model.

      Here is a log snippet capturing the bug:

      repose_1 | 2017-06-27 21:30:38,142 6465 [main] INFO phone-home-message - {"serviceId":"valkyrie","createdAt":"2017-06-27T21:30:38.001Z","createdAtMillis":1498599038001,"jreVersion":"1.8.0_131","jvmName":"OpenJDK 64-Bit Server VM","contactEmail":"valkyrie-eps@rackspace.com","reposeVersion":"8.6.1.1","clusters":[

      Unknown macro: {"filters"}

      ]}
      repose_1 | 2017-06-27 21:30:38,152 6475 [main] ERROR org.openrepose.core.services.phonehome.PhoneHomeService - Could not send an update to the collection service
      repose_1 | java.lang.NullPointerException
      repose_1 | at org.openrepose.core.services.phonehome.PhoneHomeService.sendUpdateMessage$1(PhoneHomeService.scala:172) [repose-valve.jar:8.6.1.1]
      repose_1 | at org.openrepose.core.services.phonehome.PhoneHomeService.org$openrepose$core$services$phonehome$PhoneHomeService$$sendUpdate(PhoneHomeService.scala:87) [repose-valve.jar:8.6.1.1]
      repose_1 | at org.openrepose.core.services.phonehome.PhoneHomeService$SystemModelConfigurationListener$.configurationUpdated(PhoneHomeService.scala:201) [repose-valve.jar:8.6.1.1]
      repose_1 | at org.openrepose.core.services.phonehome.PhoneHomeService$SystemModelConfigurationListener$.configurationUpdated(PhoneHomeService.scala:194) [repose-valve.jar:8.6.1.1]
      repose_1 | at org.openrepose.core.services.config.impl.ConfigurationServiceImpl.subscribeTo(ConfigurationServiceImpl.java:137) [repose-valve.jar:8.6.1.1]
      repose_1 | at org.openrepose.core.services.config.impl.ConfigurationServiceImpl.subscribeTo(ConfigurationServiceImpl.java:101) [repose-valve.jar:8.6.1.1]
      repose_1 | at org.openrepose.core.services.phonehome.PhoneHomeService.init(PhoneHomeService.scala:70) [repose-valve.jar:8.6.1.1]
      repose_1 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131]
      repose_1 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_131]
      repose_1 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_131]
      repose_1 | at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_131]
      repose_1 | at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:349) [repose-valve.jar:8.6.1.1]
      repose_1 | at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:300) [repose-valve.jar:8.6.1.1]
      repose_1 | at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:133) [repose-valve.jar:8.6.1.1]
      repose_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:408) [repose-valve.jar:8.6.1.1]
      repose_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1558) [repose-valve.jar:8.6.1.1]
      repose_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539) [repose-valve.jar:8.6.1.1]
      repose_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) [repose-valve.jar:8.6.1.1]
      repose_1 | at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303) [repose-valve.jar:8.6.1.1]
      repose_1 | at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) [repose-valve.jar:8.6.1.1]
      repose_1 | at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299) [repose-valve.jar:8.6.1.1]
      repose_1 | at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) [repose-valve.jar:8.6.1.1]
      repose_1 | at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:762) [repose-valve.jar:8.6.1.1]
      repose_1 | at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757) [repose-valve.jar:8.6.1.1]
      repose_1 | at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480) [repose-valve.jar:8.6.1.1]
      repose_1 | at org.openrepose.core.spring.CoreSpringProvider.initializeCoreContext(CoreSpringProvider.java:191) [repose-valve.jar:8.6.1.1]
      repose_1 | at org.openrepose.valve.Valve$$anonfun$execute$2.apply(Valve.scala:122) [repose-valve.jar:8.6.1.1]
      repose_1 | at org.openrepose.valve.Valve$$anonfun$execute$2.apply(Valve.scala:83) [repose-valve.jar:8.6.1.1]
      repose_1 | at scala.Option.map(Option.scala:146) [repose-valve.jar:8.6.1.1]
      repose_1 | at org.openrepose.valve.Valve.execute(Valve.scala:83) [repose-valve.jar:8.6.1.1]
      repose_1 | at org.openrepose.valve.Main$$anonfun$1$$anonfun$apply$mcI$sp$1$$anonfun$apply$mcI$sp$2.apply$mcI$sp(Main.scala:29) [repose-valve.jar:8.6.1.1]
      repose_1 | at org.openrepose.valve.Main$$anonfun$1$$anonfun$apply$mcI$sp$1$$anonfun$apply$mcI$sp$2.apply(Main.scala:29) [repose-valve.jar:8.6.1.1]
      repose_1 | at org.openrepose.valve.Main$$anonfun$1$$anonfun$apply$mcI$sp$1$$anonfun$apply$mcI$sp$2.apply(Main.scala:29) [repose-valve.jar:8.6.1.1]
      repose_1 | at scala.util.DynamicVariable.withValue(DynamicVariable.scala:58) [repose-valve.jar:8.6.1.1]
      repose_1 | at scala.Console$.withErr(Console.scala:80) [repose-valve.jar:8.6.1.1]
      repose_1 | at org.openrepose.valve.Main$$anonfun$1$$anonfun$apply$mcI$sp$1.apply$mcI$sp(Main.scala:28) [repose-valve.jar:8.6.1.1]
      repose_1 | at org.openrepose.valve.Main$$anonfun$1$$anonfun$apply$mcI$sp$1.apply(Main.scala:28) [repose-valve.jar:8.6.1.1]
      repose_1 | at org.openrepose.valve.Main$$anonfun$1$$anonfun$apply$mcI$sp$1.apply(Main.scala:28) [repose-valve.jar:8.6.1.1]
      repose_1 | at scala.util.DynamicVariable.withValue(DynamicVariable.scala:58) [repose-valve.jar:8.6.1.1]
      repose_1 | at scala.Console$.withOut(Console.scala:53) [repose-valve.jar:8.6.1.1]
      repose_1 | at org.openrepose.valve.Main$$anonfun$1.apply$mcI$sp(Main.scala:28) [repose-valve.jar:8.6.1.1]
      repose_1 | at org.openrepose.valve.Main$$anonfun$1.apply(Main.scala:28) [repose-valve.jar:8.6.1.1]
      repose_1 | at org.openrepose.valve.Main$$anonfun$1.apply(Main.scala:28) [repose-valve.jar:8.6.1.1]
      repose_1 | at scala.util.DynamicVariable.withValue(DynamicVariable.scala:58) [repose-valve.jar:8.6.1.1]
      repose_1 | at scala.Console$.withIn(Console.scala:124) [repose-valve.jar:8.6.1.1]
      repose_1 | at org.openrepose.valve.Main$.delayedEndpoint$org$openrepose$valve$Main$1(Main.scala:28) [repose-valve.jar:8.6.1.1]
      repose_1 | at org.openrepose.valve.Main$delayedInit$body.apply(Main.scala:24) [repose-valve.jar:8.6.1.1]
      repose_1 | at scala.Function0$class.apply$mcV$sp(Function0.scala:34) [repose-valve.jar:8.6.1.1]
      repose_1 | at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12) [repose-valve.jar:8.6.1.1]
      repose_1 | at scala.App$$anonfun$main$1.apply(App.scala:76) [repose-valve.jar:8.6.1.1]
      repose_1 | at scala.App$$anonfun$main$1.apply(App.scala:76) [repose-valve.jar:8.6.1.1]
      repose_1 | at scala.collection.immutable.List.foreach(List.scala:381) [repose-valve.jar:8.6.1.1]
      repose_1 | at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:35) [repose-valve.jar:8.6.1.1]
      repose_1 | at scala.App$class.main(App.scala:76) [repose-valve.jar:8.6.1.1]
      repose_1 | at org.openrepose.valve.Main$.main(Main.scala:24) [repose-valve.jar:8.6.1.1]
      repose_1 | at org.openrepose.valve.Main.main(Main.scala) [repose-valve.jar:8.6.1.1]

        Attachments

          Activity

            People

            • Assignee:
              wdschei Bill Scheidegger
              Reporter:
              damien.johnson Damien Johnson
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: