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

Exception on node.jsp with storeByForeignSource enabled and no data collection for the node.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.12.4
    • Fix Version/s: 1.12.5
    • Component/s: Web UI - General
    • Security Level: Default (Default Security Scheme)
    • Labels:
      None

      Description

      After creating a node that it is not going to have data collection, an exception is thrown when looking at the node's page.

      2014-02-20 10:52:20,694 WARN  [qtp1799538150-7269] ServletHandler: /opennms/element/node.jsp
      org.springframework.orm.ObjectRetrievalFailureException: Object of class [java.io.File] with identifier [No directory exists for nodeSource Web-Sites:www.google.com]: not found
          at org.opennms.netmgt.dao.support.NodeSnmpResourceType.isResourceTypeOnNodeSource(NodeSnmpResourceType.java:139)
          at org.opennms.netmgt.dao.support.NodeResourceType$NodeChildResourceLoader.getResourceTypesForNodeSource(NodeResourceType.java:180)
          at org.opennms.netmgt.dao.support.NodeResourceType$NodeChildResourceLoader.load(NodeResourceType.java:147)
          at org.opennms.core.utils.LazyList.load(LazyList.java:156)
          at org.opennms.core.utils.LazyList.size(LazyList.java:70)
          at org.opennms.web.svclayer.support.DefaultResourceService.findNodeSourceChildResources(DefaultResourceService.java:210)
          at org.opennms.web.svclayer.support.DefaultResourceService.findNodeChildResources(DefaultResourceService.java:174)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:606)
      

      There are several use cases when a user can configure a node that is not supposed to have data collection, for example for Web Sites checks.

      Let's suppose that we define a requisition like this:

      <model-import date-stamp="2014-02-20T10:51:00.804-05:00" foreign-source="Web-Sites" last-import="2014-02-20T10:51:56.197-05:00" xmlns="http://xmlns.opennms.org/xsd/config/model-import">
          <node building="Web-Sites" foreign-id="www.google.com" node-label="www.google.com">
              <interface descr="Fake" ip-addr="169.254.0.1" status="1" snmp-primary="N">
                  <monitored-service service-name="WebCheck_Landing"/>
              </interface>
          </node>
      </model-import>
      

      The requisition doesn't have any detectors or policies:

      <foreign-source name="Web-Sites" date-stamp="2014-02-20T10:51:07.697-05:00" xmlns="http://xmlns.opennms.org/xsd/config/foreign-source">
          <scan-interval>1d</scan-interval>
          <detectors/>
          <policies/>
      </foreign-source>
      

      The use case is to monitor a WebSite resolving via DNS the node's label:

      <service name="WebCheck_Landing" interval="300000" user-defined="false" status="on">
            <parameter key="sequence-retry" value="2"/>
            <parameter key="timeout" value="8000"/>
            <parameter key="rrd-repository" value="/Users/agalue/Development/opennms/git/1.12/target/opennms-1.12.5-SNAPSHOT/share/rrd/response" />
            <parameter key="rrd-base-name" value="webcheck_landing"/>
            <parameter key="ds-name" value="webcheck_landing"/>
            <parameter key="page-sequence">
              <page-sequence>
                <page path="/"
                      host="${nodelabel}"
                      virtual-host="${nodelabel}"
                      response-range="100-399" />
              </page-sequence>
            </parameter>
      </service>
      <monitor service="WebCheck_Landing" class-name="org.opennms.netmgt.poller.monitors.PageSequenceMonitor"/>
      

      After synchronizing the requisition and going to the node's page, an exception is generated and there is no way to see the page.

        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: