[MapProxy] Issue with mapproxy, apache2 and wsgi

Oliver Tonnhofer olt at omniscale.de
Sun Dec 14 03:58:57 PST 2014


Hi Simon,

The error suggests that one of the config files is empty. 
Do you have a script that generates the sosm.yaml config file or any of the imported  "base" configs?

Regards,
Oliver

-- 
Oliver Tonnhofer    | Omniscale GmbH & Co KG    | http://omniscale.de
http://mapproxy.org | https://github.com/olt | @oltonn


On 14.12.2014, at 10:48, Simon Poole wrote:

> 
> We've been running a mapproxy instance for a good two and a half years,
> mainly as a proxy between WMS servers and clients that can only consume
> tiles. We've had a frequent and annoying issue that mapproxy will
> suddenly return "500" errors for any requests which will go away after
> restarting apache.
> 
> Over time we've used a number of different versions of everything
> involved, currently the service is running on Ubuntu 14.04, mapproxy
> 1.7.1 and apache 2.4.7.
> 
> When the error occurs we get the following in the log:
> 
> [Sun Dec 14 07:20:12.598975 2014] [:error] [pid 30426:tid
> 140672961599232] [remote 153.189.116.228:46594] mod_wsgi (pid=30426):
> Exception occurred processing WSGI script
> '/srv/mapproxy.osm.ch/config/wsgi.py'.
> [Sun Dec 14 07:20:12.598992 2014] [:error] [pid 30426:tid
> 140672961599232] [remote 153.189.116.228:46594] Traceback (most recent
> call last):
> [Sun Dec 14 07:20:12.599006 2014] [:error] [pid 30426:tid
> 140672961599232] [remote 153.189.116.228:46594]   File
> "/srv/mapproxy.osm.ch/config/wsgi.py", line 12, in <module>
> [Sun Dec 14 07:20:12.599042 2014] [:error] [pid 30426:tid
> 140672961599232] [remote 153.189.116.228:46594]     application =
> make_wsgi_app(r'/srv/mapproxy.osm.ch/config/sosm.yaml')
> [Sun Dec 14 07:20:12.599051 2014] [:error] [pid 30426:tid
> 140672961599232] [remote 153.189.116.228:46594]   File
> "/srv/mapproxy.osm.ch/venv/lib/python2.7/site-packages/mapproxy/wsgiapp.py",
> line 104, in make_wsgi_app
> [Sun Dec 14 07:20:12.611874 2014] [:error] [pid 30426:tid
> 140672961599232] [remote 153.189.116.228:46594]     conf =
> load_configuration(mapproxy_conf=services_conf,
> ignore_warnings=ignore_config_warnings)
> [Sun Dec 14 07:20:12.611911 2014] [:error] [pid 30426:tid
> 140672961599232] [remote 153.189.116.228:46594]   File
> "/srv/mapproxy.osm.ch/venv/lib/python2.7/site-packages/mapproxy/config/loader.py",
> line 1597, in load_configuration
> [Sun Dec 14 07:20:12.612738 2014] [:error] [pid 30426:tid
> 140672961599232] [remote 153.189.116.228:46594]     conf_dict =
> load_configuration_file([os.path.basename(mapproxy_conf)], conf_base_dir)
> [Sun Dec 14 07:20:12.612752 2014] [:error] [pid 30426:tid
> 140672961599232] [remote 153.189.116.228:46594]   File
> "/srv/mapproxy.osm.ch/venv/lib/python2.7/site-packages/mapproxy/config/loader.py",
> line 1621, in load_configuration_file
> [Sun Dec 14 07:20:12.612767 2014] [:error] [pid 30426:tid
> 140672961599232] [remote 153.189.116.228:46594]     if 'base' in
> current_dict:
> [Sun Dec 14 07:20:12.612781 2014] [:error] [pid 30426:tid
> 140672961599232] [remote 153.189.116.228:46594] TypeError: argument of
> type 'NoneType' is not iterable
> 
> 
> Note it doesn't seem to be linked to a specific request happening and as
> said, restarting apache2 will allow the service to work normally again.
> 
> For completeness sake, the relevant part of the apache config:
> 
>   WSGIScriptAlias / /srv/mapproxy.osm.ch/config/wsgi.py
>    WSGIProcessGroup mapproxy
>    WSGIDaemonProcess mapproxy
> python-path=/srv/mapproxy.osm.ch/venv/lib/python2.7/site-packages
> processes=2 user=mapproxy
>    WSGIApplicationGroup %{SERVER}
> 
> 
> Anybody any ideas?
> 
> Simon
> 
> _______________________________________________
> MapProxy mailing list
> MapProxy at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapproxy




More information about the MapProxy mailing list