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

Measurements API can fail with exception when operating in relaxed mode

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 18.0.0, Meridian-2016.1.0, Meridian-2016.1.1, Meridian-2016.1.2, 18.0.1, 18.0.2, Meridian-2016.1.3
    • Fix Version/s: 18.0.3, Meridian-2016.1.4, 19.0.0
    • Component/s: None
    • Security Level: Default (Default Security Scheme)
    • Labels:

      Description

      When operating in relaxed mode, the Measurements API will skip resources and attributes that are not found.

      If none of the resources or attributes given in the request were found, the Measurements API will throw an obscure error like:

      Caused by: org.opennms.netmgt.measurements.api.exceptions.FetchException: Fetch failed: Xport failed.
      	at org.opennms.netmgt.measurements.api.DefaultMeasurementsService.query(DefaultMeasurementsService.java:78)
      	at Proxy8bfb87e1_bc86_4fd9_a279_d16b1710bad1.query(Unknown Source)
      	at org.opennms.features.topology.api.info.MeasurementsWrapper.queryInt(MeasurementsWrapper.java:218)
      	at org.opennms.features.topology.api.info.MeasurementsWrapper.getLastValue(MeasurementsWrapper.java:80)
      	at org.opennms.features.topology.api.info.MeasurementsWrapper.getLastValue(MeasurementsWrapper.java:65)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at javax.el.BeanELResolver.invoke(BeanELResolver.java:500)
      	... 134 more
      Caused by: org.jrobin.core.RrdException: Xport failed.
      	at org.opennms.netmgt.measurements.impl.JRrd2FetchStrategy.fetchMeasurements(JRrd2FetchStrategy.java:86)
      	at org.opennms.netmgt.measurements.impl.AbstractRrdBasedFetchStrategy.fetchMeasurements(AbstractRrdBasedFetchStrategy.java:121)
      	at org.opennms.netmgt.measurements.impl.AbstractRrdBasedFetchStrategy.fetch(AbstractRrdBasedFetchStrategy.java:110)
      	at org.opennms.netmgt.measurements.api.DefaultMeasurementsService.query(DefaultMeasurementsService.java:68)
      	... 143 more
      Caused by: org.opennms.netmgt.rrd.jrrd2.api.JRrd2Exception: can't make an xport without contents
      	at org.opennms.netmgt.rrd.jrrd2.impl.Interface.rrd_xport(Native Method)
      	at org.opennms.netmgt.rrd.jrrd2.impl.JRrd2Jni.xport(JRrd2Jni.java:107)
      	at org.opennms.netmgt.measurements.impl.JRrd2FetchStrategy.fetchMeasurements(JRrd2FetchStrategy.java:84)
      	... 146 more
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                j-white Jesse White
                Reporter:
                j-white Jesse White
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: