Hi Daniel,

Sorry, that was my fault. I have a different map_factory.py accepting 
configpath, but I understand this cannot be changed, so I just reverted it:

https://github.com/mapnik/OGCServer/commit/55a4c54e084c3343ba540a25ca1cf481a3424ae8

Your script should work fine now.

My map_factory.py script looks like:

class WMSFactory(BaseWMSFactory):
    def __init__(self):
        base_path, tail = os.path.split(__file__)
        configpath = os.path.join(base_path, 'ogcserver.conf')
        file_path = os.path.join(base_path, 'mapfile.xml')
        BaseWMSFactory.__init__(self, configpath)
        self.loadXML(file_path)
        self.finalize()

BaseWMSFactory now accepts the configpath (optional) to be able to read the new 
parameters added (wms_srs...), so you only need to pass configpath if using the 
new parameters.

Can you please try again?

Manel.

> -----Mensaje original-----
> De: [email protected]
> [mailto:[email protected]] En nombre de
> Daniel Behr
> Enviado el: martes, 14 de junio de 2011 11:53
> Para: [email protected]
> Asunto: Re: [Mapnik-users] unable to deploy latest OGCServer
> running wsgi (was: howto config GeoWebCache in front of
> mapnik/ogcserver?)
>
> Hi again,
>
> just tried to deploy the latest OGCServer. took it from github and
> adjusted the ogcserver.conf and map_factory.py files, but now I am
> getting the following error in the apache log:
>
> [info] mod_wsgi (pid=13502, process='kofserver3', application=''):
> Loading WSGI script '/srv/www/wsgi/wms_osm.wsgi'.
> [error] mod_wsgi (pid=13502): Target WSGI script
> '/srv/www/wsgi/wms_osm.wsgi' cannot be loaded as Python module.
> [error] mod_wsgi (pid=13502): Exception occurred processing
> WSGI script
> '/srv/www/wsgi/wms_osm.wsgi'.
> [error] Traceback (most recent call last):
> [error]  File "/srv/www/wsgi/wms_osm.wsgi", line 6, in <module>
> [error]   application = WSGIApp('/opt/OGCServer/conf/ogcserver.conf')
> [error]  File
> "build/bdist.linux-x86_64/egg/ogcserver/wsgi.py", line 54,
> in __init__
> [error]   self.mapfactory = getattr(mapfactorymodule,
> 'WMSFactory')(configpath)
> [error] TypeError: __init__() takes exactly 1 argument (2 given)
>
> ogcserver setup shows no error and I can import it to python,
> but have
> there been any changes to wsgi support?
> unfortunately I cant make out what exactly causes this error
> and I'll go
> back to the old version of OGCServer (from ~March 2011).
>
> BTW, just in case someone has an idea... I use these settings:
>
> ****
> map_factory.py:
> ****
> #!/usr/bin python
>
> from ogcserver.WMS import BaseWMSFactory
>
> class WMSFactory(BaseWMSFactory):
>    def __init__(self):
>      BaseWMSFactory.__init__(self)
>      self.loadXML('/opt/mapnik/osm_map.xml')
>      self.finalize()
>
> ****
> wsgi server script:
> ****
> #!/usr/bin python
>
> import sys
> from ogcserver.wsgi import WSGIApp
> sys.path.append('/opt/OGCServer/conf/')
> application = WSGIApp('/opt/OGCServer/conf/ogcserver.conf')
>
> ****
> Apache config:
> ****
>      WSGIDaemonProcess server3 processes=10 threads=1
> display-name=%{GLOBAL}
>      WSGIApplicationGroup %{GLOBAL}
>      WSGIProcessGroup server3
>      WSGIScriptAlias /osm /srv/www/wsgi/wms_osm.wsgi
>
>      LogLevel debug
>
>      <Directory /srv/www/wsgi>
>      Order allow,deny
>      Allow from all
>      </Directory>
>
> ---
>
> many thanks
> Daniel
>
>
>
>
> Am 14.06.2011 08:38, schrieb Daniel Behr:
> > Thanks Manel & Jukka,
> >
> > Had no time to try the latest OGCServer version and I am a
> bit reluctant
> > to change my running system again...
> >
> > The GWC that comes with GeoServer has a different structure. I am
> > actually not sure about the following <bean> from
> > WEB-INF/geowebcache-core-context.xml:
> >
> > <bean id="gwcWMSConfig"
> > class="org.geowebcache.config.GetCapabilitiesConfiguration">
> > <constructor-arg ref="gwcGridSetBroker"/>
> > <constructor-arg
> >
> value="http://localhost/osm?SERVICE=WMS&amp;VERSION=1.1.1&amp;
> REQUEST=GetCapabilities"/>
> >
> > <constructor-arg value="image/png,image/png8,image/jpeg"/>
> > <constructor-arg value="3x3"/>
> > <constructor-arg value=""/>
> > <constructor-arg value="false"/>
> > </bean>
> >
> > Any vendor specific parameters should go into the 5. empty
> > constructor-arg and it seems to me that something is needed
> there to let
> > mapniks GetCap show up. I already tried many combinations
> without success.
> >
> > Anyway, the changes made to OGCServer look like they may solve this.
> > I'll report back.
> >
> > thanks
> > Daniel
> >
> >
> > Am 10.06.2011 13:03, schrieb Rahkonen Jukka:
> >> Hi,
> >>
> >> I am running GeoWebCache which comes with GeoServer and the config
> >> file "geowebcache.xml" has this kind of entry
> >> <wmsLayer>
> >> <name>GWC_service</name> <!-- this is what is published to
> the outside
> >> world -->
> >>
> <wmsUrl><string>http://server.fi/cgi-bin/mapserv.exe</string></wmsUrl>
> >> <!-- the url of your wms map -->
> >> <wmsLayers>WMS_layer1</wmsLayers> <!-- layer names as known by your
> >> wms -->
> >>
> >> I am not sure if GWC is reading the GetCapabilities ever, it just
> >> starts to send GetMaps when seeding the cache. However,
> the standalone
> >> service may behave differently.
> >>
> >> -Jukka Rahkonen-
> >>
> >>
> >>
> >> manel.clos wrote:
> >>
> >>>
> >>> Hi Daniel,
> >>>
> >>> You may try a newer OGCServer version[1]. Perhaps GWC doesn't
> >>> like the GetCapabilities OGCServer is sending, and the newer
> >>> version has a lot of improvements in this area.
> >>>
> >>> Also, if it does not work with the new version, please open a
> >>> bug on github and post any debug info from GWC.
> >>>
> >>> Manel.
> >>>
> >>> [1] https://github.com/mapnik/OGCServer/
> >>>
> >>>
> >>>> -----Mensaje original-----
> >>>> De: [email protected]
> >>>> [mailto:[email protected]] En nombre de
> >>>> Daniel Behr
> >>>> Enviado el: miércoles, 08 de junio de 2011 15:24
> >>>> Para: [email protected]
> >>>> Asunto: [Mapnik-users] howto config GeoWebCache in front of
> >>>> mapnik/ogcserver?
> >>>>
> >>>> Hi!
> >>>> is there someone out there using GWC with Mapnik?
> >>>>
> >>>> I saw some older posts, but none including details on GWC
> >>>> configuration.
> >>>>
> >>>> My question is:
> >>>> whats the trick when adding the GetCapabilities to the
> >>>> 'gwcWMSConfig'-bean in GWCs geowebcache-core-context.xml?
> >>>>
> >>>> I supposed this would work, but it didnt:
> >>>>
> >>>> <constructor-arg
> >>>> value="http://localhost/osm?service=WMS&amp;version=1.1.1&amp;
> >>>> request=GetCapabilities"/>
> >>>>
> >>>> (without the line break of course)
> >>>>
> >>>> I have mapnik 0.7.1, GWC 1.2.6 standalone (not the GS
> plugin) and a
> >>>> valid GetCap from OGCServer, but none of the settings I tried
> >>>> gave me a
> >>>> demo-layer after reloading the tomcat app.
> >>>>
> >>>> I also tried setting the empty arg to
> >>>> <constructor-arg value="module=map_factory"/>
> >>>> and the likes, but nothing.
> >>>>
> >>>> I keep on digging, but maybe someone just knows whats missing.
> >>>> thanks in advance...
> >>>>
> >>>> --
> >>>> Daniel Behr
> >>>> -------------------------------------------
> >>>> Institut für Küstenforschung
> >>>> Helmholtz-Zentrum Geesthacht GmbH
> >>>> D-21502 Geesthacht
> >>>> +49 (0)4152 87 1589 (fax -1596)
> >>>> [email protected]
> >>>>
> >>>> -------------------------------------------
> >>>> Helmholtz-Zentrum Geesthacht
> >>>> Zentrum für Material- und Küstenforschung GmbH
> >>>> Max-Planck-Straße 1
> >>>> 21502 Geesthacht
> >>>> Deutschland/Germany
> >>>>
> >>>> Geschäftsführer/Board of Management:
> >>>> Prof. Dr. Wolfgang A. Kaysser, Dipl.-Ing. Michael Ganß
> >>>> Vorsitzender des Aufsichtsrates/Chairman of the
> Supervisory Board:
> >>>> Ministerialrat Wilfried Kraus
> >>>>
> >>>> Amtsgericht Lübeck- HRB 285 GE (Register Court)
> >>>> Internet: http://hzg.de
> >>>> _______________________________________________
> >>>> Mapnik-users mailing list
> >>>> [email protected]
> >>>> https://lists.berlios.de/mailman/listinfo/mapnik-users
> >>>>
> >>> _______________________________________________
> >>> Mapnik-users mailing list
> >>> [email protected]
> >>> https://lists.berlios.de/mailman/listinfo/mapnik-users
> > _______________________________________________
> > Mapnik-users mailing list
> > [email protected]
> > https://lists.berlios.de/mailman/listinfo/mapnik-users
> _______________________________________________
> Mapnik-users mailing list
> [email protected]
> https://lists.berlios.de/mailman/listinfo/mapnik-users
>
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to