[mapserver-users] Mapserver 6.2.1 fails to read remote WMS in png format

Rahkonen Jukka jukka.rahkonen at mmmtike.fi
Thu Apr 25 05:05:32 PDT 2013


Hi,

I was testing Mapserver 6.2.1 from the MS4W 3.0.1beta-1 installation and thought that there was something wrong with the connection.  However, the problem seems to be in Mapserver side.  I have been using &FORMAT=image/png for reading the remote WMS with Mapserver 6.0.1 but with MS 6.2.1 it does not work.  After changing  image format into image/jpeg Mapserver can again cascade the remote WMS.

Part of the errorlog is in the attachment but the most relevant parts are here

This request with FORMAT=image/jpeg works

[Thu Apr 25 14:30:24 2013].970000 HTTP request: id=1, https://...&FORMAT=image/jpeg&STYLES=&HEIGHT=353&VERSION=1.1.1&SRS=EPSG:3067&WIDTH=459&BBOX=406810.908602495,7216210.70370872,407078.361045337,7216416.39153513&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_inimage
....................
 [Thu Apr 25 14:30:27 2013].354000 msDrawRasterLayerGDAL(): red,green,blue,alpha bands = 1,2,3,0
[Thu Apr 25 14:30:27 2013].372000 msDrawMap(): Layer 1 (test), 0.022s
[Thu Apr 25 14:30:27 2013].372000 msDrawMap(): Drawing Label Cache, 0.000s
[Thu Apr 25 14:30:27 2013].372000 msDrawMap() total time: 2.408s
[Thu Apr 25 14:30:27 2013].590000 msSaveImage(stdout) total time: 0.218s
[Thu Apr 25 14:30:27 2013].592000 mapserv request processing time (msLoadMap not incl.): 2.629s

This request with FORMAT=image/png does not work

[Thu Apr 25 14:31:13 2013].915000 HTTP request: id=1, https://...&FORMAT=image/png&STYLES=&HEIGHT=353&VERSION=1.1.1&SRS=EPSG:3067&WIDTH=459&BBOX=406508.434778249,7215858.43375314,407593.615379665,7216693.00619824&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_inimage
.........................
[Thu Apr 25 14:31:18 2013].349000 msDrawRasterLayerGDAL(): red,green,blue,alpha bands = 1,0,0,0
[Thu Apr 25 14:31:18 2013].349000 drawGDAL(): Unable to access file. GDALDatasetRasterIO() failed: GetBlockRef failed at X block offset 0, Y block offset 0
[Thu Apr 25 14:31:18 2013].349000 msDrawMap(): WMS connection error. Failed to draw WMS layer named 'test'. This most likely happened because the remote WMS server returned an invalid image, and XML exception or another unexpected result in response to the GetMap request. Also check and make sure that the layer's connection URL is valid.
[Thu Apr 25 14:31:18 2013].349000 mapserv request processing time (msLoadMap not incl.): 4.441s


It looks like GDAL cannot find correct bands from the png output of the remote WMS: " msDrawRasterLayerGDAL(): red,green,blue,alpha bands = 1,0,0,0". However, Mapserver 6.0.1 with GDAL 1.8 can cascade this service fine and all my WMS clients work well with the remote WMS by using image/png format.  I made also another test by trying to cascade our own Mapserver 6.0.1 and the result was the same:  if I read data as image/png remote WMS I get the  "GDALDatasetRasterIO() failed" error.

I am not sure if this is Mapserver, GDAL or MS4W bug. Any opinions?

-Jukka Rahkonen-








-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: MS_621_cascade_WMS_with_png_error.txt
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20130425/77d4a425/attachment.txt>


More information about the mapserver-users mailing list