[MapProxy] Mapproxy FastCGI problem

Christian Willmes c.willmes at uni-koeln.de
Thu Nov 8 06:16:08 PST 2012


Hi,

I have a problem with my MapProxy setup after an upgrade from 1.1.1 to
1.4.0. (I know, a long overdue update, but...)

I updated MapProxy using 'pip install --upgrade --no-deps MapProxy'.

The (updated) Server is working fine if I start it with 'paster serve
etc/config.ini':
<<<<
$ paster serve etc/config.ini
2012-11-08 14:53:12,634 - INFO -
14204:mapproxy.config:load_configuration_file - reading:
/var/local/mapproxy/etc/mapproxy.yaml
2012-11-08 14:53:12,890 - INFO - 14204:mapproxy.system:<module> - using
libproj for coordinate transformation
Starting server in PID 14204.
>>>>

But using the existing fcgi/apache config it is not working (see
MapproxyApacheError Log in Attachment). The same configuration (see
mapproxy.fcgi in attachment) was working before the upgrade.

>From the error logs, there seems to be an error regarding the
'application = loadapp(...'. Is there another recommendet way how to
load the app? In the documentation[1] this is not documented (as far as
I can see). It referes directly to the 'application', but does not state
how to load the applacation.

Thanks for any help and hints!

Best regards,
Christian

[1] http://mapproxy.org/docs/nightly/deployment.html#fastcgi-server

PS: The system is a CentOS 5 (I have to use it and I am not allowed to
upgrade it), so sorry for the old python 2.6 version, is this maybe the
cause of the problem?

-- 
Christian Willmes
AG GIS & Fernerkundung      | GIS & RS Group
Geographisches Institut     | Institute of Geography
Universität zu Köln         | University of Cologne
Tel.: +49 (0)221 470 6234
Fax.: +49 (0)221 470 2280
http://www.geographie.uni-koeln.de/gis
http://www.sfb806.de
-------------- next part --------------
[Thu Nov 08 14:15:08 2012] [warn] (104)Die Verbindung wurde vom Kommunikationspartner zurückgesetzt: mod_fcgid: read data from fastcgi server error.
[Thu Nov 08 14:15:08 2012] [error] [client 134.95.150.24] Premature end of script headers: mapproxy.fcgi
[Thu Nov 08 14:15:08 2012] [notice] mod_fcgid: process /var/local/mapproxy/etc/mapproxy.fcgi(10149) exit(communication error), terminated by calling exit(), return code: 1
[Thu Nov 08 14:15:08 2012] [notice] mod_fcgid: process /var/local/mapproxy/etc/mapproxy.fcgi(10148) exit(communication error), terminated by calling exit(), return code: 1
[Thu Nov 08 14:15:08 2012] [notice] mod_fcgid: process /var/local/mapproxy/etc/mapproxy.fcgi(10147) exit(communication error), terminated by calling exit(), return code: 1
Traceback (most recent call last):
  File "/var/local/mapproxy/etc/mapproxy.fcgi", line 6, in <module>
    application = loadapp('config:config.ini', relative_to=os.path.dirname(__file__))
  File "/var/local/mapproxy/venv/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 203, in loadapp
    return loadobj(APP, uri, name=name, **kw)
  File "/var/local/mapproxy/venv/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 223, in loadobj
    global_conf=global_conf)
  File "/var/local/mapproxy/venv/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 247, in loadcontext
    global_conf=global_conf)
  File "/var/local/mapproxy/venv/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 270, in _loadconfig
    return loader.get_context(object_type, name, global_conf)
  File "/var/local/mapproxy/venv/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 401, in get_context
    section)
  File "/var/local/mapproxy/venv/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 423, in _context_from_use
    object_type, name=use, global_conf=global_conf)
  File "/var/local/mapproxy/venv/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 353, in get_context
    global_conf=global_conf)
  File "/var/local/mapproxy/venv/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 247, in loadcontext
    global_conf=global_conf)
  File "/var/local/mapproxy/venv/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 277, in _loadegg
    return loader.get_context(object_type, name, global_conf)
  File "/var/local/mapproxy/venv/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 553, in get_context
    object_type, name=name)
  File "/var/local/mapproxy/venv/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", line 592, in find_egg_entry_point
    for prot in protocol_options] or '(no entry points)'))))
LookupError: Entry point 'app' not found in egg 'MapProxy' (dir: /var/local/mapproxy/venv/lib/python2.6/site-packages; protocols: paste.app_factory, paste.composite_factory, paste.composit_factory; entry_points: )
[Thu Nov 08 14:15:09 2012] [warn] (104)Die Verbindung wurde vom Kommunikationspartner zurückgesetzt: mod_fcgid: read data from fastcgi server error.
[Thu Nov 08 14:15:09 2012] [error] [client 134.95.150.24] Premature end of script headers: mapproxy.fcgi
[Thu Nov 08 14:15:14 2012] [notice] mod_fcgid: process /var/local/mapproxy/etc/mapproxy.fcgi(10150) exit(communication error), terminated by calling exit(), return code: 1
-------------- next part --------------
#!/var/local/mapproxy/venv/bin/python26

import os
from paste.deploy import loadapp

application = loadapp('config:config.ini', relative_to=os.path.dirname(__file__))

#Deploy using FastCGI
if __name__ == '__main__':
        from flup.server.fcgi import WSGIServer
        WSGIServer(application).run()



More information about the MapProxy mailing list