RRD not able to write data, showing error of Invalid Step 0

I am running Fedora 30 with OpenNMS

Version: 27.1.1
Server Time: Wed Apr 21 08:43:35 CEST 2021
Client Time: Wed Apr 21 2021 08:43:35 GMT+0200 (Central European Summer Time)
Java Version: 11.0.7 (Oracle Corporation)
Java Runtime: OpenJDK Runtime Environment (11.0.7+10)
Java Specification: Java Platform API Specification (Oracle Corporation, 11)
Java Virtual Machine: OpenJDK 64-Bit Server VM (Oracle Corporation, 11.0.7+10)
Java Virtual Machine Specification: Java Virtual Machine Specification (Oracle Corporation, 11)
Operating System: Linux 5.6.13-100.fc30.x86_64 (amd64)
OSGi Container: Apache Karaf 4.2.6
Servlet Container: jetty/9.4.38.v20210224 (Servlet Spec 3.1)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.128 Safari/537.36
Database Type: PostgreSQL
Database Version: 11.7
Time-Series Strategy: RRDTool or JRobin
IPC Strategy: Sink: camel; RPC: jms

Recently I am not seeing any snmp data from my switches other than the systemObj. No interface stats are being saved by rrd. Below is the error in collectd.log

Caused by: org.opennms.netmgt.rrd.RrdException: An error occurred creating rrdfile /opt/opennms/share/rrd/snmp/1525/irb_2010-64649b450a00/ifInErrors.rrd: org.opennms.netmgt.rrd.jrrd2.api.JRrd2Exception: Invalid step 0: value must be positive
at org.opennms.netmgt.collection.persistence.rrd.RrdPersistOperationBuilder.createRRD(RrdPersistOperationBuilder.java:292) ~[org.opennms.features.collection.persistence.rrd-27.1.1.jar:?]
at org.opennms.netmgt.collection.persistence.rrd.RrdPersistOperationBuilder.commit(RrdPersistOperationBuilder.java:216) ~[org.opennms.features.collection.persistence.rrd-27.1.1.jar:?]
… 19 more
Caused by: org.opennms.netmgt.rrd.jrrd2.api.JRrd2Exception: Invalid step 0: value must be positive
at org.opennms.netmgt.rrd.jrrd2.impl.Interface.rrd_create_r(Native Method) ~[jrrd2.jar:?]
at org.opennms.netmgt.rrd.jrrd2.impl.JRrd2Jni.create(JRrd2Jni.java:68) ~[jrrd2.jar:?]
at org.opennms.netmgt.rrd.rrdtool.MultithreadedJniRrdStrategy$CreateCommand.execute(MultithreadedJniRrdStrategy.java:76) ~[opennms-rrdtool-api-27.1.1.jar:?]
at org.opennms.netmgt.rrd.rrdtool.MultithreadedJniRrdStrategy.createFile(MultithreadedJniRrdStrategy.java:184) ~[opennms-rrdtool-api-27.1.1.jar:?]
at org.opennms.netmgt.rrd.rrdtool.MultithreadedJniRrdStrategy.createFile(MultithreadedJniRrdStrategy.java:51) ~[opennms-rrdtool-api-27.1.1.jar:?]
at org.opennms.netmgt.rrd.QueuingRrdStrategy.createFile(QueuingRrdStrategy.java:993) ~[opennms-rrd-api-27.1.1.jar:?]
at org.opennms.netmgt.rrd.QueuingRrdStrategy.createFile(QueuingRrdStrategy.java:112) ~[opennms-rrd-api-27.1.1.jar:?]
at org.opennms.netmgt.collection.persistence.rrd.RrdPersistOperationBuilder.createRRD(RrdPersistOperationBuilder.java:286) ~[org.opennms.features.collection.persistence.rrd-27.1.1.jar:?]
at org.opennms.netmgt.collection.persistence.rrd.RrdPersistOperationBuilder.commit(RrdPersistOperationBuilder.java:216) ~[org.opennms.features.collection.persistence.rrd-27.1.1.jar:?]
… 19 more
2021-04-21 08:22:35,036 ERROR [Collectd-Thread-19-of-50] o.o.n.c.p.r.RrdPersistOperationBuilder: createRRD: An error occurred creating rrdfile /opt/opennms/share/rrd/snmp/1525/irb_2010-64649b450a00/ifOutDiscards.rrd
org.opennms.netmgt.rrd.jrrd2.api.JRrd2Exception: Invalid step 0: value must be positive
at org.opennms.netmgt.rrd.jrrd2.impl.Interface.rrd_create_r(Native Method) ~[jrrd2.jar:?]
at org.opennms.netmgt.rrd.jrrd2.impl.JRrd2Jni.create(JRrd2Jni.java:68) ~[jrrd2.jar:?]
at org.opennms.netmgt.rrd.rrdtool.MultithreadedJniRrdStrategy$CreateCommand.execute(MultithreadedJniRrdStrategy.java:76) ~[opennms-rrdtool-api-27.1.1.jar:?]
at org.opennms.netmgt.rrd.rrdtool.MultithreadedJniRrdStrategy.createFile(MultithreadedJniRrdStrategy.java:184) ~[opennms-rrdtool-api-27.1.1.jar:?]
at org.opennms.netmgt.rrd.rrdtool.MultithreadedJniRrdStrategy.createFile(MultithreadedJniRrdStrategy.java:51) ~[opennms-rrdtool-api-27.1.1.jar:?]
at org.opennms.netmgt.rrd.QueuingRrdStrategy.createFile(QueuingRrdStrategy.java:993) ~[opennms-rrd-api-27.1.1.jar:?]
at org.opennms.netmgt.rrd.QueuingRrdStrategy.createFile(QueuingRrdStrategy.java:112) ~[opennms-rrd-api-27.1.1.jar:?]
at org.opennms.netmgt.collection.persistence.rrd.RrdPersistOperationBuilder.createRRD(RrdPersistOperationBuilder.java:286) ~[org.opennms.features.collection.persistence.rrd-27.1.1.jar:?]
at org.opennms.netmgt.collection.persistence.rrd.RrdPersistOperationBuilder.commit(RrdPersistOperationBuilder.java:216) ~[org.opennms.features.collection.persistence.rrd-27.1.1.jar:?]
at org.opennms.netmgt.collection.api.AbstractPersister.commitBuilder(AbstractPersister.java:89) ~[org.opennms.features.collection.api-27.1.1.jar:?]
at org.opennms.netmgt.collection.persistence.rrd.OneToOnePersister.completeAttribute(OneToOnePersister.java:79) ~[org.opennms.features.collection.persistence.rrd-27.1.1.jar:?]
at org.opennms.netmgt.collection.support.DelegatingPersister.lambda$completeAttribute$6(DelegatingPersister.java:80) ~[org.opennms.features.collection.api-27.1.1.jar:?]
at java.util.ArrayList.forEach(ArrayList.java:1540) ~[?:?]
at org.opennms.netmgt.collection.support.DelegatingPersister.completeAttribute(DelegatingPersister.java:80) ~[org.opennms.features.collection.api-27.1.1.jar:?]
at org.opennms.netmgt.collection.support.AbstractCollectionAttribute.visit(AbstractCollectionAttribute.java:119) ~[org.opennms.features.collection.api-27.1.1.jar:?]
at org.opennms.netmgt.collection.api.AttributeGroup.visit(AttributeGroup.java:112) ~[org.opennms.features.collection.api-27.1.1.jar:?]
at org.opennms.netmgt.collectd.SnmpCollectionResource.visit(SnmpCollectionResource.java:163) ~[opennms-services-27.1.1.jar:?]
at org.opennms.netmgt.collectd.SnmpCollectionSet.visit(SnmpCollectionSet.java:321) ~[opennms-services-27.1.1.jar:?]
at org.opennms.netmgt.collectd.CollectableService.doCollection(CollectableService.java:433) ~[opennms-services-27.1.1.jar:?]
at org.opennms.netmgt.collectd.CollectableService.doRun(CollectableService.java:355) ~[opennms-services-27.1.1.jar:?]
at org.opennms.netmgt.collectd.CollectableService.lambda$run$0(CollectableService.java:329) ~[opennms-services-27.1.1.jar:?]
at org.opennms.core.logging.Logging.withPrefix(Logging.java:71) [org.opennms.core.logging-27.1.1.jar:?]
at org.opennms.netmgt.collectd.CollectableService.run(CollectableService.java:322) [opennms-services-27.1.1.jar:?]
at org.opennms.netmgt.scheduler.LegacyScheduler$1.run(LegacyScheduler.java:179) [org.opennms.core.daemon-27.1.1.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at org.opennms.core.concurrent.LogPreservingThreadFactory$3.run(LogPreservingThreadFactory.java:124) [opennms-util-27.1.1.jar:?]
at java.lang.Thread.run(Thread.java:834) [?:?]

Delete one and let collected recreate it. Is the data now visible?

I have tried that and even deleted all nodes but it will not create rrd for the interface data. It does create the icmp for the same devices.

Have you modified the <rrd> content in datacollection-config.xml in some way?

only after i had the issues. i tried switching to rrd instead of the default jrobin but the same errors. i reinstalled with centos 7 vs fedora 30 and all is working so far.

Good to know. We don’t test against any version of Fedora, so I wouldn’t recommend running OpenNMS on it unless you’re just playing around.