[MapProxy] S3 Configuration and 500 Errors
Holloway, Robert
rholloway at aerialservicesinc.com
Tue Sep 19 05:55:48 PDT 2017
We are having some issues getting Mapproxy to reference our S3 cache we
created and following the example at
https://mapproxy.org/docs/nightly/caches.html#s3. We have tested to make
sure that we can access our S3. We have installed Boto3. Do we need to
execute/import Boto3 into Mapproxy somehow? It wasn't clear in the
documentation if there was any other configuration like a BOTO3 session
somewhere.
We are using a clean install of mapproxy - only changing the relevant
portion to try and get S3 working:
<pre>
services:
demo:
tms:
use_grid_names: true
# origin for /tiles service
origin: 'nw'
kml:
use_grid_names: true
wmts:
wms:
srs: ['EPSG:4326', 'EPSG:3857', 'CRS:84', 'EPSG:900913', 'EPSG:102100',
'EPSG:102113', 'EPSG:2229', 'EPSG:2230', 'EPSG:26911', 'EPSG:26915']
max_output_pixels: [10000, 10000]
layers:
- name: s3_test_layer
title: S3 Test Layer
sources: [S3_Test_Cache]
md:
abstract: RGB [2017]
cache:
S3_Test_Cache:
grids: [webmercator_20]
sources: [S3_Test_rgbp_tms, S3_Test_rgbj_tms]
format: mixed
request_format: image/png
disable_storage: true
cache:
type: s3
directory: /s3_src/
bucket_name: test_bucket
sources:
S3_Test_rgbj_tms:
type: tile
url: /s3_src/rgb/%(z)s/%(x)s/%(y)s.jpg
coverage:
bbox: [-117.207,33.4322,-117.055,33.5544]
bbox_srs: 'EPSG:4326'
grid: mercator_20
transparent: true
S3_Test_rgbp_tms:
type: tile
url: /s3_src/rgb/%(z)s/%(x)s/%(y)s.png
coverage:
bbox: [-117.207,33.4322,-117.055,33.5544]
bbox_srs: 'EPSG:4326'
grid: mercator_20
transparent: true
grids:
webmercator:
base: GLOBAL_WEBMERCATOR
webmercator_20:
base: GLOBAL_WEBMERCATOR
num_levels: 21
globals:
cache:
s3:
profile_name: default
</pre>
We are using apache2 and mod_wsgi - here are the error logs when we hit the
server:
mod_wsgi (pid=34395): Target WSGI script '/var/www/mapproxy/config.py'
cannot be loaded as Python module.
mod_wsgi (pid=34395): Exception occurred processing WSGI script
'/var/www/mapproxy/config.py'.
Traceback (most recent call last):
File "/var/www/mapproxy/config.py", line 10, in <module>
application = make_wsgi_app(r'/var/www/mapproxy/mapproxy.yaml')
File "/usr/local/lib/python2.7/dist-packages/mapproxy/wsgiapp.py", line
105, in make_wsgi_app
conf = load_configuration(mapproxy_conf=services_conf,
ignore_warnings=ignore_config_warnings)
File "/usr/local/lib/python2.7/dist-packages/mapproxy/config/loader.py",
line 1957, in load_configuration
raise ConfigurationError(ex)
ConfigurationError: while scanning for the next token
found character that cannot start any token
in "/var/www/mapproxy/mapproxy.yaml", line 45, column 10
Our configuration for S3 has grown dramatically as we have scoured the web
for hints / information about how to get this working. The configuration
was much simpler in the beginning so we may have to start by stripping down
what we have in there-- hopefully with someone's help from here.
Thanks,
R Holloway
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20170919/e1497f1c/attachment.html>
More information about the MapProxy
mailing list