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

The remote poller is not working when using HTTP, but it works with RMI

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.11.3
    • Fix Version/s: 1.11.90
    • Component/s: Remote Polling
    • Security Level: Default (Default Security Scheme)
    • Labels:
      None

      Description

      After creating a simple testing environment with the latest code from the master branch in order to play with the Remote Poller (following the directions from the Wiki), I noticed that if I start the remote poller with the following command:

      /opt/opennms/bin/remote-poller.sh -l RDU -n admin -p admin -g -u http://localhost:8980/opennms-remoting

      it doesn't start, but if I execute it using RMI like the following, it works:

      ./remote-poller.sh -l RDU -n admin -p admin -g -u rmi://localhost/

      I found a problem on ~/.opennms/opennms-remote-poller.log, it is related with a missing class:

      2012-12-14 09:29:01,418 INFO [main] org.opennms.poller.remote.Main: org.opennms.netmgt.icmp.pingerClass not set; using JnaPinger by default
      2012-12-14 09:29:01,427 INFO [main] org.opennms.poller.remote.Main: user.home.url = file:/Users/agalue
      2012-12-14 09:29:01,427 INFO [main] org.opennms.poller.remote.Main: opennms.poller.server.url = http://localhost:8980/opennms-remoting
      2012-12-14 09:29:01,427 INFO [main] org.opennms.poller.remote.Main: location name = HOME
      2012-12-14 09:29:01,457 INFO [main] org.springframework.context.support.ClassPathXmlApplicationContext: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@32df8508: startup date [Fri Dec 14 09:29:01 EST 2012]; root of context hierarchy
      2012-12-14 09:29:01,483 INFO [main] org.springframework.beans.factory.xml.XmlBeanDefinitionReader: Loading XML bean definitions from class path resource [META-INF/opennms/applicationContext-remotePollerBackEnd-http.xml]
      2012-12-14 09:29:01,673 INFO [main] org.springframework.beans.factory.xml.XmlBeanDefinitionReader: Loading XML bean definitions from class path resource [META-INF/opennms/applicationContext-pollerFrontEnd.xml]
      2012-12-14 09:29:01,698 INFO [main] org.springframework.beans.factory.xml.XmlBeanDefinitionReader: Loading XML bean definitions from class path resource [META-INF/opennms/applicationContext-ws-gui.xml]
      2012-12-14 09:29:01,759 INFO [main] org.springframework.beans.factory.support.DefaultListableBeanFactory: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@22531380: defining beans [frontEndConfigurer,pollerBackEnd,timeAdjustment,pollService,pollerSettings,pollerFrontEnd,checkConfigJobDetail,configCheckTrigger,scheduler,poller,pollerView]; root of factory hierarchy
      2012-12-14 09:29:01,767 INFO [main] org.springframework.beans.factory.support.DefaultListableBeanFactory: Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@22531380: defining beans [frontEndConfigurer,pollerBackEnd,timeAdjustment,pollService,pollerSettings,pollerFrontEnd,checkConfigJobDetail,configCheckTrigger,scheduler,poller,pollerView]; root of factory hierarchy
      2012-12-14 09:29:01,768 ERROR [main] org.opennms.poller.remote.Main: Exception occurred during registration!
      org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pollerBackEnd' defined in class path resource [META-INF/opennms/applicationContext-remotePollerBackEnd-http.xml]: Cannot create inner bean 'org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean#65cccd3' of type [org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean] while setting bean property 'remoteBackEnd'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean#65cccd3' defined in class path resource [META-INF/opennms/applicationContext-remotePollerBackEnd-http.xml]: Cannot create inner bean 'org.springframework.security.context.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor#5ce03f50' of type [org.springframework.security.context.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor] while setting bean property 'httpInvokerRequestExecutor'; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.security.context.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor] for bean with name 'org.springframework.security.context.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor#5ce03f50' defined in class path resource [META-INF/opennms/applicationContext-remotePollerBackEnd-http.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.security.context.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281)
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:120)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1327)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1085)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:516)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
      at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
      at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
      at org.opennms.poller.remote.Main.createAppContext(Main.java:257)
      at org.opennms.poller.remote.Main.run(Main.java:143)
      at org.opennms.poller.remote.Main.main(Main.java:313)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.simontuffs.onejar.Boot.run(Boot.java:306)
      at com.simontuffs.onejar.Boot.main(Boot.java:159)
      Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean#65cccd3' defined in class path resource [META-INF/opennms/applicationContext-remotePollerBackEnd-http.xml]: Cannot create inner bean 'org.springframework.security.context.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor#5ce03f50' of type [org.springframework.security.context.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor] while setting bean property 'httpInvokerRequestExecutor'; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.security.context.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor] for bean with name 'org.springframework.security.context.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor#5ce03f50' defined in class path resource [META-INF/opennms/applicationContext-remotePollerBackEnd-http.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.security.context.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281)
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:120)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1327)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1085)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:516)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:270)
      ... 23 more
      Caused by: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.security.context.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor] for bean with name 'org.springframework.security.context.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor#5ce03f50' defined in class path resource [META-INF/opennms/applicationContext-remotePollerBackEnd-http.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.security.context.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor
      at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1261)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:432)
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:270)
      ... 29 more
      Caused by: java.lang.ClassNotFoundException: org.springframework.security.context.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor
      at com.simontuffs.onejar.JarClassLoader.findClass(JarClassLoader.java:602)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
      at org.springframework.util.ClassUtils.forName(ClassUtils.java:257)
      at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:408)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1282)
      at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1253)
      ... 31 more

        Attachments

          Activity

            People

            • Assignee:
              agalue Alejandro Galue
              Reporter:
              agalue Alejandro Galue
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: