Fresh apt-get install on debian, no graphs

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

Moderators: Developers, Moderators

Halfwalker
Posts: 18
Joined: Tue Jan 24, 2006 6:11 pm

Post by Halfwalker »

Well, you guys are a step ahead of me here. I'm testing this on a standard testing/etch Debian install. It all seems to go well, but I can't log in.

That is, going to http://192.168.1.122/cacti works as expected, pops up the new install screen and lets me verify/change item locations. Then it goes to a login screen, but nothing will log in.

I set up as user cacti, pw cacti. I manually did the grants etc defined above. Nada. I consistently get
Invalid User Name/Password Please Retype:
Any ideas ?

** Just got it figured out. Had to log in as admin/admin FIRST.

Sheesh, talk about a duh.

D.
Halfwalker
Posts: 18
Joined: Tue Jan 24, 2006 6:11 pm

Post by Halfwalker »

Hrm, I think I have the same troubles as the others here. I've installed 0.8.6h from the SID/unstable Debian release. Everything seems to be fine, except I'm getting no graphs at all. The poller seems to run fine as far as I can tell, but no graphs.

I have two devices defines - the localhost and a Cisco router. Well, there's a third defined, but it's not responding to snmp queries yet ...

Cacti log file from interface :

Code: Select all

 01/25/2006 01:00:05 PM - SYSTEM STATS: Time:3.0446 Method:cmd.php Processes:2 Threads:N/A Hosts:4 HostsPerProcess:2 DataSources:16 RRDsProcessed:11
01/25/2006 12:55:05 PM - SYSTEM STATS: Time:3.1305 Method:cmd.php Processes:2 Threads:N/A Hosts:4 HostsPerProcess:2 DataSources:16 RRDsProcessed:11
01/25/2006 12:54:33 PM - SYSTEM STATS: Time:2.0263 Method:cmd.php Processes:2 Threads:N/A Hosts:4 HostsPerProcess:2 DataSources:16 RRDsProcessed:11
01/25/2006 12:52:22 PM - SYSTEM STATS: Time:2.0279 Method:cmd.php Processes:2 Threads:N/A Hosts:4 HostsPerProcess:2 DataSources:16 RRDsProcessed:11
01/25/2006 12:50:04 PM - SYSTEM STATS: Time:3.0470 Method:cmd.php Processes:2 Threads:N/A Hosts:4 HostsPerProcess:2 DataSources:16 RRDsProcessed:11
01/25/2006 12:45:04 PM - SYSTEM STATS: Time:3.0425 Method:cmd.php Processes:2 Threads:N/A Hosts:4 HostsPerProcess:2 DataSources:16 RRDsProcessed:11
01/25/2006 12:40:04 PM - SYSTEM STATS: Time:3.0571 Method:cmd.php Processes:2 Threads:N/A Hosts:4 HostsPerProcess:2 DataSources:16 RRDsProcessed:11
Results of manually running poller.php as www-data

Code: Select all

monitor:/usr/share/cacti/site# su - www-data
www-data@monitor:~$ cd /usr/share/cacti/site/
www-data@monitor:/usr/share/cacti/site$ php poller.php
OK u:0.00 s:0.00 r:0.00
OK u:0.00 s:0.00 r:0.00
OK u:0.00 s:0.00 r:0.01
OK u:0.00 s:0.00 r:0.01
OK u:0.01 s:0.00 r:0.01
OK u:0.01 s:0.00 r:0.01
OK u:0.01 s:0.00 r:0.01
OK u:0.01 s:0.00 r:0.01
OK u:0.01 s:0.00 r:0.01
OK u:0.01 s:0.00 r:0.01
OK u:0.01 s:0.00 r:0.01
01/25/2006 12:54:33 PM - SYSTEM STATS: Time:2.0263 Method:cmd.php Processes:2 Threads:N/A Hosts:4 HostsPerProcess:2 DataSources:16 RRDsProcessed:11
www-data@monitor:/usr/share/cacti/site$
The poller is only run from /etc/cron.d/cacti

Code: Select all

monitor:/usr/share/cacti/site# cat /etc/cron.d/cacti
MAILTO=root
*/5 * * * * www-data /usr/share/cacti/site/poller.php >/dev/null 2>/var/log/cacti/poller-error.log
monitor:/usr/share/cacti/site#
I don't see anywhere in Graph Management to turn on debugging - I must be blind.

** EDIT - I found where to set debugging. I was blind. **

Any ideas ?

D.
Halfwalker
Posts: 18
Joined: Tue Jan 24, 2006 6:11 pm

Post by Halfwalker »

Hrm - this may have something to do with it ... I'm running Debian sarge/stable right now, but have installed cacti v0.8.6h from the unstable release. unstable uses a later version of rrdtool ...

Code: Select all

monitor:/usr/share/cacti/site# apt-cache policy rrdtool
rrdtool:
  Installed: 1.0.49-1
  Candidate: 1.0.49-1
  Version Table:
     1.2.11-0.5 0
        500 http://http.us.debian.org unstable/main Packages
     1.2.11-0.4 0
        500 http://http.us.debian.org testing/main Packages
 *** 1.0.49-1 0
        990 http://http.us.debian.org stable/main Packages
        100 /var/lib/dpkg/status
monitor:/usr/share/cacti/site#
Sarge/stable uses 1.0.49, while sid/unstable wants 1.2.11.

Looking in the cacti.log, I see that rrdtool is called as such ...

Code: Select all

/usr/bin/rrdtool graph -  --imgformat=PNG  --start=1138126659  --end=1138213059  --title="Testing - Memory Usage"  --\
rigid  --base=1000  --height=120  --width=500  --alt-autoscale-max  --lower-limit=0  COMMENT:"From 2006/01/24 13\:17\:39 To 2006/01/25 13\:17\:39\c"  COMMENT:"  \n"  --ver\
tical-label="bytes"  --slope-mode  DEF:a="/usr/share/cacti/site/rra/localhost_mem_totreal_15.rrd":mem_totreal:LAST  CDEF:cdefa=a,1024,*  CDEF:cdefb=a,-1024,*  CDEF:cdefc=a\
,1024,*  CDEF:cdeff=a,-1024,*  CDEF:cdefg=a,1024,*  CDEF:cdefj=a,-1024,*  CDEF:cdefba=a,1024,*  AREA:cdefa#EACC00:"Real Memory Allocated to Applications\n"   AREA:cdefb#C0\
C0C0:"Memory Free":STACK  GPRINT:cdefc:LAST:"                          Current\:"   GPRINT:cdefc:AVERAGE:"Average\:"   GPRINT:cdefc:MAX:"Maximum\:\n"   AREA:cdeff#dd0000:"\
Memory Buffers":STACK  GPRINT:cdefg:LAST:"                       Current\:"   GPRINT:cdefg:AVERAGE:"Average\:"   GPRINT:cdefg:MAX:"Maximum\:\n"   AREA:cdefj#EA8F00:"Cache \
Memory":STACK  GPRINT:cdefba:LAST:"                         Current\:"   GPRINT:cdefba:AVERAGE:"Average\:"   GPRINT:cdefba:MAX:"Maximum\:\n"   GPRINT:cdefa:LAST:"Total Mem\
ory \:"
Trying that manually shows that 1.0.49 of rrdtool chokes on the --slope-mode parameter. Must be only in 1.2.11 ... Unfortunately, I can't install the 1.2.11 version of rrdtool - it wants an updated libc, which is more of a system change than I'm willing to do on a stable system ...

Code: Select all

The following packages have unmet dependencies:
  rrdtool: Depends: libc6 (>= 2.3.5-1) but 2.3.2.ds1-22 is to be installed
           Depends: librrd2 (>= 1.2.11-0.4) but it is not going to be installed
So, any ideas ? I suppose I can pull down the source packages and rebuild them on sarge/stable, but ugh.

D.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Goto settings and select rrdtool-1.0.x. Then cacti won't generate any graph statements with --slope-mode
Reinhard
Halfwalker
Posts: 18
Joined: Tue Jan 24, 2006 6:11 pm

Post by Halfwalker »

Bingo - that did it. Another duh - I should have noticed the choice between 1.0.x and 1.2.x.

Thanks - seems to be working fine. Now, on to search for templates :)

D.
puma5k
Posts: 8
Joined: Mon Jan 23, 2006 12:26 pm

Post by puma5k »

Exo7 wrote:maybe a "dpkg-reconfigure php4-mysql" will do the job. answer yes to all questions.

extract from my script I use to install cacti automatically (as per /usr/share/doc/cacti/README.debian.gz):
bingo! Exo7 it worked, the PHP4-Mysql must have had some trouble, but it's working now, the graphs are growing

Thanks again
nerdtalker
Posts: 25
Joined: Sat Jan 15, 2005 8:27 pm

Post by nerdtalker »

Exo7 wrote:maybe a "dpkg-reconfigure php4-mysql" will do the job. answer yes to all questions.
Boom! That did it!

Thank you so much! The poller now runs without errors! :D
nerdtalker
Posts: 25
Joined: Sat Jan 15, 2005 8:27 pm

Post by nerdtalker »

Looks like I spoke too soon, the poller runs fine manually, but graphs aren't generating when I don't run it manually every once in a while.

Code: Select all

cacti@XboxServ:/usr/share/cacti/site$ php poller.php
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
OK u:0.00 s:0.00 r:5.09
OK u:0.00 s:0.00 r:5.09
OK u:0.00 s:0.00 r:5.10
OK u:0.00 s:0.00 r:5.11
OK u:0.00 s:0.00 r:5.11
OK u:0.00 s:0.00 r:5.12
OK u:0.00 s:0.00 r:5.12
01/28/2006 05:10:57 PM - SYSTEM STATS: Time: 6.7912 s, Method: cmd.php, Processes: 1, Threads: N/A, Hosts: 3, Hosts/Process: 3
In short, I think something is wrong with my cron job.

root's crontab -e

Code: Select all

*/5 * * * * cacti php /usr/share/cacti/site/poller.php > /dev/null 2>&1
I'm not sure if crond is running, however, since running

Code: Select all

ps aux | grep crond
reveals nothing...

What's going on? :(
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

So you should start crond? And put it in allrunlevels for startup (and shutdown, of course)? But I'm not familiar with debian...
Reinhard
Exo7
Cacti User
Posts: 136
Joined: Wed Jul 13, 2005 4:50 pm

Post by Exo7 »

I don't change anything to crontab when I install Cacti with Debian package, except when I want to install the Thold plugin.

Can you change "cacti" to "www-data" in the crontab ? unless you have changed permission or ownership on cacti folders after install, that's how it is setup under debian. A file named "cacti" should be present under /etc/cron.d/ with this same line. there is no entry in root crontab for cacti.

for cron, try "ps aux | grep cron" instead of "crond". Cron should not be running in single user mode (runlevel 1)
nerdtalker
Posts: 25
Joined: Sat Jan 15, 2005 8:27 pm

Post by nerdtalker »

Exo7 wrote: Can you change "cacti" to "www-data" in the crontab ? unless you have changed permission or ownership on cacti folders after install, that's how it is setup under debian. A file named "cacti" should be present under /etc/cron.d/ with this same line. there is no entry in root crontab for cacti.
I might've done something stupid there. In the process of troubleshooting, I changed ownership of the cacti folders to cacti, since that was the user I had running the poller on root's crontab. Per the information in this thread about the file in /etc/cron.d/, I just deleted it, although I guess I could try deleting root's crontab and restoring that file.
Exo7 wrote: for cron, try "ps aux | grep cron" instead of "crond". Cron should not be running in single user mode (runlevel 1)
When I run that, I see

Code: Select all

XboxServ:~# ps aux | grep cron
root      1435  0.0  1.3  1756  812 ?        Ss   15:46   0:00 /usr/sbin/cron
I should see crond running, right? I'm in a multiuser runlevel (2).
nerdtalker
Posts: 25
Joined: Sat Jan 15, 2005 8:27 pm

Post by nerdtalker »

Well, I managed to get cacti working by deleting root's cronjob, and adding back the original one in /cron.d/cacti, so it works. Or should I say... worked.

However, after I started looking around for templates, I noticed that I was running 0.8.6c, and I need 0.8.6g for the template in mind (advanced ping).

I started by downloading the latest unstable source version through apt-get, and building it with:

Code: Select all

apt-get -b source cacti
It happily went off, fetched it, built it, and left me to install it using

Code: Select all

dpkg -i cactifile.deb
However, when I run that, I get

Code: Select all

XboxServ:~# dpkg -i cacti_0.8.6h-2_all.deb
Selecting previously deselected package cacti.
(Reading database ... 38342 files and directories currently installed.)
Preparing to replace cacti 0.8.6h-2 (using cacti_0.8.6h-2_all.deb) ...
Unpacking replacement cacti ...
dpkg: dependency problems prevent configuration of cacti:
 cacti depends on dbconfig-common (>= 1.8.8); however:
  Package dbconfig-common is not installed.
dpkg: error processing cacti (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 cacti
Obviously, I tried installing dbconfig-common, but then I get:

Code: Select all

XboxServ:~# apt-get install dbconfig-common
Reading Package Lists... Done
Building Dependency Tree... Done
Package dbconfig-common is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package dbconfig-common has no installation candidate
I then tried to simply remove cacti, but that leads me in circles

Code: Select all

XboxServ:~# apt-get remove cacti
Reading Package Lists... Done
Building Dependency Tree... Done
The following packages will be REMOVED:
  cacti
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0B of archives.
After unpacking 3510kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 38660 files and directories currently installed.)
Removing cacti ...
/var/lib/dpkg/info/cacti.postrm: line 15: /usr/share/dbconfig-common/dpkg/postrm.mysql: No such file or directory
dpkg: error processing cacti (--remove):
 subprocess post-removal script returned error exit status 1
Errors were encountered while processing:
 cacti
E: Sub-process /usr/bin/dpkg returned an error code (1)
I'm not sure what the heck is going on, all I want to do is move to the latest version of cacti and ditch the old one. I'm not sure if this is within the scope of the original topic, but I'm relatively a debian noob, so I'm somewhat sure that I've either heartily screwed this thing up, or I'm making a simple error.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest