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

RrdDao.getLastFetchValue() throws an exception when using RRDtool

    XMLWordPrintable

    Details

      Description

      I was developing a small JSP to show the last values for certain metrics and I found that when calling rrdDao.getLastFetchValue(attribute, 300000), I get the following exception:

      2015-01-22 14:51:40,018 WARN  [qtp935072850-10959 - /opennms/element/node.jsp?node=1948-Marriott-Burlington:1948-zd3000] o.e.j.s.ServletHandler: /opennms/element/node.jsp
      org.springframework.dao.DataAccessResourceFailureException: Failure to fetch last value from file '/opt/opennms/share/rrd/snmp/fs/1948-Marriott-Burlington/1948-zd3000/ruckusZDWLANAPEntry/6.132.24.58.21.8.144/ruckusZDWLANAPTable.rrd' with interval 300000; nested exception is java.lang.NumberFormatException: For input string: "-nan"
              at org.opennms.netmgt.dao.support.DefaultRrdDao.getLastFetchValue(DefaultRrdDao.java:270) ~[opennms-dao-14.0.3.jar:?]
              at org.apache.jsp.includes.ruckus_002daccesspoints_jsp._jspService(ruckus_002daccesspoints_jsp.java:89) ~[?:?]
              at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:109) ~[org.apache.jasper.glassfish-2.1.0.v201110031002.jar:?]
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) ~[javax.servlet-2.5.0.v201103041518.jar:?]
              at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:403) ~[org.apache.jasper.glassfish-2.1.0.v201110031002.jar:?]
              at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:476) ~[org.apache.jasper.glassfish-2.1.0.v201110031002.jar
      ...
      Caused by: java.lang.NumberFormatException: For input string: "-nan"
              at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1250) ~[?:1.7.0_72]
              at java.lang.Double.valueOf(Double.java:504) ~[?:1.7.0_72]
              at java.lang.Double.<init>(Double.java:597) ~[?:1.7.0_72]
              at org.opennms.netmgt.rrd.rrdtool.JniRrdStrategy.fetchLastValue(JniRrdStrategy.java:312) ~[opennms-rrdtool-api-14.0.3.jar:?]
              at org.opennms.netmgt.rrd.rrdtool.JniRrdStrategy.fetchLastValue(JniRrdStrategy.java:239) ~[opennms-rrdtool-api-14.0.3.jar:?]
              at org.opennms.netmgt.rrd.QueuingRrdStrategy.fetchLastValue(QueuingRrdStrategy.java:1061) ~[opennms-rrd-api-14.0.3.jar:?]
              at org.opennms.netmgt.dao.support.DefaultRrdDao.getLastFetchValue(DefaultRrdDao.java:268) ~[opennms-dao-14.0.3.jar:?]
              ... 103 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: