Missing tree in Tree Mode
Moderators: Developers, Moderators
Missing tree in Tree Mode
I think I've found one of the reasons why graph trees suddenly and mysteriously disappear in Tree Mode. I don't think it's a Cacti bug.
The problem
You're routinely using Cacti, and suddenly the left pane in dual pane mode doesn't show any tree, doesn't show anything at all.
I believe this is the same problem described here:
http://forums.cacti.net/viewtopic.php?t=8764
http://forums.cacti.net/viewtopic.php?t=19953
I was using Firefox 2 on Windows XP, but I imagine this could theoretically happen using any browser on any operating system (see below).
The solution
Clear your browser's cache.
This was already known.
The cause
Corrupt file cacti/include/treeview/ftiens4.js in your browser's cache.
Well, this is *one* possible reason; maybe there are more.
I believe this explains every behaviour described in the two posts above, including the inability to reproduce the error on other people's machines.
I verified this the following, repeatable way:
purged Firefox's cache;
reloaded the graphs page in tree mode (so that trees were displayed properly);
identified the file in my on-disk cache (see below);
purposefully crippled the cached file;
reloaded the graphs page in tree mode (at this point the trees were missing);
VIOLENTLY DISINTEGRATED the cached file only;
reloaded the graphs page in tree mode (at this point the trees were displayed properly).
BTW, the fact that the error lies *in the browsing computer*, and not on the Cacti computer, implies that another machine browsing the same Cacti installation should be unaffected. So if your trees vanished, try browsing from another computer.
Analysis (maybe the technique can benefit others)
Single-graph pages and single-device pages showed no trees, but were otherwise unaffected, so I knew total database fubar had not happened.
Basic damage control on the database showed no particolar issue.
Repair procedures suggested in the links above did not solve the problem.
Debug-level cacti log didn't show related errors.
So I was pretty sure it wasn't the database's fault.
The HTML source of the graphs page in tree mode did not seem to me as having any parts missing. Every device was mentioned in a Javascript function.
Firefox's error console (menu Tools/Error Console) showed some functions were unknown, so either they were missing from the source, or they were missing from the included .js files (they're included in the first lines in the HTML source) or the .js files themselves were missing.
I began trying to download those files and it failed at the second one: cacti/include/treeview/ftiens4.js
I assumed that, somehow, the file had been accidentally deleted from the Cacti machine's disk, but it wasn't so.
I verified permissions, owner, groups, users, and so on. All normal.
I resorted to the webserver's logs.
To my surprise, Apache's error log didn't show any error on ftiens4.js
The access log was more interesting: it showed a 304 response (see http://www.ietf.org/rfc/rfc2616.txt, section 10.3.5, "304 Not Modified").
The way I see it, thus, Firefox thought it had a valid cached copy of ftiens4.js, asked the webserver whether a newer version was available, the webserver answered "no", so Firefox felt authorized to use its cached copy.
The cached copy was not valid, though, so Firefox's Javascript interpreter didn't execute it and the web page's scripts couldn't use the functions ftiens4.js defined. No trees.
Unfortunately the *actual* reason why the cached copy was corrupt is still unknown. My instinct says the culprit is likely to be inside Firefox, or Windows XP, or Cacti, in this order. But if we were always to follow my instinct, we would be dead several times over by now.
Anyway, you can find Firefox's disk cache by opening a tab on "about:cache" and looking for "Cache Directory". Once there, since file names in the cache are obscure, look for a file with the same size as the .js file you downloaded before (see above). You can find the file size by asking Firefox for the page info (using Windows: right-click in the middle of the page and select View Page Info).
You can cripple the cached file using a text editor, a hex editor, or anything else you prefer. Just edit it at random, put some non-Javascript gibberish in the first line until it doesn't run any more.
You can delete the file as you would any other file on your computer.
Uhm, maybe a nice Firefox extension can prove handier.
CacheViewer, https://addons.mozilla.org/firefox/addon/2489
The problem
You're routinely using Cacti, and suddenly the left pane in dual pane mode doesn't show any tree, doesn't show anything at all.
I believe this is the same problem described here:
http://forums.cacti.net/viewtopic.php?t=8764
http://forums.cacti.net/viewtopic.php?t=19953
I was using Firefox 2 on Windows XP, but I imagine this could theoretically happen using any browser on any operating system (see below).
The solution
Clear your browser's cache.
This was already known.
The cause
Corrupt file cacti/include/treeview/ftiens4.js in your browser's cache.
Well, this is *one* possible reason; maybe there are more.
I believe this explains every behaviour described in the two posts above, including the inability to reproduce the error on other people's machines.
I verified this the following, repeatable way:
purged Firefox's cache;
reloaded the graphs page in tree mode (so that trees were displayed properly);
identified the file in my on-disk cache (see below);
purposefully crippled the cached file;
reloaded the graphs page in tree mode (at this point the trees were missing);
VIOLENTLY DISINTEGRATED the cached file only;
reloaded the graphs page in tree mode (at this point the trees were displayed properly).
BTW, the fact that the error lies *in the browsing computer*, and not on the Cacti computer, implies that another machine browsing the same Cacti installation should be unaffected. So if your trees vanished, try browsing from another computer.
Analysis (maybe the technique can benefit others)
Single-graph pages and single-device pages showed no trees, but were otherwise unaffected, so I knew total database fubar had not happened.
Basic damage control on the database showed no particolar issue.
Repair procedures suggested in the links above did not solve the problem.
Debug-level cacti log didn't show related errors.
So I was pretty sure it wasn't the database's fault.
The HTML source of the graphs page in tree mode did not seem to me as having any parts missing. Every device was mentioned in a Javascript function.
Firefox's error console (menu Tools/Error Console) showed some functions were unknown, so either they were missing from the source, or they were missing from the included .js files (they're included in the first lines in the HTML source) or the .js files themselves were missing.
I began trying to download those files and it failed at the second one: cacti/include/treeview/ftiens4.js
I assumed that, somehow, the file had been accidentally deleted from the Cacti machine's disk, but it wasn't so.
I verified permissions, owner, groups, users, and so on. All normal.
I resorted to the webserver's logs.
To my surprise, Apache's error log didn't show any error on ftiens4.js
The access log was more interesting: it showed a 304 response (see http://www.ietf.org/rfc/rfc2616.txt, section 10.3.5, "304 Not Modified").
The way I see it, thus, Firefox thought it had a valid cached copy of ftiens4.js, asked the webserver whether a newer version was available, the webserver answered "no", so Firefox felt authorized to use its cached copy.
The cached copy was not valid, though, so Firefox's Javascript interpreter didn't execute it and the web page's scripts couldn't use the functions ftiens4.js defined. No trees.
Unfortunately the *actual* reason why the cached copy was corrupt is still unknown. My instinct says the culprit is likely to be inside Firefox, or Windows XP, or Cacti, in this order. But if we were always to follow my instinct, we would be dead several times over by now.
Anyway, you can find Firefox's disk cache by opening a tab on "about:cache" and looking for "Cache Directory". Once there, since file names in the cache are obscure, look for a file with the same size as the .js file you downloaded before (see above). You can find the file size by asking Firefox for the page info (using Windows: right-click in the middle of the page and select View Page Info).
You can cripple the cached file using a text editor, a hex editor, or anything else you prefer. Just edit it at random, put some non-Javascript gibberish in the first line until it doesn't run any more.
You can delete the file as you would any other file on your computer.
Uhm, maybe a nice Firefox extension can prove handier.
CacheViewer, https://addons.mozilla.org/firefox/addon/2489
Missing Tree
I just ran into this problem...
I've tried clearing my cache but still cannot see a tree menu.
Any ideas?
I've tried clearing my cache but still cannot see a tree menu.
Any ideas?
Missing Tree
I just ran into this problem...
I've tried clearing my cache but still cannot see a tree menu.
Any ideas?
I've tried clearing my cache but still cannot see a tree menu.
Any ideas?
Missing Tree
No idea why my last post appeared twice...
Anyhoo.
I also tried installing Google Chrome and using that, same results.
Anyhoo.
I also tried installing Google Chrome and using that, same results.
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
PM you page source to me.
TheWitness
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?
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?
Page Source
Done...thanks!TheWitness wrote:PM you page source to me.
TheWitness
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
What version of cacti us this?
TW
TW
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?
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?
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
That's what I thought. Its a bit dated.
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?
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?
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
The following Leaves have imbedded carriage returns in them causing a JS issue:
Remove the embedded carriage returns and you should be back in business.
TheWitness
Code: Select all
LeafB-WAE-612
LeafA-WAE-612
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?
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?
TheWitness wrote:The following Leaves have imbedded carriage returns in them causing a JS issue:
Remove the embedded carriage returns and you should be back in business.Code: Select all
LeafB-WAE-612 LeafA-WAE-612
TheWitness
Quite odd...
Thanks a TON!
Re: Missing tree in Tree Mode
I'm running v1.2.3 and I randomly have the same symptoms as in this thread. Can you put the answer above in more detailed context? where are these located, how to find and correct them?
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: Missing tree in Tree Mode
Two things:
1) Don't post to such old topics.
2) Create a new topic.
and
3) Be specific, include screen shots, version info, etc.
1) Don't post to such old topics.
2) Create a new topic.
and
3) Be specific, include screen shots, version info, etc.
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?
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?
Re: Missing tree in Tree Mode
I got the problem today. I log out , log in again and fixed. After a bit again missed and i change the url link to http://<ip>/cacti/graph_view.php?action=tree and fixed.
Who is online
Users browsing this forum: No registered users and 1 guest