Error when migrating to another BSD host

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

Moderators: Developers, Moderators

Post Reply
rhuang76
Posts: 2
Joined: Thu May 11, 2006 10:36 am

Error when migrating to another BSD host

Post by rhuang76 »

Hi, I installed cacti quite well on a BSD host. But this host was just a poor PC.

I bought a new PC. I did all the same installation of softwares. But when I migrate data from the old PC, something get wrong. My procedures are as follow:

1, mysqldump old database on the old BSD;
2, tar the old rra files
3, use source under mysql to restore cacti database on the new BSD;
4, untar rra files
5, do some neccesary modification, such as db-settings.

When I open the cacti, everything works. But when I modify the "Graph Management", something really strange. The graph data source are lost, but graphs are still there. As you can see from the attachment, the two data sources are "none" and cannot be modified. Yet, it should be something else.

Please help. It took me a whole week to set up a cacti server which monitor over 1000 points of my network.

Thanks.
Attachments
The data sources are none and cannot be modified. If I choose save, the graph is gone.
The data sources are none and cannot be modified. If I choose save, the graph is gone.
Error.JPG (63.35 KiB) Viewed 6170 times
Last edited by rhuang76 on Thu May 11, 2006 8:49 pm, edited 2 times in total.
Murk
Posts: 2
Joined: Thu May 11, 2006 11:25 am

Post by Murk »

Hello,

I have exactly the same problem (well, not exactly as I moved from a Fedora Core 3 Host to a Gentoo one). Even newly created graphs do get "None" as values for the data sources even if the reference is correct as the graphs are working. The graphs stop working when you change something like description because after saving, the reference to the DS is gone.

This is cacti 0.8.6h_p20060108.

Any help is appreciated.

EDIT:

When I open the "Edit Graph" Page, this is printed in the logs:

Code: Select all


05/11/2006 11:23:12 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "select CONCAT_WS('', case when host.description is null then 'No Host - ' when host.description is not null then '' end,data_template_data.name_cache,' (',data_template_rrd.data_source_name,')') as name, data_template_rrd.id from (data_template_data,data_template_rrd,data_local) left join host on (data_local.host_id=host.id) where data_template_rrd.local_data_id=data_local.id and data_template_data.local_data_id=data_local.id and data_local.host_id=2 order by name"
Murk
Posts: 2
Joined: Thu May 11, 2006 11:25 am

Post by Murk »

Sorry for the double post, but that might highlight the sulution better:

Here is what fixed it for me:

Code: Select all

ALTER TABLE cdef CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE cdef_items CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE colors CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE data_input CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE data_input_data CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE data_input_fields CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE data_local CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE data_template CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE data_template_data CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE data_template_data_rra CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE data_template_rrd CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE graph_local CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE graph_template_input CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE graph_template_input_defs CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE graph_templates CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE graph_templates_gprint CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE graph_templates_graph CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE graph_templates_item CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE graph_tree CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE graph_tree_items CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE host CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE host_graph CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE host_snmp_cache CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE host_snmp_query CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE host_template CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE host_template_graph CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE host_template_snmp_query CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE poller CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE poller_command CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE poller_item CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE poller_output CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE poller_reindex CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE poller_time CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE rra CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE rra_cf CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE settings CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE settings_graphs CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE settings_tree CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE snmp_query CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE snmp_query_graph CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE snmp_query_graph_rrd CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE snmp_query_graph_rrd_sv CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE snmp_query_graph_sv CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE user_auth CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE user_auth_perms CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE user_auth_realm CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE user_log CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE version CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
rhuang76
Posts: 2
Joined: Thu May 11, 2006 10:36 am

It works!

Post by rhuang76 »

Thank you!
Kybber
Posts: 24
Joined: Mon Jul 05, 2004 10:29 am

Post by Kybber »

Ah, thank you so much! I just noticed that I was no longer
able to select data sources on the new graph-page after
updating from MySQL 4.1.14 (where Latin1 is default) to
4.1.19 (where UTF8 is default) in Gentoo. This tip solved
the problem :D
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest