Weathermap upgrade to 095b - no maps visible anymore

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

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

Post by Howie »

OK, that could be something weird like ASCII-conversion moving from windows->unix or unix->windows adding in some extra line-endings somewhere. Maybe.

Or possibly some leading or trailing spaces in Weathermap.class.php?

It would be worth checking if the editor html page has two blanks at the top, too, which would point to Weathermap.class.php, as that's included very early in both those situations.
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!)
just-me
Posts: 3
Joined: Sat Nov 15, 2008 10:53 am

Post by just-me »

I think I have same problem!

cacti-0.8.7b.2_2 from FreeBSD ports
Weather map plugin 0.95b

I tried install weather map over existing installation. There was no previous version of weather map before (so no previous files etc)

I do not see images if I click on weather map tab. I see red X if I enter in browser path (I ommit server name in example) to
/cacti/plugins/weathermap/weathermap-cacti-plugin.php?action=viewimage&id=ef87df206741ed91254b&time=1226760447

but if I enter path /cacti/plugins/weathermap/output/ef87df206741ed91254b.png I can see the picture.
I entered some debugging into weathermap-cacti-plugin.php and check which file It tried to open and read. The path is correct, exist and readable by web user (also it same file as in second link).

if I do a tcpdump of traffic I got from web server I see a small differences (first example from php script, second called file directly):

Code: Select all

        0x0210:  6e6e 6563 7469 6f6e 3a20 4b65 6570 2d41  nnection:.Keep-A
        0x0220:  6c69 7665 0d0a 5472 616e 7366 6572 2d45  live..Transfer-E
        0x0230:  6e63 6f64 696e 673a 2063 6875 6e6b 6564  ncoding:.chunked
        0x0240:  0d0a 436f 6e74 656e 742d 5479 7065 3a20  ..Content-Type:.
        0x0250:  696d 6167 652f 706e 670d 0a0d 0a36 3634  image/png....664
        0x0260:  6439 0d0a 0a89 504e 470d 0a1a 0a00 0000  d9....PNG.......
        0x0270:  0d49 4844 5200 0003 b600 0002 7108 0200  .IHDR.......q...

Code: Select all

        0x01a0:  6976 653a 2074 696d 656f 7574 3d31 352c  ive:.timeout=15,
        0x01b0:  206d 6178 3d31 3030 0d0a 436f 6e6e 6563  .max=100..Connec
        0x01c0:  7469 6f6e 3a20 4b65 6570 2d41 6c69 7665  tion:.Keep-Alive
        0x01d0:  0d0a 436f 6e74 656e 742d 5479 7065 3a20  ..Content-Type:.
        0x01e0:  696d 6167 652f 706e 670d 0a0d 0a89 504e  image/png.....PN
        0x01f0:  470d 0a1a 0a00 0000 0d49 4844 5200 0003  G........IHDR...
        0x0200:  b600 0002 7108 0200 0000 f902 b977 0000  ....q........w..
        0x0210:  2000 4944 4154 789c ecbd 5dac 6dc7 552e  ..IDATx...].m.U.
I see extra extra bytes before actual PNG header sent
36 3634 6439 0d0a 0a
No ideas where the are come from do not see any problem at read file code....
just-me
Posts: 3
Joined: Sat Nov 15, 2008 10:53 am

Post by just-me »

I just add

Code: Select all

                        ob_end_clean ();
after

Code: Select all

                        header('Content-type: image/png');
in the cacti/plugins/weathermap/weathermap-cacti-plugin.php



and now it works fine!
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

That's weird... I don't even use output buffering! I'll try the same on my test servers, and see if there are any ill effects.
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!)
just-me
Posts: 3
Joined: Sat Nov 15, 2008 10:53 am

Post by just-me »

and same for cacti/plugins/weathermap/editor.php

I get it from cacti/graph_image.php
Criggie
Posts: 16
Joined: Sat Jul 21, 2007 4:30 am
Location: Christchurch, New Zealand
Contact:

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

Post by Criggie »

Dragging up an old problem I know, but this fix worked for me on a centos 5.6 64 bit box

running 2.6.18-194.32.1.el5.centos.plus kernel,
cacti 0.8.7-g
weathermap 0.97a

The strangest thing is I have this same everything on two other boxes, and all works pefectly.

I'm wondering if there's any downside to flushing the output buffers, just in case php is doing it automatically and not getting flushed.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest