SQL Select Errors in Fresh 87g install

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

Moderators: Developers, Moderators

dononeil
Cacti User
Posts: 194
Joined: Wed Aug 06, 2008 4:45 pm

SQL Select Errors in Fresh 87g install

Post by dononeil »

I just installed cacti 87g on a new machine, I don't have any hosts except localhost defined and I am getting all sorts of SQL errros, and no graphs/rrd's being generated:

07/15/2010 04:22:52 PM - SYSTEM STATS: Time:0.0054 Method:spine Processes:4 Threads:25 Hosts:0 HostsPerProcess:0 DataSources:1 RRDsProcessed:0
07/15/2010 04:22:52 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'0', SQL:"REPLACE INTO settings (name,value) VALUES ('stats_poller','Time:0.0054 Method:spine Procses:4 Threads:25 Hosts:0 HostsPerProcess:0 DataSources:1 RRDsProcessed:0')'
07/15/2010 04:22:52 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed!, Error:'0', SQL:"SELECT COUNT(*) FROM poller_command"
07/15/2010 04:22:52 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'0', SQL:"REPLACE INTO settings (name,value) VALUES ('stats_recache','RecacheTime:0.0 HostsRecache0')'
07/15/2010 04:22:52 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SELECT 1 AS id, ph.name, ph.file, ph.function FROM plugin_hooks AS ph LEFT JOIN pluginonfig AS pc ON pc.directory=ph.name WHERE ph.status = 1 AND hook = 'poller_bottom' AND ph.name IN ('settings', 'boost', 'dsstats') UNION SELECT pc.id, ph.name, ph.file,h.function FROM plugin_hooks AS ph LEFT JOIN plugin_config AS pc ON pc.directory=ph.name WHERE ph.status = 1 AND hook = 'poller_bottom' AND ph.name NOT IN ('settings', oost', 'dsstats') ORDER BY id ASC"
07/15/2010 04:23:02 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SELECT 1 AS id, ph.name, ph.file, ph.function FROM plugin_hooks AS ph LEFT JOIN pluginonfig AS pc ON pc.directory=ph.name WHERE ph.status = 1 AND hook = 'poller_top' AND ph.name IN ('settings', 'boost', 'dsstats') UNION SELECT pc.id, ph.name, ph.file, phunction FROM plugin_hooks AS ph LEFT JOIN plugin_config AS pc ON pc.directory=ph.name WHERE ph.status = 1 AND hook = 'poller_top' AND ph.name NOT IN ('settings', 'boost 'dsstats') ORDER BY id ASC"
07/15/2010 04:23:02 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SELECT id FROM host WHERE disabled = '' ORDER BY id"
07/15/2010 04:23:02 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'0', SQL:"REPLACE INTO settings (name,value) VALUES ('path_webroot','/data/cacti')'
07/15/2010 04:23:02 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed!, Error:'0', SQL:"SELECT count(*) FROM poller_time WHERE end_time='0000-00-00 00:00:00'"
07/15/2010 04:23:02 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'0', SQL:"TRUNCATE TABLE poller_time'
07/15/2010 04:23:02 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SELECT local_data_id, rrd_name FROM poller_output"
07/15/2010 04:23:02 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SELECT 1 AS id, ph.name, ph.file, ph.function FROM plugin_hooks AS ph LEFT JOIN pluginonfig AS pc ON pc.directory=ph.name WHERE ph.status = 1 AND hook = 'poller_command_args' AND ph.name IN ('settings', 'boost', 'dsstats') UNION SELECT pc.id, ph.name, phile, ph.function FROM plugin_hooks AS ph LEFT JOIN plugin_config AS pc ON pc.directory=ph.name WHERE ph.status = 1 AND hook = 'poller_command_args' AND ph.name NOT IN (ettings', 'boost', 'dsstats') ORDER BY id ASC"
07/15/2010 04:23:02 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'0', SQL:"REPLACE INTO settings (name,value) VALUES ('date',NOW())'
07/15/2010 04:23:02 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed!, Error:'0', SQL:"SELECT count(*) FROM poller_time WHERE poller_id=0 AND end_time>'0000-00-00 00:00:00'"
07/15/2010 04:23:02 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"select poller_output.output, poller_output.time, poller_output.local_data_id, pollertem.rrd_path, poller_item.rrd_name, poller_item.rrd_num from (poller_output,poller_item) where (poller_output.local_data_id=poller_item.local_data_id and poller_output.r_name=poller_item.rrd_name) "

87g was installed with the latest spine, 4.0-2 boost, rrdcleaner, rrdtool 1.44, titlechanger, realtime .40.

Doesn't seem to make a difference how I make the settings.... enable or disable boost, etc...

This seems to be a problem with the PIA.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

I don't have these errors on my cacti 0.8.7g + PIA 2.8 installation...

Any errors on the cacti technical support page?
dononeil
Cacti User
Posts: 194
Joined: Wed Aug 06, 2008 4:45 pm

Post by dononeil »

Nope, no errors:

Date Fri, 16 Jul 2010 14:53:08 -0700
Cacti Version 0.8.7g
Cacti OS unix
SNMP Version NET-SNMP version: 5.3.0.1
RRDTool Version RRDTool 1.4.x
Hosts 1
Graphs 6
Data Sources Script/Command: 5
SNMP Query: 1
Script Query: 1
Total: 7
Poller Information
Interval 10
Type spine
Items Action[0]: 2
Action[1]: 7
Total: 9
Concurrent Processes 4
Max Threads 25
PHP Servers 10
Script Timeout 60
Max OID 60
Last Run Statistics Time:0.2387 Method:spine Processes:4 Threads:25 Hosts:2 HostsPerProcess:1 DataSources:1 RRDsProcessed:0
PHP Information
PHP Version 5.2.5
PHP OS Linux
PHP uname Linux cactidev 2.6.16.60-0.21-smp #1 SMP Tue May 6 12:41:02 UTC 2008 x86_64
PHP SNMP Installed
max_execution_time 30
memory_limit 1024M

Since it's a fresh install, I'm going to wipe it again and start from scratch, and test each step of the way to see where it fails.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Installing from a distro or cacti.net ?
dononeil
Cacti User
Posts: 194
Joined: Wed Aug 06, 2008 4:45 pm

Post by dononeil »

Cacti.net original files/links from the forum in the announcement.
User avatar
phreakocious
Posts: 7
Joined: Mon Sep 25, 2006 7:44 pm

Post by phreakocious »

I am also struggling with this on an upgrade from 87e. It seems like the poller can't connect to the database? Error 0 ...


07/20/2010 03:26:54 PM - SYSTEM STATS: Time:0.0032 Method:cmd.php Processes:24 Threads:N/A Hosts:0 HostsPerProcess:0 DataSources:1584 RRDsProcessed:0
07/20/2010 03:26:54 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SELECT id FROM host WHERE disabled = '' ORDER BY id"
07/20/2010 03:26:54 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'0', SQL:"REPLACE INTO settings (name,value) VALUES ('path_webroot','/polk/cacti-0.8.7g')'
07/20/2010 03:26:54 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed!, Error:'0', SQL:"SELECT count(*) FROM poller_time WHERE end_time='0000-00-00 00:00:00'"
07/20/2010 03:26:54 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'0', SQL:"TRUNCATE TABLE poller_time'
07/20/2010 03:26:54 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SELECT local_data_id, rrd_name FROM poller_output"
07/20/2010 03:26:54 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'0', SQL:"REPLACE INTO settings (name,value) VALUES ('date',NOW())'
07/20/2010 03:26:54 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed!, Error:'0', SQL:"SELECT count(*) FROM poller_time WHERE poller_id=0 AND end_time>'0000-00-00 00:00:00'"
07/20/2010 03:26:54 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"select poller_output.output, poller_output.time, poller_output.local_data_id, poller_item.rrd_path, poller_item.rrd_name, poller_item.rrd_num from (poller_output,poller_item) where (poller_output.local_data_id=poller_item.local_data_id and poller_output.rrd_name=poller_item.rrd_name) "
07/20/2010 03:26:54 PM - SYSTEM STATS: Time:0.0032 Method:cmd.php Processes:24 Threads:N/A Hosts:0 HostsPerProcess:0 DataSources:1584 RRDsProcessed:0
07/20/2010 03:26:54 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'0', SQL:"REPLACE INTO settings (name,value) VALUES ('stats_poller','Time:0.0032 Method:cmd.php Processes:24 Threads:N/A Hosts:0 HostsPerProcess:0 DataSources:1584 RRDsProcessed:0')'
07/20/2010 03:26:54 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed!, Error:'0', SQL:"SELECT COUNT(*) FROM poller_command"
07/20/2010 03:26:54 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'0', SQL:"REPLACE INTO settings (name,value) VALUES ('stats_recache','RecacheTime:0.0 HostsRecached:0')'
^C07/20/2010 03:27:16 PM - CMDPHP: Poller[0] WARNING: Cacti Master Poller process terminated by user
cacti@oRly:/polk/cacti$ 07/20/2010 03:27:16 PM - CMDPHP: Poller[0] WARNING: Cacti Master Poller process terminated by user
07/20/2010 03:27:16 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'0', SQL:"SELECT * FROM poller_time WHERE end_time='0000-00-00 00:00:00'"
07/20/2010 03:27:16 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'0', SQL:"TRUNCATE TABLE poller_time'
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

dononeil wrote:Cacti.net original files/links from the forum in the announcement.
This is which MySQL version, please? And which type of Linux distro?
R.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

phreakocious wrote:I am also struggling with this on an upgrade from 87e. It seems like the poller can't connect to the database? Error 0 ...
We need PHP, MySQL and Linux versions, please
R.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

All, please review http://www.php.net/manual/de/function.m ... .php#72552 and post results
R.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

All, please review http://www.php.net/manual/de/function.m ... .php#72552 and post results
R.
User avatar
phreakocious
Posts: 7
Joined: Mon Sep 25, 2006 7:44 pm

Post by phreakocious »

Reviewing the links you posted now.

I re-symlinked to 87e and everything started working again.

Ubuntu 9.10
PHP 5.2.10
MySQL 5.1.37

I've been running cacti for at least 7 years.. Thanks for the great software.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Here's more to check. All sound like a MySQL issue.
But that does not explain, why 087e is fine and 087g does not work.

Anyway:
http://www.bramschoenmakers.nl/en/node/595
http://bugs.mysql.com/bug.php?id=28359
R.
User avatar
phreakocious
Posts: 7
Joined: Mon Sep 25, 2006 7:44 pm

Post by phreakocious »

Thanks... The last one you mention seems to be the only thing that might match up... This strace of the poller process seems to imply that a connection is there, though:


write(3, "V\0\0\0\3SELECT count(*) FROM poller"..., 90) = 90
read(3, "\1\0\0\1\1\36\0\0\2\3def\0\0\0\10count(*)\0\f?\0\25\0\0"..., 16384) = 64
poll([{fd=3, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
write(3, "'\1\0\0\3select poller_output.outpu"..., 299) = 299
read(3, "\1\0\0\1\6A\0\0\2\3def\5cacti\rpoller_outpu"..., 16384) = 832
access("/etc/localtime", R_OK) = 0
access("/etc/localtime", R_OK) = 0
access("/etc/localtime", R_OK) = 0
access("/etc/localtime", R_OK) = 0
access("/etc/localtime", R_OK) = 0
poll([{fd=3, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
write(3, "n\0\0\0\3delete from poller_output w"..., 114) = 114
read(3, "\7\0\0\1\0\1\0\2\0\0\0", 16384) = 11
access("/etc/localtime", R_OK) = 0
poll([{fd=3, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
write(3, "p\0\0\0\3delete from poller_output w"..., 116) = 116
read(3, "\7\0\0\1\0\1\0\2\0\0\0", 16384) = 11
access("/etc/localtime", R_OK) = 0
poll([{fd=3, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
write(3, "o\0\0\0\3delete from poller_output w"..., 115) = 115
read(3, "\7\0\0\1\0\1\0\2\0\0\0", 16384) = 11
access("/etc/localtime", R_OK) = 0
poll([{fd=3, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
write(3, "m\0\0\0\3delete from poller_output w"..., 113) = 113
read(3, "\7\0\0\1\0\1\0\2\0\0\0", 16384) = 11
poll([{fd=3, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
write(3, "\263\1\0\0\3SELECT 1 AS id, ph.name, ph"..., 439) = 439
read(3, "\1\0\0\1\4\32\0\0\2\3def\0\0\0\2id\2id\f?\0\v\0\0\0\10\0\0"..., 16384) = 217
access("/polk/cacti-0.8.7g/plugins/thold/includes/polling.php", F_OK) = 0
poll([{fd=3, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
write(3, "\35\2\0\0\3SELECT thold_data.percent_d"..., 545) = 545
read(3, "\1\0\0\1\nC\0\0\2\3def\5cacti\nthold_data\nt"..., 16384) = 755
poll([{fd=3, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
write(3, "\271\1\0\0\3SELECT 1 AS id, ph.name, ph"..., 445) = 445
read(3, "\1\0\0\1\4\32\0\0\2\3def\0\0\0\2id\2id\f?\0\v\0\0\0\10\0\0"..., 16384) = 163
dononeil
Cacti User
Posts: 194
Joined: Wed Aug 06, 2008 4:45 pm

Post by dononeil »

gandalf wrote:
dononeil wrote:Cacti.net original files/links from the forum in the announcement.
This is which MySQL version, please? And which type of Linux distro?
R.
Linux: SLES 10.2 64 Bit (same as my 87d installs)
MySQL: 5.1.31
PHP: 5.2.5
User avatar
phreakocious
Posts: 7
Joined: Mon Sep 25, 2006 7:44 pm

Post by phreakocious »

Good point.. 64 bit here, as well.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests