RRD folder/rra sub folder not being created

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

gundalba
Posts: 46
Joined: Mon Feb 23, 2009 12:15 pm

Re: RRD folder/rra sub folder not being created

Post by gundalba »

netniV wrote:Is your spine configuration correct? Can you attempt to run it manually and see what it outputs?
I've checked spine.conf file but it seems ok to me....
DB_Host localhost
DB_Database cacti
DB_User cacti
DB_Pass cactiuser-password
DB_Port 3306

RDB_Host localhost
RDB_Database cacti
RDB_User cacti
RDB_Pass cactiuser-password
RDB_Port 3306


When I've tried running the crontab manually as cacti user, it didn't generate any response nor log.
So I tried again as root and it has created the ~cacti/rra/"device ID"/"rra files" with following output on log.

2018/04/10 10:12:40 - POLLER: Poller[1] WARNING: Cron is out of sync with the Poller Interval! The Poller Interval is '300' seconds, with a maximum of a '300' second Cron, but 2,844,759.9 seconds have passed since the last poll!
OK u:0.00 s:0.01 r:1.02
OK u:0.00 s:0.01 r:1.02
OK u:0.00 s:0.01 r:1.03
OK u:0.00 s:0.01 r:1.03
OK u:0.00 s:0.01 r:1.04
OK u:0.00 s:0.01 r:1.04
OK u:0.00 s:0.01 r:1.05
OK u:0.00 s:0.01 r:1.05
OK u:0.00 s:0.01 r:1.06
OK u:0.00 s:0.01 r:1.06
OK u:0.00 s:0.01 r:1.08
OK u:0.00 s:0.01 r:1.08
OK u:0.00 s:0.01 r:1.09
OK u:0.00 s:0.01 r:1.09
2018/04/10 10:12:42 - SYSTEM STATS: Time:1.3197 Method:spine Processes:1 Threads:1 Hosts:1 HostsPerProcess:1 DataSources:7 RRDsProcessed:7


The newerly created rra/deviceID subfolers with following ownership.

drwxr-xr-x. 2 cacti root 104 Apr 10 10:12 7/

# ls -latr ~cacti/rra/7
total 672
-rw-r--r--. 1 root root 95608 Apr 10 10:21 54.rrd
-rw-r--r--. 1 root root 95608 Apr 10 10:21 53.rrd
-rw-r--r--. 1 root root 95608 Apr 10 10:21 52.rrd
-rw-r--r--. 1 root root 95608 Apr 10 10:21 51.rrd
-rw-r--r--. 1 root root 95608 Apr 10 10:21 57.rrd
-rw-r--r--. 1 root root 95608 Apr 10 10:21 56.rrd
-rw-r--r--. 1 root root 95608 Apr 10 10:21 55.rrd

Looking at the file perm on rra sub-folder, all the rrd files were created as root probably per manual execution done as root.
And later on following errors - probably executed from cacti crontab.

ERROR: opening '/usr/share/cacti/rra/7/51.rrd': Permission denied
ERROR: opening '/usr/share/cacti/rra/7/52.rrd': Permission denied
ERROR: opening '/usr/share/cacti/rra/7/53.rrd': Permission denied
ERROR: opening '/usr/share/cacti/rra/7/54.rrd': Permission denied
ERROR: opening '/usr/share/cacti/rra/7/55.rrd': Permission denied
ERROR: opening '/usr/share/cacti/rra/7/56.rrd': Permission denied
ERROR: opening '/usr/share/cacti/rra/7/57.rrd': Permission denied
2018/04/10 10:17:24 - SYSTEM STATS: Time:1.2358 Method:spine Processes:1 Threads:1 Hosts:1 HostsPerProcess:1 DataSources:7 RRDsProcessed:7



At this point I am suspecting a permission issue in running the crontab as cacti user.
Though both php binary and poller.php has 755 perm on them and the ~cacti/rra folder which is link to
lrwxrwxrwx. 1 root root 18 Feb 27 15:21 rra -> /var/lib/cacti/rra/

and /var/lib/cacti folder shows
total 8
drwxr-xr-x. 6 apache apache 85 Feb 27 15:21 cache/
drwxr-xr-x. 2 root root 4096 Feb 27 15:21 cli/
lrwxrwxrwx. 1 root root 20 Feb 27 15:21 lib -> /usr/share/cacti/lib/
lrwxrwxrwx. 1 root root 24 Feb 27 15:21 include -> /usr/share/cacti/include/
drwxr-xr-x. 2 apache apache 4096 Feb 27 15:21 scripts/
drwxr-xr-x. 4 cacti root 254 Apr 10 10:12 rra/ <---------------------*****


So it may be the permission issue between cact user, apache and root?

Regards,
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: RRD folder/rra sub folder not being created

Post by netniV »

This would suggest that your permissions are not right. I think there was a post earlier about setting the appropriate permissions especially now that root has created those missing directories so it will likely be the owner.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
gundalba
Posts: 46
Joined: Mon Feb 23, 2009 12:15 pm

Re: RRD folder/rra sub folder not being created

Post by gundalba »

netniV wrote:This would suggest that your permissions are not right. I think there was a post earlier about setting the appropriate permissions especially now that root has created those missing directories so it will likely be the owner.
Thank you for all your help netniV!
I believe this is second time I am doing this during Cacti installation.
I also mixed up uid and gid during the install it seems.
I think those are corrected now and will see what else have I messed up during my intermittent installation process. :oops:
Another challenge of low priority projects I guess.

Cheers,
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest