Cant get cron jobs to work

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

Moderators: Developers, Moderators

Post Reply
jwashburn
Posts: 33
Joined: Fri Jun 09, 2006 12:56 pm

Cant get cron jobs to work

Post by jwashburn »

I have read through a lot of the tips here and they all seem to ask what account the poller is running in.

This is where I am at.
Fedora Core 6
Using Webmin for GUI access to Fedora (im not very good at Linux yet)

I add a device. I create the graphs in cacti no problems.

If I jump into Webmin and access the cronjob and execute now. Nothing happens. No errors, graphs are shown as broken images.

If I SSH into my server and log in as root and run poller.php I get the graphs created. Some how NaN some show data. (ill tackle that problem next)

All the troublshooting seems to point to the cronjob running as the wrong user. I dont know how to log in with ssh as cactiuser it doesnt seem to accept the password.

If I change the cronjob to run as root it says it cant find the file.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Login as root again. Search
/etc/crontab
/etc/cron.d/cacti and
crontab -e -u cactiuser
for poller entries. Post those lines found (I'm not familiar with webmin).
Make sure, that after running the poller as root, all rrd files are chown'ed to cactiuser or subsequent updates will fail
Reinhard
sneader
Posts: 4
Joined: Wed Feb 14, 2007 1:57 am

Post by sneader »

Just wanted to thank you for the tip about the RRD files all being owned by root... I had run "php poller.php" for testing purposes so much, as root, that I forgot about cleaning up the RRD files. This little tip really helped me out!

For any other newbies out there, I was able to fix the problem by changing the owner and group to my "cactiuser" by entering the following from the /html/cacti directory:

chgrp -R cactiuser rra
chown -R cactiuser rra

And regarding the crontab issue, I received a lot of help by reading this page:

http://blog.dreamhosters.com/kbase/index.cgi?area=2506

Hope this helps others...

- Scott



- Scott
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests