Saving data source or graph causes item to disappear

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

Moderators: Developers, Moderators

Post Reply
BigWillyStyle42
Posts: 11
Joined: Tue Mar 14, 2006 11:13 am

Saving data source or graph causes item to disappear

Post by BigWillyStyle42 »

Occassionally when I make a change to a data source and save the data source will no longer appear in the list of data sources and this error will appear in my cacti.log:

Code: Select all

03/14/2006 04:10:19 PM - CMDPHP: Poller[0] ERROR: SQL Row Failed "select  host.id,  host.hostname,  host.snmp_community,  host.snmp_version,  host.snmp_username,  host.snmp_password,  host.snmp_port,  post.snmp_timeout,  host.disabled  from host  where host.id="
If I repeatedly open a data source for modification and save without any changes I can cause this to happen to multiple data sources.

I'm using:

Debian Etch (2.6.15 kernel)
MySQL 5.0.18-9
PHP 4.4.2-1
Cacti 0.8.6h-2

Since I installed cacti from apt-get I wasn't sure if the sql patches were applied, so I tried applying them to see if that would fix the problem, but I was told by patch that they were already applied. Any ideas or recommendations? (besides not saving data sources :P )

This also happened when I was trying to add a new graph to monitor my wireless access point. I created the data input method, the data source, and the graph. Then while I was configuring the graph the graph disappeared from the list and I received these in my error log:

Code: Select all

03/14/2006 02:30:13 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "select  graph_local.graph_template_id  from (graph_local,host_graph)  where graph_local.graph_template_id=host_graph.graph_template_id  and graph_local.host_id=host_graph.host_id  and graph_local.host_id=  group by graph_local.graph_template_id"
03/14/2006 02:30:13 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "select  snmp_query.id,  snmp_query.name,  snmp_query.xml_path  from (snmp_query,host_snmp_query)  where host_snmp_query.snmp_query_id=snmp_query.id  and host_snmp_query.host_id=  order by snmp_query.name"
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Please comment out "sql_mode" in you my.cnf file.

mySQL looks like it is following strict SQL99 standards.

The error you are encountering is after the save, I would assume.

Let me know the results of the change.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
BigWillyStyle42
Posts: 11
Joined: Tue Mar 14, 2006 11:13 am

Post by BigWillyStyle42 »

Unfortunately there is no "sql_mode" in my my.cnf file, I checked for that after reading a few other threads that mentioned SQL problems. Those threads also mentioned using MySQL Administrator to find and/or change the value. I'm not terribly familiar with mysql, so if that's what you'd like me to do could you give me explicit commands to give to mysql?

Thanks
BigWillyStyle42
Posts: 11
Joined: Tue Mar 14, 2006 11:13 am

Post by BigWillyStyle42 »

A little googling found me this page:

http://dev.mysql.com/doc/mysql/en/server-sql-mode.html

So from that I tried this:

Code: Select all

mysql> SELECT @@global.sql_mode
    -> ;
+-------------------+
| @@global.sql_mode |
+-------------------+
|                   |
+-------------------+
1 row in set (0.00 sec)

mysql> SELECT @@session.sql_mode
    -> ;
+--------------------+
| @@session.sql_mode |
+--------------------+
|                    |
+--------------------+
1 row in set (0.00 sec)
I don't know what modes it is supposed to be using, but I assume that since it is unset it is using some default.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests