Strange SQL error

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

Moderators: Developers, Moderators

Post Reply
plaguekriz
Posts: 1
Joined: Mon Jul 13, 2009 1:21 am

Strange SQL error

Post by plaguekriz »

I've installed Cacti recently and have problem with SQL database. In cacti log some time appear records like that:

07/14/2009 11:10:01 AM - CMDPHP: Poller[0] DEVEL: SQL Exec: "insert into poller_output (local_data_id, rrd_name, time, output) values (7, 'proc', '2009-07-14 11:10:01', '136')"
07/14/2009 11:10:01 AM - CMDPHP: Poller[0] Host[1] DS[7] CMD: perl /var/www/cacti/scripts/unix_processes.pl, output: 136
07/14/2009 11:10:01 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1062', SQL:"insert into poller_output (local_data_id, rrd_name, time, output) values (6, 'users', '2009-07-14 11:10:01', '0')'

As you can see cacti cannot write information about users but easily write information about processes. Also there are same errors with mem_swap and mem_buffers. Please help me fix this problem.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

What cacti, php, mysql version? Cacti 0.8.7e is the latest, I suggest you upgrade.

Cacti technical support page show any errors?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

This may be a result of a double poller issue, please see 2nd link of my sig and read thoroughly
Reinhard
hapklaar
Posts: 38
Joined: Tue May 31, 2005 10:06 am

Post by hapklaar »

Having the same problem, resulting in occasional gaps in graphs. Another symptom is that a poll run sometimes times out on 300secs. Normally this takes 58 secs using cmd.php. Haven't been able to find out yet what it could be using cacti.log.

I'm using cacti 0.8.7d and had one red line on the technical support page saying I needed to increase memory_limit in php.ini. Just increased it to 128MB.

I will check out the link Gandalf suggested now and will report back later
hapklaar
Posts: 38
Joined: Tue May 31, 2005 10:06 am

Post by hapklaar »

I've not been able to track the cause down. This seems to be happening a couple of times a day. Sometime giving SQL errors, other times just exceeded runtime errors or script errors. I've included a piece of the log file, not debug log though, because this becomes too huge to work with.

What could this be?
Attachments
cactilog.txt
(198.64 KiB) Downloaded 151 times
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Those spurts of time where lots of devices get the "Result from SERVER not valid" -- what types of devices and what are those DS's running? The MySQL server on the same box as cacti or remote? A WAG would be a network latency/other issue, since the poller runs ok for 1+ hour periods at a time.
hapklaar
Posts: 38
Joined: Tue May 31, 2005 10:06 am

Post by hapklaar »

Those datasources are all advanced ping (1.3) to cisco dsl routers and the MySQL server is on the same server as cacti.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

I forget, advanced ping use the script server? maybe php crashes or something during those times. Do you have php error logging enabled?
hapklaar
Posts: 38
Joined: Tue May 31, 2005 10:06 am

Post by hapklaar »

It does indeed use the script server. I did not have php error logging enabled, but I do now (php.ini: log_errors = On) .
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

I hope you're writing it to file so you can see what gets logged...
User avatar
TheWitness
Developer
Posts: 17062
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

If you are using process leveling, turn it off under Settings->Poller.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests