Bug 195 - [cwc2] More graceful handling of offline servers
: [cwc2] More graceful handling of offline servers
Status: CLOSED FIXED
: Chameleon
Core
: 1.0
: PC Windows 2000
: P1 major
: ---
Assigned To:
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2004-02-12 09:40 by
Modified: 2004-06-24 11:25 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2004-02-12 09:40:48
In CWC2 ver 1.0.6 if a server specified in the context file is down or otherwise
returns an error in response to a get map request the result is a broken image.
The other map layers do not load.

If you act fast you can see an example of this at: 
http://www.openioos.org/chameleon-1.0.6/cwc2.php?template=http://www.openioos.org/ioos/ioos_sst.html&context=http://www.openioos.org/ioos/ioos_sst.xml

Turn on the WAVCIS layer (second from top) and refresh the map. The WAVCIS
server is not responding for some reason and it causes a broken image with no
other layers drawn.

Is there a more graceful way to handle this kind of situation?
------- Comment #1 From 2004-02-12 09:49:14 -------
Here is what drawmap.php returns in this case:

<br />
<b>Warning</b>:  [MapServer Error]: msDrawMap(): Failed to draw layer named
'l21:5stations'.
 in <b>/raid/home/msapps/chameleon-1.0.6/htdocs/common/wrapper/drawmap.php</b>
on line <b>487</b><br />
<br />
<b>Warning</b>:  [MapServer Error]: msDrawRaster(): Unrecognized or unsupported
image format
 in <b>/raid/home/msapps/chameleon-1.0.6/htdocs/common/wrapper/drawmap.php</b>
on line <b>487</b><br />
<br />

<b>Warning</b>:  [MapServer Error]: drawEPP():
/tmp/ms_tmp/1076597279825510.img.tmp is not an EPPL file.
 in <b>/raid/home/msapps/chameleon-1.0.6/htdocs/common/wrapper/drawmap.php</b>
on line <b>487</b><br />
------- Comment #2 From 2004-02-12 10:30:12 -------
drawmap should be attempting to draw the layer and suppressing the warnings from
mapserver, and then putting errors into the error manager so you would then get
a popup (if you had the error manager enabled) with whatever mapserver reports
... I have seen this working so I am not entirely sure what has gone wrong here.

In looking at the code, I think the problem is that it is not suppressing the
error messages from mapserver, which results in text output before the image ...
and ultimately corrupts the image.  I have changed chameleon-1.0.6 on xcalibur
to supress the message.  I need dean to test his app there and see if it fixes
the problem .... Dean, if the server is back online then you can always fake an
error by changing the context to point to an invalid server.

If this fixes the error then I will commit the change to
php_utils/wrapper/drawmap.php and we can move it to
chameleon-1.0.6/htdocs/common/wrapper/drawmap.php on mapsherpa.
------- Comment #4 From 2004-04-05 15:05:56 -------
this will also affect 1.99, to be fixed.
------- Comment #5 From 2004-04-08 11:26:56 -------
fixed in latest drawmap.php (suppress draw errors using @), this applies to both
chameleon cvs and cwc2 1.0.6 since they use exactly the same version of php_utils.
------- Comment #6 From 2004-06-24 11:13:40 -------
cannot verify 1.0.6 bug with beta 1.99, is ioos still using cwc2 1.0.6 version?

Dean, can you plese verify and/or close this bug please.

Thanks
------- Comment #7 From 2004-06-24 11:24:08 -------
I can't reproduce it either and we're not using 1.0.6 anymore for the new app.
I'll close the bug.