Weathermap upgrade to 095b - no maps visible anymore

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

kos
Posts: 25
Joined: Wed Nov 01, 2006 2:29 am
Location: Singapore

Weathermap upgrade to 095b - no maps visible anymore

Post by kos »

Hi all,

I updated weathermap 092 to 095b and don't see the maps (html) anymore. In 0.92 it was working perfectly.

- debug shows no problem and graphs are created (png and html).
- png are visible - with click on one of the thumbs an empy page is shown - BUT - I can see the overlibs in case I hover over the mouse.

After downgrade to 0.92 graphs are visible again.

Any idea, what the reason could be? do I have to upgrade the plugin architecture?

Thanks in advance




Cacti Version 0.8.6i
Plugin Architecture 1.0
Poller Type Cactid v0.8.6f
Server Info Windows NT 5.2
Web Server Microsoft-IIS/6.0
PHP Version 5.1.4
PHP Extensions bcmath, calendar, com_dotnet, ctype, date, ftp, hash, iconv, odbc, pcre, Reflection, session, libxml, standard, tokenizer, zlib, SimpleXML, dom, SPL, wddx, xml, xmlreader, xmlwriter, ISAPI, gd, mysql, snmp, sockets
MySQL Version 5.0.24-community-nt
RRDTool Version 1.2.15
SNMP Version 5.3.0.1
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Weathermap upgrade to 095b - no maps visible anymore

Post by Howie »

kos wrote:Hi all,

I updated weathermap 092 to 095b and don't see the maps (html) anymore. In 0.92 it was working perfectly.

- debug shows no problem and graphs are created (png and html).
- png are visible - with click on one of the thumbs an empy page is shown - BUT - I can see the overlibs in case I hover over the mouse.

After downgrade to 0.92 graphs are visible again.

Any idea, what the reason could be? do I have to upgrade the plugin architecture?
Between 0.92 and 0.95 the file naming scheme changed. You should see new files being created, not the existing ones being updated. Check that the cacti user can create new files in the output/ directory. Check that the new file name format files are turning up - they're much longer (less guessable) named files.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
kos
Posts: 25
Joined: Wed Nov 01, 2006 2:29 am
Location: Singapore

Post by kos »

Thanks Howie,

I can see the new graphs beeing created and updated in the output folder after each poll cycle (with the longer names).

In weathermap thumbnail view, the xxx.png are visible but it seems to be an issue opening the xxxx.html file per click on weathermap thumbnails

Same applies to your simple.conf created graphs so it should not be related to the .conf files itself.

In the attachment it shows what I mentioned before: graph is created and hover the mouse over it, presents the overlibs even if the main .thml page is not visible
Attachments
weathermap095b-01.JPG
weathermap095b-01.JPG (88.58 KiB) Viewed 7675 times
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Hmm, OK... would you mind removing one of your map configs (in the management screen) and re-adding it? If that fixes it for that map, then if you could PM me a dump of your weathermap_maps table, I'll try and figure out what was missed.

I've upgraded each version in turn on my own system, and I don't get this issue though - maybe it's to do with bigger jumps.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
kos
Posts: 25
Joined: Wed Nov 01, 2006 2:29 am
Location: Singapore

No maps

Post by kos »

Hi Howie,

sent a PM to you
User avatar
tobus
Posts: 18
Joined: Mon Jan 30, 2006 11:47 am
Location: Zurich, Switzerland
Contact:

Resolved?

Post by tobus »

G'day!

Is there already a solution for this particular problem?
My installation has got the same problem.
Images are created with every poller cycle, but they're not shown (thumbs & maps).
I'm currently running v0.941...
Same issue on upgrading from 0.941 to 0.95a or 0.95b...

Removing maps and re-adding did not help either...

Any hints?

Thanks!
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Which files are being updated? (can you give filenames of the last 5 files updated in your output/ directory? - ls -ltr)

I want to be sure that your install is updating all 3 files per map, and that the filenames are as expected.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
User avatar
tobus
Posts: 18
Joined: Mon Jan 30, 2006 11:47 am
Location: Zurich, Switzerland
Contact:

Post by tobus »

Hello,

Thanks for the quick response! :-)

My output directory looks as follows....

[root@toedi output]# ll
total 860
-rw-r--r-- 1 apache apache 13502 Sep 3 13:07 03ff50add5afb60cfb4d.html
-rw-r--r-- 1 apache apache 18156 Sep 3 13:07 03ff50add5afb60cfb4d.png
-rw-r--r-- 1 apache apache 5741 Sep 3 13:07 03ff50add5afb60cfb4d.thumb.png
-rw-r--r-- 1 apache apache 29507 Sep 3 13:07 14139af1c44120822bdb.html
-rw-r--r-- 1 apache apache 26445 Sep 3 13:07 14139af1c44120822bdb.png
-rw-r--r-- 1 apache apache 12591 Sep 3 13:07 14139af1c44120822bdb.thumb.png
-rw-r--r-- 1 apache apache 49118 Sep 3 13:07 21c3be7e7c03b92ca74b.html
-rw-r--r-- 1 apache apache 30507 Sep 3 13:07 21c3be7e7c03b92ca74b.png
-rw-r--r-- 1 apache apache 12340 Sep 3 13:07 21c3be7e7c03b92ca74b.thumb.png
-rw-r--r-- 1 apache apache 39652 Sep 3 13:07 369204db13080f4b0415.html
-rw-r--r-- 1 apache apache 30945 Sep 3 13:07 369204db13080f4b0415.png
-rw-r--r-- 1 apache apache 14160 Sep 3 13:07 369204db13080f4b0415.thumb.png
-rw-r--r-- 1 apache apache 11508 Sep 3 13:07 7dbf776c9c593f2068e1.html
-rw-r--r-- 1 apache apache 10021 Sep 3 13:07 7dbf776c9c593f2068e1.png
-rw-r--r-- 1 apache apache 4163 Sep 3 13:07 7dbf776c9c593f2068e1.thumb.png
-rw-r--r-- 1 apache apache 39966 Sep 3 13:07 a4b2226bc51148429ebe.html
-rw-r--r-- 1 apache apache 26524 Sep 3 13:07 a4b2226bc51148429ebe.png
-rw-r--r-- 1 apache apache 10182 Sep 3 13:07 a4b2226bc51148429ebe.thumb.png
-rw-r--r-- 1 apache apache 45287 Sep 3 13:07 bb9f5f857cad0c5480bf.html
-rw-r--r-- 1 apache apache 15649 Sep 3 13:07 bb9f5f857cad0c5480bf.png
-rw-r--r-- 1 apache apache 11927 Sep 3 13:07 bb9f5f857cad0c5480bf.thumb.png
-rw-r--r-- 1 apache apache 49118 Sep 3 11:29 bcdf2ff877e7124c126b.html
-rw-r--r-- 1 apache apache 30253 Sep 3 11:29 bcdf2ff877e7124c126b.png
-rw-r--r-- 1 apache apache 12279 Sep 3 11:29 bcdf2ff877e7124c126b.thumb.png
-rw-r--r-- 1 apache apache 23007 Sep 3 13:07 c3578e7bc25af485be14.html
-rw-r--r-- 1 apache apache 22707 Sep 3 13:07 c3578e7bc25af485be14.png
-rw-r--r-- 1 apache apache 8417 Sep 3 13:07 c3578e7bc25af485be14.thumb.png
-rw-r--r-- 1 apache apache 22999 Sep 3 13:07 c60588be7a60e1ec570d.html
-rw-r--r-- 1 apache apache 22506 Sep 3 13:07 c60588be7a60e1ec570d.png
-rw-r--r-- 1 apache apache 8565 Sep 3 13:07 c60588be7a60e1ec570d.thumb.png
-rw-r--r-- 1 apache apache 21783 Sep 3 13:07 ce74305ab0d31f337cab.html
-rw-r--r-- 1 apache apache 35167 Sep 3 13:07 ce74305ab0d31f337cab.png
-rw-r--r-- 1 apache apache 8333 Sep 3 13:07 ce74305ab0d31f337cab.thumb.png
-rw-r--r-- 1 apache apache 19661 Sep 3 13:07 d1ca99256f3229d4834a.html
-rw-r--r-- 1 apache apache 42458 Sep 3 13:07 d1ca99256f3229d4834a.png
-rw-r--r-- 1 apache apache 15158 Sep 3 13:07 d1ca99256f3229d4834a.thumb.png
-rw-r--r-- 1 apache apache 62 Feb 10 2008 index.php


By calling the URL directly I get the following message:
http://toedi.swi.srse.net/cacti/plugins ... 1220440073

--> The image "http://toedi.swi.srse.net/cacti/plugins ... 1220440073" cannot be displayed, because it contains errors.

Maybe some paths changed in between v. 0.941 and above?

Cheers!
tobias
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Yes, between 0.941 and 0.95 I changed the filenames. Those long filenames are the new style. The idea was that the old filenames made it easy for your customers to see each others maps by guessing IDs.

It also uses PHP to read the image and give it to the browser, rather than a direct URL to the image. This means you can't access the image without logging into Cacti first (which you can in 0.941 and earlier).

It seems that that PHP is failing for you. One thing I did notice just now is a typo in weathermap-cacti-plugin.php on line 99 (in 0.95b) - it should say chdir instead of dir. It's possible this would mess up the file reading, but it's after the file is read, so that seems unlikely (and it works for me).

Do you use Windows/IIS too?
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
User avatar
tobus
Posts: 18
Joined: Mon Jan 30, 2006 11:47 am
Location: Zurich, Switzerland
Contact:

Post by tobus »

I'm running it on Red Hat Enterprise Linux 5 with Apache and GD support in php.
Your check.php states, that all is ok when called from the webbrowser.
Calling it trough the cli gives me a notice about the missing PEAR module. But this can be ignored, as I use it with Cacti. Right?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

tobus wrote:I'm running it on Red Hat Enterprise Linux 5 with Apache and GD support in php.
Your check.php states, that all is ok when called from the webbrowser.
Calling it trough the cli gives me a notice about the missing PEAR module. But this can be ignored, as I use it with Cacti. Right?
Yep - that's just for the CLI weathermap.

Did the small change I mentioned make any difference to you?

Failing that, I'll fire up a CentOS 5 VM and see if I can reproduce this. It's not a general problem...
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
User avatar
tobus
Posts: 18
Joined: Mon Jan 30, 2006 11:47 am
Location: Zurich, Switzerland
Contact:

Post by tobus »

nope..
The change from dir to chdir did not solve it...

When I check the .png file that has been created, everything looks fine..
Custom fonts are being used and all the images have been found.

I'm now going trough the code and add some cacti_log calls for debugging..
Maybe the file gets corrupt in the 'readfile_chunked' function call?..
I'll run some tests...
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

My first (second? :-) ) guess would to add something to log what filename it is trying to read, and whether that is successful. I doubt it's anything much more complex than that, otherwise the files wouldn't be created - the id in the database must be correct/consistent, and the permissions are obviously OK for writing.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
User avatar
tobus
Posts: 18
Joined: Mon Jan 30, 2006 11:47 am
Location: Zurich, Switzerland
Contact:

Post by tobus »

Was trying with 0.95a, 0.95b and 0.96test1, but still no luck..
Gives me the same problem on all of them.
I'll restore my old 0.941 for now and dig some more tomorrow... :-)
I'm sure it must be something silly, as the whole map building process works like a charm... Just displaying them is not working...

I'll keep you posted...

Cheers!
User avatar
tobus
Posts: 18
Joined: Mon Jan 30, 2006 11:47 am
Location: Zurich, Switzerland
Contact:

Almost solved... :-)

Post by tobus »

G'day Howie,

Today I was changing the header content-type to 'text/plain' in your 'viewimage' function.
This allowed me to store the the output as a local .png file for comparison with the one created by the poller.
Result was, that the original .png file in the 'output' folder has been created perfectly nice and it can also be viewed by calling it directly.
But the re-processed (trough function 'readfile_chunked') has got 2 empty bytes in the beginning of the .png file.
This of course renders the image unusable, as there should not be anything before the png header...
I'm now going trough the code to see where it is coming from....

Just as an update on this case... :-)

Cheers!
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests