Broken Graph Tree on version 0.8.6i

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

Moderators: Developers, Moderators

Post Reply
patrioticduo
Posts: 7
Joined: Tue Jul 11, 2006 6:45 pm

Broken Graph Tree on version 0.8.6i

Post by patrioticduo »

Platform Fedora Core 4 (excuse the age) cacti v0.8.6i

I recently tried adding a scripted input data method (which ended up working after some tinkering) but this introduced a problem due to a bug (link of which I don't have). After that, I find that the graph tree only shows the first couple of graph tree items. In those three graph tree items are many devices in their own trees.

I've looked long and hard through the forums here and can't find anything to help.

I built a new server (FC10 with Cacti0.8.7d, rrdtool 1.3.4 php 5.2.6 and then tried to export and import the database but I got a lot of SQL errors like:

"ERROR 1062 (23000) at line 111: Duplicate entry '3' for key 1"

Any help on this would be much appreciated because we have a hundred or so routers and switches in the database and we would very much dislike rebuilding the database from scratch.

Thanks,

Mike.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

You have to dump your old database to a file, import to the new system, and then login and conduct the upgrade.

The new system should have an empty database before you start, otherwise, you get what you got. There are also techniques to not skip a beat with regards to the RRDfile conversion. You need to search the How-To section of the forum for several script options, even a plugin to do it.

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?
patrioticduo
Posts: 7
Joined: Tue Jul 11, 2006 6:45 pm

But it's the old database that's busted...

Post by patrioticduo »

That's exactly what I did. I've done several database export/import/upgrades of cacti over the years. I only tried this because the 8.6i Cacti seems to be broken with it's tree structure.

The original problem was that after creating a new scripted input method I struck a bug which caused the tree to break. So then I hoped that an export/import/upgrade would *MAYBE* get around the problem. But actually, I have doubts that the export is working properly (because the database export is about 8M while a one year old export is about 10M) and the import/upgrade results in zero host and zero tree.

I spent the last week trawling through the cacti forums. So now I am really hoping I get a few suggestions on how to identify the problem in the database. The graphs themselves are all updating as they should be. I can reach all of the devices graphs via the other GUI methods - just not the graph tree.

I ran the php clean up/ reindex scripts - that didn't help. I can add new hosts. I can add new graph tree entries. But they don't show up on the graph tree itself even though they show up in the list view and preview view.
patrioticduo
Posts: 7
Joined: Tue Jul 11, 2006 6:45 pm

Found problem with tree

Post by patrioticduo »

OK, I had a hard look through the graph tree and saw several hosts that were "tabbed" in to the right further than they should have been. So I deleted them and bingo! the graph tree started working again.

Now I am going to see if I can do the export/import/upgrade again.

If I have problems I will post on this topic if that's OK with you.

And thanks for your help so far.

Mike.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Ok Mike.

Larry
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?
patrioticduo
Posts: 7
Joined: Tue Jul 11, 2006 6:45 pm

Third attempt still fails

Post by patrioticduo »

OK, I have tried this several several different ways but they all end up with the same result.

I exported the database from our live, production Cacti server which is running OK (on FC4) but is outputting some messages that tend to suggest something is not well with the database, such as:

CMDPHP: ERROR: SQL Row Failed 'select id,data_input_id from data_template_data where data_template_id= and local_data_id=0'

To export the database, I used export command as below:

#mysqldump -t -u root -p cacti > cacti.090319

I then copied this over to the new FC10 machine. I made sure that I deleted my previous attempts at doing the export/import.

#mysqladmin -u root -p drop cacti
<snip>
Do you really want to drop the 'cacti' database [y/N] y
Database "cacti" dropped

I then recreated the database:

#mysqladmin -u root -p create cacti

I then imported the new schema.

#mysql -u root -p cacti < /usr/share/doc/cacti-0.8.7d/cacti.sql

I then imported the old data.

#mysql -f -u root -p cacti < cacti.090319

Here is the output of the import:

ERROR 1062 (23000) at line 23: Duplicate entry '3' for key 1
ERROR 1062 (23000) at line 34: Duplicate entry '7' for key 1
ERROR 1062 (23000) at line 45: Duplicate entry '1' for key 1
ERROR 1062 (23000) at line 56: Duplicate entry '1' for key 1
ERROR 1062 (23000) at line 67: Duplicate entry '14-1' for key 1
ERROR 1062 (23000) at line 78: Duplicate entry '1' for key 1
ERROR 1062 (23000) at line 89: Duplicate entry '7' for key 1
ERROR 1062 (23000) at line 100: Duplicate entry '3' for key 1
ERROR 1062 (23000) at line 111: Duplicate entry '3' for key 1
ERROR 1062 (23000) at line 122: Duplicate entry '3-1' for key 1
ERROR 1062 (23000) at line 133: Duplicate entry '3' for key 1
ERROR 1062 (23000) at line 144: Duplicate entry '4' for key 1
ERROR 1062 (23000) at line 155: Duplicate entry '3' for key 1
ERROR 1062 (23000) at line 166: Duplicate entry '3-9' for key 1
ERROR 1062 (23000) at line 177: Duplicate entry '34' for key 1
ERROR 1062 (23000) at line 188: Duplicate entry '2' for key 1
ERROR 1136 (21S01) at line 199: Column count doesn't match value count at row 1
ERROR 1136 (21S01) at line 210: Column count doesn't match value count at row 1
ERROR 1062 (23000) at line 221: Duplicate entry '1' for key 1
ERROR 1136 (21S01) at line 243: Column count doesn't match value count at row 1
ERROR 1062 (23000) at line 254: Duplicate entry '1-8' for key 1
ERROR 1062 (23000) at line 291: Duplicate entry '1' for key 1
ERROR 1062 (23000) at line 302: Duplicate entry '3-4' for key 1
ERROR 1062 (23000) at line 313: Duplicate entry '1-1' for key 1
ERROR 1136 (21S01) at line 344: Column count doesn't match value count at row 1
ERROR 1136 (21S01) at line 377: Column count doesn't match value count at row 1
ERROR 1062 (23000) at line 388: Duplicate entry '1' for key 1
ERROR 1062 (23000) at line 399: Duplicate entry '1-1' for key 1
ERROR 1062 (23000) at line 410: Duplicate entry 'path_webroot' for key 1
ERROR 1062 (23000) at line 442: Duplicate entry '1' for key 1
ERROR 1062 (23000) at line 453: Duplicate entry '2' for key 1
ERROR 1062 (23000) at line 464: Duplicate entry '2-38-47' for key 1
ERROR 1062 (23000) at line 475: Duplicate entry '10' for key 1
ERROR 1062 (23000) at line 486: Duplicate entry '7' for key 1
ERROR 1136 (21S01) at line 497: Column count doesn't match value count at row 1
ERROR 1062 (23000) at line 519: Duplicate entry '1-1' for key 1

I set up db.php to point to cacti database and used root as the user to avoid permissioning issues.

I then went into the web browser and pointed at localhost/cacti and it popped up the welcome page, click next and it asks me if it's a new install or an upgrade. I selected upgrade and I get the result:

Error

Invalid Cacti version new_install, cannot upgrade to 0.8.7d

And I've tried this a few times now with the same result.

I can create a new database on the new machine and select new install and add devices and the graphs are all created and update as they should.

Are there any commands that I can run to try to help the export work?
eugenevdm
Posts: 8
Joined: Wed Aug 31, 2005 3:40 am

I just broke my graph tree for the first time

Post by eugenevdm »

I just broke my graph tree for the first time. What I did was open four child-node graphs in different tabs in Firefox of one parent-node . I deleted the parent and then deleted the four graphs. I believe that is what led to my lost / broken tree. I suspect it will always be better to delete the child first and then the parent. I kinda should have followed my instinct.
Post Reply

Who is online

Users browsing this forum: tembarek and 2 guests