[mapserver-users] Re: Question about MapServer

Jorge Arévalo jorge.arevalo at deimos-space.com
Tue Jun 14 14:12:21 EDT 2011


2011/6/14 Jorge Arévalo <jorge.arevalo at deimos-space.com>:
> Hello,
>
> I'm executing Mapserver 5.6.4 under Apache2 in a Ubuntu 10.04 machine.
> I'm having problems with a SLD file. Basically, when I execute a
> request like this:
>
>
> http://myserver/cgi-bin/mapserv?map=/var/mapserver/mapfiles/sld_cookbook_polygon.map&service=WMS&version=1.1.1&request=GetMap&layers=sld_cookbook_polygon&sld=http://myserver/sld/polygon_simplepolygon.sld
>
> I get this error:
>
>
> <?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
> <!DOCTYPE ServiceExceptionReport SYSTEM
> "http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd">
> <ServiceExceptionReport version="1.1.1">
> <ServiceException>
> msSLDApplySLDURL: WMS server error. Could not open SLD
> http://myserver/sld/polygon_simplepolygon.sld and save it in temporary
> file /var/mapserver/output/4df778fc_14b7_0.sld.xml. Please make sure
> that the sld url is valid and that imagepath and imageurl are set
> properly in the map file
> msHTTPExecuteRequests(): HTTP request error. HTTP: request failed with
> curl error code 7 (Failed connect to agropilot:80; Operation now in
> progress) for http://myserver/sld/polygon_simplepolygon.sld
> </ServiceException>
> </ServiceExceptionReport>
>
> The log file shows this:
>
> [Tue Jun 14 16:17:38 2011].364355 CGI Request 1 on process 4465
> [Tue Jun 14 16:17:38 2011].410841 msHTTPExecuteRequests(): HTTP
> request error. HTTP: request failed with curl error code 3 (<url>
> malformed) for /var/mapserver/sld/polygon_simplepolygon.sld
> [Tue Jun 14 16:17:38 2011].410930 msSLDApplySLDURL: WMS server error.
> Could not open SLD /var/mapserver/sld/polygon_simplepolygon.sld and
> save it in temporary file
> /var/mapserver/output/4df76d82_1171_0.sld.xml. Please make sure that
> the sld url is valid and that imagepath and imageurl are set properly
> in the map file
> [Tue Jun 14 16:17:38 2011].415803 mapserv request processing time
> (msLoadMap not incl.): 0.051s
> [Tue Jun 14 16:17:38 2011].415854 msFreeMap(): freeing map at 0x1168370.
> [Tue Jun 14 17:06:36 2011].91881 CGI Request 1 on process 5303
> [Tue Jun 14 17:06:39 2011].97592 msHTTPExecuteRequests(): HTTP request
> error. HTTP: request failed with curl error code 7 (Failed connect to
> agropilot:80; Operation now in progress) for
> http://myserver/sld/polygon_simplepolygon.sld
> [Tue Jun 14 17:06:39 2011].97700 msSLDApplySLDURL: WMS server error.
> Could not open SLD http://myserver/sld/polygon_simplepolygon.sld and
> save it in temporary file
> /var/mapserver/output/4df778fc_14b7_0.sld.xml. Please make sure that
> the sld url is valid and that imagepath and imageurl are set properly
> in the map file
> [Tue Jun 14 17:06:39 2011].97779 mapserv request processing time
> (msLoadMap not incl.): 3.006s
> [Tue Jun 14 17:06:39 2011].97799 msFreeMap(): freeing map at 0x18e4420.
>
>
> The IMAGEPATH and IMAGEURL vars have a valid value in mapfile:
>
> IMAGEPATH "/var/mapserver/output"
> IMAGEURL "http://myserver/output"
>
> The output directory exists and is writable by www-data (even when I
> change permission to 777, the same error); http://myserver/output is
> reachable. The curious thing is the file
> /var/mapserver/output/4df778fc_14b7_0.sld.xml is actually created, but
> it's empty.
>
> I had problems before because apparmor didn't allow writing in
> /var/www, but I changed the apache directory to /var/mapserver, and
> now apache can write on it. In fac, it's writting a log file. I don't
> understand this error. Any idea?
>
> Many thanks in advance, and best regards,
>
> --
> Jorge Arévalo
> Internet & Mobility Division, DEIMOS
> jorge.arevalo at deimos-space.com
> http://es.linkedin.com/in/jorgearevalo80
> http://mobility.grupodeimos.com/
> http://gis4free.wordpress.com
> http://geohash.org/ezjqgrgzz0g
>

I forgot to mention something:

HTTP: request failed with curl error code 7 (Failed connect to
agropilot:80; Operation now in progress) for
http://myserver/sld/polygon_simplepolygon.sld

It may be obvious, buy "myserver" is really "agropilot", an url from
my internal network. I replaced "agropilot" for "myserver" to simplfy
it (I forgot to replace it one time, sorry). The point is the url
http://agropilot/sld/polygon_simplepolygon.sld is reachable in my
network. I can see the file using a web browser, but curl fails. I
don't know why.

-- 
Jorge Arévalo
Internet & Mobility Division, DEIMOS
jorge.arevalo at deimos-space.com
http://es.linkedin.com/in/jorgearevalo80
http://mobility.grupodeimos.com/
http://gis4free.wordpress.com
http://geohash.org/ezjqgrgzz0g


More information about the mapserver-users mailing list