Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-9009

Remote Poller throws exceptions and do not seem to work

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Blocker
    • Resolution: Cannot Reproduce
    • Affects Version/s: 19.0.0
    • Fix Version/s: 19.0.0
    • Component/s: Remote Polling
    • Security Level: Default (Default Security Scheme)
    • Labels:
      None
    • Environment:
      macOS Sierra, release-19.0.0 branch, remote-poller tar.gz of directory opennms-assemblies/remote-poller-standalone/target/org.opennms.assemblies.remote-poller-standalone-19.0.0-SNAPSHOT-remote-poller.tar.gz
    • Sprint:
      Horizon - Jan 25th

      Description

      I extracted the tar.gz file of the

      opennms-assemblies/remote-poller-standalone/target/org.opennms.assemblies.remote-poller-standalone-19.0.0-SNAPSHOT-remote-poller.tar.gz 
      

      directory and invoked the remote-poller for a local running OpenNMS instance:

      sudo java -Xmx384m -Djava.awt.headless=true -Djava.rmi.activation.port=1099 -jar lib/remote-poller.jar --url=http://localhost:8980/opennms-remoting --location=RDU -n admin -p admin
      

      Invoking the standalone remote-poller throws exceptions and no remote polling data is persisted by OpenNMS:

      2017-01-18 17:07:14,414 WARN  [PollerFrontEnd_Worker-2] o.s.c.s.ClassPathXmlApplicationContext: Exception encountered during context initialization - cancelling refresh attempt
      org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'eventConfDao' defined in class path resource [META-INF/opennms/applicationContext-commonConfigs.xml]: Invocation of init method failed; nested exception is org.springframework.dao.DataRetrievalFailureException: Unabled to load URL [file:${opennms.home}/etc/eventconf.xml]; nested exception is org.opennms.core.xml.MarshallingResourceFailureException: Failed to perform IO while getting a configuration resource from spring: java.io.FileNotFoundException: ${opennms.home}/etc/eventconf.xml (No such file or directory); nested exception is java.io.FileNotFoundException: ${opennms.home}/etc/eventconf.xml (No such file or directory)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1554) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:706) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:762) ~[org.apache.servicemix.bundles.spring-context-4.0.7.RELEASE_1.jar:]
      	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482) ~[org.apache.servicemix.bundles.spring-context-4.0.7.RELEASE_1.jar:]
      	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139) ~[org.apache.servicemix.bundles.spring-context-4.0.7.RELEASE_1.jar:]
      	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:105) ~[org.apache.servicemix.bundles.spring-context-4.0.7.RELEASE_1.jar:]
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_101]
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_101]
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_101]
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_101]
      	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:148) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:125) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:270) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1115) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:646) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:140) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1115) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:646) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:140) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1115) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:981) ~[org.apache.servicemix.bundles.spring-context-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.access.SingletonBeanFactoryLocator.useBeanFactory(SingletonBeanFactoryLocator.java:395) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.opennms.core.spring.BeanUtils.getBeanFactory(BeanUtils.java:79) ~[org.opennms.core.spring-19.0.0-SNAPSHOT.jar:]
      	at org.opennms.core.spring.BeanUtils.getBean(BeanUtils.java:118) ~[org.opennms.core.spring-19.0.0-SNAPSHOT.jar:]
      	at org.opennms.netmgt.poller.monitors.IcmpMonitor.lambda$new$0(IcmpMonitor.java:63) ~[opennms-services-19.0.0-SNAPSHOT.jar:]
      	at com.google.common.base.Suppliers$MemoizingSupplier.get(Suppliers.java:125) [guava-18.0.jar:]
      	at org.opennms.netmgt.poller.monitors.IcmpMonitor.poll(IcmpMonitor.java:94) [opennms-services-19.0.0-SNAPSHOT.jar:]
      	at org.opennms.netmgt.poller.remote.DefaultPollService.poll(DefaultPollService.java:81) [org.opennms.features.poller.remote-19.0.0-SNAPSHOT.jar:]
      	at org.opennms.netmgt.poller.remote.support.DefaultPollerFrontEnd.doPoll(DefaultPollerFrontEnd.java:715) [org.opennms.features.poller.remote-19.0.0-SNAPSHOT.jar:]
      	at org.opennms.netmgt.poller.remote.support.DefaultPollerFrontEnd.doPollService(DefaultPollerFrontEnd.java:448) [org.opennms.features.poller.remote-19.0.0-SNAPSHOT.jar:]
      	at org.opennms.netmgt.poller.remote.support.DefaultPollerFrontEnd.access$1600(DefaultPollerFrontEnd.java:76) [org.opennms.features.poller.remote-19.0.0-SNAPSHOT.jar:]
      	at org.opennms.netmgt.poller.remote.support.DefaultPollerFrontEnd$Running.pollService(DefaultPollerFrontEnd.java:282) [org.opennms.features.poller.remote-19.0.0-SNAPSHOT.jar:]
      	at org.opennms.netmgt.poller.remote.support.DefaultPollerFrontEnd.pollService(DefaultPollerFrontEnd.java:577) [org.opennms.features.poller.remote-19.0.0-SNAPSHOT.jar:]
      	at org.opennms.netmgt.poller.remote.PollJob.executeInternal(PollJob.java:50) [org.opennms.features.poller.remote-19.0.0-SNAPSHOT.jar:]
      	at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:112) [org.apache.servicemix.bundles.spring-context-support-4.0.7.RELEASE_1.jar:]
      	at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [quartz-1.6.5.jar:]
      	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525) [quartz-1.6.5.jar:]
      Caused by: org.springframework.dao.DataRetrievalFailureException: Unabled to load URL [file:${opennms.home}/etc/eventconf.xml]; nested exception is org.opennms.core.xml.MarshallingResourceFailureException: Failed to perform IO while getting a configuration resource from spring: java.io.FileNotFoundException: ${opennms.home}/etc/eventconf.xml (No such file or directory); nested exception is java.io.FileNotFoundException: ${opennms.home}/etc/eventconf.xml (No such file or directory)
      	at org.opennms.netmgt.config.DefaultEventConfDao.loadConfig(DefaultEventConfDao.java:313) ~[opennms-config-19.0.0-SNAPSHOT.jar:]
      	at org.opennms.netmgt.config.DefaultEventConfDao.afterPropertiesSet(DefaultEventConfDao.java:244) ~[opennms-config-19.0.0-SNAPSHOT.jar:]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1613) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1550) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	... 67 more
      Caused by: org.opennms.core.xml.MarshallingResourceFailureException: Failed to perform IO while getting a configuration resource from spring: java.io.FileNotFoundException: ${opennms.home}/etc/eventconf.xml (No such file or directory); nested exception is java.io.FileNotFoundException: ${opennms.home}/etc/eventconf.xml (No such file or directory)
      	at org.opennms.core.xml.MarshallingExceptionTranslator.translate(MarshallingExceptionTranslator.java:51) ~[org.opennms.core.xml-19.0.0-SNAPSHOT.jar:]
      	at org.opennms.core.xml.JaxbUtils.unmarshal(JaxbUtils.java:232) ~[org.opennms.core.xml-19.0.0-SNAPSHOT.jar:]
      	at org.opennms.core.xml.JaxbUtils.unmarshal(JaxbUtils.java:225) ~[org.opennms.core.xml-19.0.0-SNAPSHOT.jar:]
      	at org.opennms.netmgt.config.DefaultEventConfDao.loadConfig(DefaultEventConfDao.java:305) ~[opennms-config-19.0.0-SNAPSHOT.jar:]
      	at org.opennms.netmgt.config.DefaultEventConfDao.afterPropertiesSet(DefaultEventConfDao.java:244) ~[opennms-config-19.0.0-SNAPSHOT.jar:]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1613) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1550) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	... 67 more
      Caused by: java.io.FileNotFoundException: ${opennms.home}/etc/eventconf.xml (No such file or directory)
      	at java.io.FileInputStream.open0(Native Method) ~[?:1.8.0_101]
      	at java.io.FileInputStream.open(FileInputStream.java:195) ~[?:1.8.0_101]
      	at java.io.FileInputStream.<init>(FileInputStream.java:138) ~[?:1.8.0_101]
      	at java.io.FileInputStream.<init>(FileInputStream.java:93) ~[?:1.8.0_101]
      	at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90) ~[?:1.8.0_101]
      	at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188) ~[?:1.8.0_101]
      	at org.springframework.core.io.UrlResource.getInputStream(UrlResource.java:168) ~[org.apache.servicemix.bundles.spring-core-4.0.7.RELEASE_1.jar:]
      	at org.opennms.core.xml.JaxbUtils.unmarshal(JaxbUtils.java:230) ~[org.opennms.core.xml-19.0.0-SNAPSHOT.jar:]
      	at org.opennms.core.xml.JaxbUtils.unmarshal(JaxbUtils.java:225) ~[org.opennms.core.xml-19.0.0-SNAPSHOT.jar:]
      	at org.opennms.netmgt.config.DefaultEventConfDao.loadConfig(DefaultEventConfDao.java:305) ~[opennms-config-19.0.0-SNAPSHOT.jar:]
      	at org.opennms.netmgt.config.DefaultEventConfDao.afterPropertiesSet(DefaultEventConfDao.java:244) ~[opennms-config-19.0.0-SNAPSHOT.jar:]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1613) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1550) ~[org.apache.servicemix.bundles.spring-beans-4.0.7.RELEASE_1.jar:]
      	... 67 more
      
      

        Attachments

          Activity

            People

            Assignee:
            ranger Benjamin Reed
            Reporter:
            cpape Christian Pape
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: