<div dir="ltr">Hi all,<br><br>I'm trying to get s3 working as a back end cache type and am having no end of issues (almost certainly of my own doing). <div><br></div><div>Using MapProxy version: 1.13.2 on Ubuntu 21.10 (on a gcs VM if that makes any difference....). </div><div><br></div><div>Here's my mapproxy.yaml:<br></div><div><div><div>-------</div><div>services:<br>  tms:<br>    use_grid_names: true<br>    origin: 'nw'<br><br>layers:<br>  - name: test_layer<br>    title: Test Layer<br>    sources: [combined_cache]<br><br>caches:<br>  combined_cache:<br>    grids: [webmercator]<br>    sources: [test-imagery, test-overlay]<br>    cache:<br>      type: s3</div><div>      #path ripped out of an example - figured it shouldnt matter too much? I've also tried with straight /test/</div><div>      directory: /1.0.0/my_layer/default/20110501/4326/<br>      profile_name: default<br>      bucket_name: xxxxx-test<br><br><br>sources:<br>  test-imagery:<br>     type: tile<br>     grid: GLOBAL_WEBMERCATOR<br>     url: <source 1><br>  test-overlay:<br>     type: tile<br>     grid: GLOBAL_WEBMERCATOR<br>     url: <source 2><br>     transparent: true<br><br>grids:<br>    webmercator:<br>        base: GLOBAL_WEBMERCATOR<br><br>globals:</div><div><div>-------</div><div><br></div><div>This config works fine if I use file system as the cache back end (eg. omit the cache option in the cache definition) </div><br class="gmail-Apple-interchange-newline">When I point an xyz client at it (in this case, qgis, though I've also tested with leaflet) at it, I'm getting the following error output from serve-develop (from every single tile request from the client):</div><div><br><div><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">PermissionError: [Errno 13] Permission denied: '/1.0.0'</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">Traceback (most recent call last):</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">  File "/usr/local/lib/python3.9/dist-packages/mapproxy/wsgiapp.py", line 141, in __call__</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">    resp = self.handlers[handler_name].handle(req)</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">  File "/usr/local/lib/python3.9/dist-packages/mapproxy/service/base.py", line 30, in handle</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">    return handler(parsed_req)</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">  File "/usr/local/lib/python3.9/dist-packages/mapproxy/service/tile.py", line 82, in map</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">    tile = layer.render(tile_request, use_profiles=tile_request.use_profiles, coverage=limit_to, decorate_img=decor</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">ate_img)</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">  File "/usr/local/lib/python3.9/dist-packages/mapproxy/service/tile.py", line 312, in render</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">    tile = self.tile_manager.load_tile_coord(tile_coord,</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">  File "/usr/local/lib/python3.9/dist-packages/mapproxy/cache/tile.py", line 115, in load_tile_coord</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">    return self.load_tile_coords(</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">  File "/usr/local/lib/python3.9/dist-packages/mapproxy/cache/tile.py", line 139, in load_tile_coords</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">    tiles = self._load_tile_coords(</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">  File "/usr/local/lib/python3.9/dist-packages/mapproxy/cache/tile.py", line 171, in _load_tile_coords</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">    created_tiles = creator.create_tiles(uncached_tiles)</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">  File "/usr/local/lib/python3.9/dist-packages/mapproxy/cache/tile.py", line 325, in create_tiles</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">    created_tiles = self._create_single_tiles(tiles)</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">  File "/usr/local/lib/python3.9/dist-packages/mapproxy/cache/tile.py", line 349, in _create_single_tiles</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">    created_tiles.extend(self._create_single_tile(tile))</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">  File "/usr/local/lib/python3.9/dist-packages/mapproxy/cache/tile.py", line 363, in _create_single_tile</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">    with self.tile_mgr.lock(tile):</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">  File "/usr/local/lib/python3.9/dist-packages/mapproxy/util/lock.py", line 46, in __enter__</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">    self.lock()</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">  File "/usr/local/lib/python3.9/dist-packages/mapproxy/util/lock.py", line 63, in lock</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">    self._make_lockdir()</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">  File "/usr/local/lib/python3.9/dist-packages/mapproxy/util/lock.py", line 57, in _make_lockdir</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">    raise e</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">  File "/usr/local/lib/python3.9/dist-packages/mapproxy/util/lock.py", line 54, in _make_lockdir</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">    os.makedirs(os.path.dirname(self.lock_file))</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">  File "/usr/lib/python3.9/os.py", line 215, in makedirs</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">    makedirs(head, exist_ok=exist_ok)</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">  File "/usr/lib/python3.9/os.py", line 215, in makedirs</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">    makedirs(head, exist_ok=exist_ok)</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">  File "/usr/lib/python3.9/os.py", line 215, in makedirs</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">    makedirs(head, exist_ok=exist_ok)</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">  [Previous line repeated 2 more times]</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">  File "/usr/lib/python3.9/os.py", line 225, in makedirs</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">    mkdir(name, mode)</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">PermissionError: [Errno 13] Permission denied: '/1.0.0'</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)">[info] 127.0.0.1 - - [25/Oct/2021 08:47:01] "GET /tms/1.0.0/test_layer/webmercator/1/0/3.png HTTP/1.0" 500 -</span></div><div><br></div><div>I was originally attempting to connect to a Google Cloud Storage bucket, but was receiving the above error, so thinking it might have been some weird interop issue, or permissions issue I switched to AWS s3, and the issue remains.<br> <br>I'm... fairly confident the back end aws / google cloud storage bucket & associated permissions are set up correctly (though happy to be wrong if they aren't).<br><br>I've checked to see that the perms file (~/.aws/config) is correct, and if I supply a known bad key, MapProxy doesn't even start, so that's definitely correct.  <br> <br>Does anyone have any ideas / has anyone seen this issue before ? <br><br>Regards,</div><div><br>Luke <br><br><br></div><div><br></div></div></div></div></div>