The rrd file does not exist

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
kjstech
Cacti User
Posts: 97
Joined: Thu Feb 28, 2013 2:57 pm

The rrd file does not exist

Post by kjstech »

No issues in Cacti 0.8.7g but now on 1.0.1 I created some new graphs on a switch stack that was expanded last week but even today I see rrd file does not exist. Strange because the interfaces appear in the SNMP query, or else I wouldn't be able to create these graphs in the first place. I decided to pinpoint one and I created the file manually when SSH to the ubuntu box Cacti is running on. I did a touch on the file to create it, and I did a chown and chmod on the file's permissions, howver it remains at 0 bytes in size and "RRD File not found" message in place of the graph.

Like I said I never had this issue in the older verison of Cacti, so I'm not sure if there is a blanket procedure in the new version to check permissions and what not to ensure its optimal. Current, existing graphs continue to poll without issue so I'm a little perplexed what could be going on here.

Any ideas? Thanks in advance!
User avatar
camerabob
Cacti User
Posts: 386
Joined: Fri Feb 10, 2017 2:45 pm
Location: Long Island, New York, USA
Contact:

Re: The rrd file does not exist

Post by camerabob »

+1. I thought I was the only one.
Prod: Cacti 1.2.15 @ CentOS Linux release 7.9.2009 (Core) & PHP 5.4.16-48.el7
Maint @ 1.2
Monitor @ 2.3.6
Thold @ 1.2.4

Temp: Cacti 1.2.3 @ CentOS Linux release 7.9.2009 (Core) & PHP 5.4.16-48.el7
Flowview @ 2.1
Mactrack @ 4.2
Maint @ 1.2
Monitor @ 2.3.6
Router Configs @ 1.3.4
Syslog Monitoring @ 2.1
Thold @ 1.2.4
westsyde
Posts: 23
Joined: Tue Sep 23, 2008 12:44 pm

Re: The rrd file does not exist

Post by westsyde »

I also experience the error RRD file does not exist on graphs. ex:


--vertical-label="bits per second" \
--slope-mode \
--base=1000 \
--height=120 \
--width=500 \
--tabwidth "30" \
--rigid \
--alt-autoscale-max \
--lower-limit="0" \
--border 1 --slope-mode \
--watermark "Copyright (C) 2004-2017 The Cacti Group" \
DEF:a="C\:/inetpub/wwwroot/cacti/rra/11/64.rrd":"traffic_in":AVERAGE \
DEF:b="C\:/inetpub/wwwroot/cacti/rra/11/64.rrd":"traffic_out":AVERAGE \
CDEF:cdefa="a,8,*" \
CDEF:cdefe="b,8,*" \
AREA:cdefa#00CF00FF:"Inbound " \
GPRINT:cdefa:LAST:"Current\:%8.2lf %s" \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf %s\n" \
LINE1:cdefe#002A97FF:"Outbound" \
GPRINT:cdefe:LAST:"Current\:%8.2lf %s" \
GPRINT:cdefe:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefe:MAX:"Maximum\:%8.2lf %s\n" \
COMMENT:\" \" \
HRULE:31358.97#FF0000FF:"95th Percentile" \
COMMENT:\"(0.03 mbit in+out)\n\"
RRDTool Says:


Data Source Debug
C:/rrdtool/rrdtool.exe create \
C:/inetpub/wwwroot/cacti/rra/11/64.rrd \
--step 300 \
DS:traffic_in:COUNTER:600:0:100000000 \
DS:traffic_out:COUNTER:600:0:100000000 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MIN:0.5:1:600 \
RRA:MIN:0.5:6:700 \
RRA:MIN:0.5:24:775 \
RRA:MIN:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
RRA:LAST:0.5:1:600 \
RRA:LAST:0.5:6:700 \
RRA:LAST:0.5:24:775 \
RRA:LAST:0.5:288:797 \

Summary Details Download
Title SW - Traffic - Fa0/2
Vertical Label bits per second
Start Date 2017-02-13 22:10:00
End Date 2017-02-14 22:05:00
Step 300
Total Rows 288
Graph ID 61
Host ID 11

Date
Inbound
Outbound
2017-02-13 22:10:00 1.09 K 6.08 K
2017-02-13 22:15:00 1.53 K 7.52 K
2017-02-13 22:20:00 1.24 K 5.70 K
2017-02-13 22:25:00 1.01 K 5.85 K
2017-02-13 22:30:00 1017.31 5.71 K
2017-02-13 22:35:00 1001.28 5.85 K
2017-02-13 22:40:00 1004.63 5.71 K
2017-02-13 22:45:00 1012.11 5.80 K
2017-02-13 22:50:00 1001.26 5.80 K
2017-02-13 22:55:00 1.08 K 5.75 K
2017-02-13 23:00:00 1.16 K 5.95 K
2017-02-13 23:05:00 38.19 K 597.12 K
2017-02-13 23:10:00 16.99 K 373.11 K
2017-02-13 23:15:00
kjstech
Cacti User
Posts: 97
Joined: Thu Feb 28, 2013 2:57 pm

Re: The rrd file does not exist

Post by kjstech »

I'm still having this issue with one of my devices. Issue is I created all new graphs under (64-bit counters) and deleted all the interface statistics for the ones that were not using 64-bit counters. For some reason the system never created the .rrd files for the new graphs. So I used the touch command and made them all. All the files are intact but they are 0 KB in size. Their permissions are identical to other .rrd files in the /var/www/cacti/rra directory tree of devices that graph properly.

I created a new APC UPS graph today for voltage, wattage, load, etc.. and cacti had no issue creating the .rrd files in this directory, UNLIKE the In/Out bits 64-bit counters for the Cisco 3750x switch stack above.

Any ideas what is going on here? I updated to 1.0.3 with git and the issue still persists. Judging by the lack of responses here, should I be taking these kind of issues over to the github cacti project discussions?

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start='-34560000' \
--end='-300' \
--pango-markup \
--title='DCU-3750G-DRSAN - Te1/1/1 - Tegile Controller 1 ixgbe2 - N' \
--vertical-label='bits per second' \
--slope-mode \
--base=1000 \
--height=120 \
--width=500 \
--tabwidth '30' \
--rigid \
--alt-autoscale-max \
--lower-limit='0' \
--color BACK#F3F3F3 \
--color CANVAS#FDFDFD \
--color SHADEA#CBCBCB \
--color SHADEB#999999 \
--color FONT#000000 \
--color AXIS#2C4D43 \
--color ARROW#2C4D43 \
--color FRAME#2C4D43 \
--border 1 --font TITLE:11:'Ariel' \
--font AXIS:8:'Ariel' \
--font LEGEND:8:'Courier' \
--font UNIT:8:'Ariel' \
--font WATERMARK:6:'Ariel' \
--slope-mode \
--watermark 'Copyright (C) 2004-2017 The Cacti Group' \
DEF:a='/var/www/cacti/rra/dcu-3750g-drsan_traffic_in_2332.rrd':'traffic_in':AVERAGE \
DEF:b='/var/www/cacti/rra/dcu-3750g-drsan_traffic_in_2332.rrd':'traffic_out':AVERAGE \
CDEF:cdefa='a,8,*' \
CDEF:cdeff='b,8,*' \
CDEF:cdefbb='b,8,*,-1,*' \
AREA:cdefa#00CF00FF:"Inbound " \
GPRINT:cdefa:LAST:'Current\:%8.2lf %s' \
AREA:cdefa#00CF0033:"Inbound " \
GPRINT:cdefa:AVERAGE:'Average\:%8.2lf %s' \
GPRINT:cdefa:MAX:'Maximum\:%8.2lf %s\n' \
LINE1:cdeff#002A97FF:'Outbound' \
GPRINT:cdeff:LAST:'Current\:%8.2lf %s' \
AREA:cdeff#002A9719:"" \
GPRINT:cdeff:AVERAGE:'Average\:%8.2lf %s' \
GPRINT:cdeff:MAX:'Maximum\:%8.2lf %s' \
LINE1:cdefa#000000FF:'' \
LINE1:cdefbb#000000FF:''
RRDTool Says:
ERROR: mmaping file '/var/www/cacti/rra/dcu-3750g-drsan_traffic_in_2332.rrd': Invalid argument
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: The rrd file does not exist

Post by cigamit »

The problem can be one of a number of things, but to troubleshoot the issue the Graph Debug isn't going to help. You need to look at your Cacti log. The RRD file is only ever created if data is properly pulled from the device. Creating a blank file isn't going to help either (actually it can cause its own issues). You need to check your log (after letting it run at least MEDIUM level) to ensure that you are getting proper data back for that data source. If so, then it can be a whole number of other things, from permissions down to SELinux, etc...
kjstech
Cacti User
Posts: 97
Joined: Thu Feb 28, 2013 2:57 pm

Re: The rrd file does not exist

Post by kjstech »

Not running selinux.

Folder permissions mirror what cacti 0.8.7 was (and that worked perfectly).

I do see this a few times in /var/log/cacti/poller-error.log

PHP Warning: mysql_pconnect(): Access denied for user 'www-data'@'localhost' (u sing password: NO) in /usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 3 83


But if there really was an issue with mysql, Cacti would be 100% broken. In actuality I have many devices and graphs working correctly.

The device id for this particular switch stack giving me problems is 21. I changed Settings > General > Generic Log Level to DEBUG.
I ran php -q cmd.php --first=21 --last=21

I check the log and I see all of these oid's and values.

I am just perplexed.

I cloned this Ubuntu Cacti VM to another one and played around upgrading mysql 5.5 to 5.6. Issue wasn't resolved. I deleted the device and recreated it... rrd files were never built.

It's just an odd issue.
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: The rrd file does not exist

Post by cigamit »

Ya, something is definitely strange in your install. That adodb library was used in 0.8.8 but was dropped completely in 1.0. So if something is still calling it, you may have another cron or script running in the old install.
kjstech
Cacti User
Posts: 97
Joined: Thu Feb 28, 2013 2:57 pm

Re: The rrd file does not exist

Post by kjstech »

Well what I did was mv cacti to cacti-old
Then used git to get the new cacti in.
mysqldump the cacti db to back it up.
Used git to get the thold plugin.
Copied fix64bit from old cacti plugin (cacti-old/plugins/fix64bit)
copied scripts from cacti-old/scripts to cacti/scripts. This contained a bunch of custom scripts for Cisco Wireless Lan controller.
copied cacti-old/resource/script_queries, script_server, and snmp_queries to the new cacti install. More Cisco WLC stuff and some HVAC equipment and UPS gear.
copied cacti-old/rra to cacti/rra to maintain same stuff
Edited the file in the new cacti with the proper mysql credentials.
Log into the new cacti and it walked me though upgrading the database.
Setup my tholds again after activating the plugin.

Thats all I did.
/etc/crontab contains this bit about cacti:
$
*/1 * * * * root php /var/www/cacti/poller.php > /dev/null 2>&1
# 01 2 * * * root php /var/www/cacti/cli/poller_reindex_hosts.php --id=All -qid=1
# 01 3 * * * root php /var/www/cacti/cli/poller_graphs_reapply_names.php -id=All

(actually looks like those last two lines are commented out...)
But see its pointed to /var/www/cacti not /var/www/cacti-old.

There is a file called cacti in /etc/crond.d and it contains:
MAILTO=root
*/5 * * * * www-data php --define suhosin.memory_limit=512M /usr/share/cacti/site/poller.php 2>&1 >/dev/null | if [ -f /usr/bin/ts ] ; then ts ; else tee ; fi >> /var/log/cacti/poller-error.log

Again nothing pointed to cacti-old.

What else should I be checking? The fact that the new cacti is in the same path /var/www/cacti means anything should just be pointed to it.
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: The rrd file does not exist

Post by cigamit »

That entry in /etc/cron.d/ is what is causing that particular error. Its the same user (www-data) and its pointing to /usr/share/cacti/site/poller.php instead of /var/www/cacti/poller.php like your other cron job is.

It seems like your old install was from a package, which they tend to randomly move all the bits of cacti around to various areas. So you probably have all sorts of old files from the old cacti laying around in other places also.
kjstech
Cacti User
Posts: 97
Joined: Thu Feb 28, 2013 2:57 pm

Re: The rrd file does not exist

Post by kjstech »

Oh nice catch, I didn't notice the /usr/share vs /var/www. I will comment that line out and maybe it will help.
kjstech
Cacti User
Posts: 97
Joined: Thu Feb 28, 2013 2:57 pm

Re: The rrd file does not exist

Post by kjstech »

Hey everyone,

Still having an issue where one particular Cisco 3750x switch stack (consists of two 24 port switches) will not graph. The SNMP community string is correct, but rrd files are never created for the interfaces. I have screen shots of a different Cisco 3750 switch stack and a 3560 stand alone switch and I configured these up identically. This particuar switch stack graphed in 0.87 but it no longer will create rrd files since moving to the github maintained (now on master branch 1.0.4).

So at my wits end, I just deleted the device completely and ensured there were no .rrd files for it under /var/www/cacti/rra. I created the device again alongside carefully looking at every option of a similar Cisco switch, but still I do not get any .rrd files for the Interfaces which are tied to In/Out Bits (64-bit Counters) using the Interface - Traffic Data source template. The ONLY thing that graphs is the Cisco Router - 5 Minute CPU which shows a current CPU usage of 9 on this switch stack.

If I do an SNMPWalk on .iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable using ManageEngine MibBrowser Free Tool in Windows, I retrieve plenty of data.

Any idea where or what to look?
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: The rrd file does not exist

Post by cigamit »

It could lots of various issues, the first one to check is usually permissions on the rra folder or try disabling SELinux temporarily if its enabled.
ocoranes
Posts: 1
Joined: Thu Aug 24, 2017 10:09 pm

Re: The rrd file does not exist

Post by ocoranes »

its a permission issue..

solved mine by setting the permission correctly:

cd /var/www/html/cacti
chown -R cacti.apache rra log resource scripts cache
chmod -R 775 rra log resource scripts cache
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest