Opened 16 years ago

Last modified 15 years ago

#2657 new defect

msSOSDispatch error thrown in CGI mode for a non-SOS request

Reported by: jmckenna Owned by: assefa
Priority: normal Milestone: 6.0 release
Component: SOS Server Version: svn-trunk (development)
Severity: normal Keywords:
Cc: tomkralidis, assefa, dmorissette, warmerdam

Description

I am testing 5.2.0-beta2 on Windows, and I get an odd error when using CGI mode:

error:

msSOSDispatch(): SOS server error. SOS support is not available.

CGI example request:

http://127.0.0.1/cgi-bin/mapserv.exe?map=/path/mytest.map&layers=all&zoomsize=2&zoomdir=1&map_size=600+400&map_web=imagepath+/ms4w/tmp/ms_tmp/+imageurl+/ms_tmp/

I get the same error with trunk (revision#7721). I don't get that error with the 5.0.2 release.

To replicate:

1) Use Windows buildkit: http://download.osgeo.org/buildkit/ 2) checkout beta2 from svn, then configure and build 3) use the "MapServer Itasca Demo Application" for testing from http://www.maptools.org/ms4w/index.phtml?page=downloads.html 4) with that application hit the "Initialize" button and see if a map is returned

I am hesitant to release an ms4w package with 5.2.0-beta2 until someone else tests this (since i could be doing something wrong).

Change History (21)

comment:1 by jmckenna, 16 years ago

I am curious if this is related to ticket#2379....or if I compiled it wrong somehow.

comment:2 by jmckenna, 16 years ago

mapserv -v output:

MapServer version 5.2.0-beta2 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTP UT=PDF OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPOR TS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WF S_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREA DS SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

comment:3 by tomkralidis, 16 years ago

That's wierd. When I try this:

http://devgeo.cciw.ca/cgi-bin/mapserv/mapserv?map=/home/tkralidi/foss4g/mapserver/trunk/msautotest/wxs/sos.map&layers=WaterQuality&zoomsize=2&zoomdir=1&map_size=600+400&map_web=imagepath+/usr/local/wwwsites/apache/devgeo.cciw.ca/apps/mapserv/tmp/+imageurl+/ms_tmp/

I don't get your error.

(sorry, I'm not on a Windows box at this point)

Assefa would have more to add here. Did you build libxml2 into your build?

comment:4 by assefa, 16 years ago

Jeff, I do not get the error with mapserver svn. The error seems to indicate missing USE_LIBXML2 flag. Is that possible?

comment:5 by jmckenna, 16 years ago

assefa: the SOS section of nmake.opt for beta2 and trunk are:

SOS=-DUSE_SOS_SVR LIBXML_DIR=$(MS_BASE)\..\libxml2-2.6.23.win32

I see no reference of a USE_LIBXML2 flag except in the unix configure file.

comment:6 by jmckenna, 16 years ago

ok i've read the irc logs in ticket#2416 so i'll try removing:

SOS=-DUSE_SOS_SVR

and replace with:

SOS=-DUSE_LIBXML2

comment:7 by jmckenna, 16 years ago

sorry, i'll try this:

SOS=-DUSE_SOS_SVR -DUSE_LIBXML2

comment:8 by jmckenna, 16 years ago

well that works.

Um since from reading ticket#2416 it seems this flag is used for a bunch of the OGC support, so I think this bug must remain open until a better place is found for this flag, in nmake.opt. suggestions?

comment:9 by assefa, 16 years ago

I added the flag (based on my nmake.opt). It worked for me for some time, so I am assuming it is all good :) r7722.

comment:10 by jmckenna, 16 years ago

that works great Assefa.

Question: if someone leaves the SOS section commented (in nmake.opt), wouldn't they hit this same (missing flag) wall for WCS support also? Tom where else is it required?

comment:11 by tomkralidis, 16 years ago

USE_LIBXML2 is required for:

  • SOS 1.0.0 (mapogcsos.c)
  • WCS 1.1.* (mapwcs11.c)
  • WFS 1.1.0 (mapwfs11.c
  • OWS Common 1.* (mapowscommon.c)

Note that mapowscommon.c is never used on it's own; it's always called from SOS/WCS/WFS.

comment:12 by jmckenna, 16 years ago

well i can tell u this USE_LIBXML2 flag is driving me crazy: I could have sworn it worked at one point...instead now I don't get that error any more, I get a broken map image for all of my CGI apps.

comment:13 by tomkralidis, 16 years ago

Cc: dmorissette warmerdam added

comment:14 by jmckenna, 16 years ago

re: the no-map-image in CGI mode - SteveL just fixed it in ticket#2655 this morning.

I'm not sure if you want to call this USE_LIBXML2 bug fixed (and hope that no one on windows build ogc support without sos)...or handle it more elegantly.

comment:15 by tomkralidis, 16 years ago

Any update on this one?

comment:16 by tomkralidis, 16 years ago

Update on this one? Is this still an issue?

comment:17 by jmckenna, 16 years ago

Yes this is still an issue. Since -DUSE_LIBXML2 is only defined in the SOS section on nmake.opt (http://trac.osgeo.org/mapserver/browser/trunk/mapserver/nmake.opt#L465), if someone tries to build OGC support without SOS there will be problems.

in reply to:  17 comment:18 by tomkralidis, 16 years ago

Replying to jmckenna:

Yes this is still an issue. Since -DUSE_LIBXML2 is only defined in the SOS section on nmake.opt (http://trac.osgeo.org/mapserver/browser/trunk/mapserver/nmake.opt#L465), if someone tries to build OGC support without SOS there will be problems.

WFS 1.1, WCS 1.1 and SOS all need -DUSE_LIBXML2, so if we update the WFS and WCS sections (along with SOS) in nmake.opt, this should fix the dependency issue.

Comments?

comment:19 by tomkralidis, 16 years ago

FYI you don't need SOS support for other OWS support. But new OWS support (WCS 1.1, WFS 1.1) need libxml2 support.

The following patch should fix this issue, can someone Windows-friendly give this a shot?

Index: nmake.opt
===================================================================
--- nmake.opt   (revision 7923)
+++ nmake.opt   (working copy)
@@ -499,14 +499,19 @@
 # WFS Server
 # ----------------------------------------------------------------------
 # Use -DUSE_WFS_SVR to compile with WFS server 
-# support, requires OGR and PROJ4
+# support, requires OGR and PROJ4, and libxml2
 #WFS=-DUSE_WFS_SVR
+#XML2_ENABLED=-DUSE_LIBXML2
+#LIBXML_DIR=$(MS_BASE)\..\libxml2-2.6.13.win32
 
 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 # WCS Server
 # ----------------------------------------------------------------------
 # Use -DUSE_WCS_SVR to compile with WCS server support, requires GDAL.
+# Also requires libxml2
 #WCS=-DUSE_WCS_SVR
+#XML2_ENABLED=-DUSE_LIBXML2
+#LIBXML_DIR=$(MS_BASE)\..\libxml2-2.6.13.win32
 
 
 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

comment:20 by assefa, 15 years ago

Milestone: 5.4 release
Owner: changed from mapserverbugs to assefa

I have added a libxml2 section and notes on the ogc sections that need libxml2. Committed in the 5.2.x r8026.

Leaving this open since I did not make the change in the main trunk. I believe that the nmake.opt file that should be in svn should have all/most the options enable by default instead of the opposite. People can disable those that they do not need. setting this to 5.4.

comment:21 by assefa, 15 years ago

Milestone: 5.6 release6.0 release

will revisit the make file for 6.0.

Note: See TracTickets for help on using tickets.