Hello,
A while a go we reported that we were having trouble to cache
vnd.mapbox-vector-tile tiles in Geoserver[1], but we were not able to
provide the steps to reproduce the bug. After some more digging, we
finally found what causes the trouble.
Enabling the 'WMS integration' and disabling the 'explicit tiled
parameter' causes a back and forth infinite loop between Geoserver and
GWC when trying to obtain vector tiles. According to our tests, this is
what happens:
* GeoWebCache asks Geoserver for the missing tile when it's not
already cached.
* Geoserver, instead of generating the tile, asks GeoWebCache if the
tile is cached.
* GeoWebCache again asks Geoserver for the tile.
* ... infinite loop between the two services until the stacktrace is
so big it causes a StackOverflow
The bug can easily be reproduced by using Geoserver's official Docker image:
1. Run Geoserver: 'docker run -it --rm -e INSTALL_EXTENSIONS=true -e
STABLE_EXTENSIONS=vectortiles -p 8080:8080
docker.osgeo.org/geoserver:2.21.1'
2. Login to admin panel. Default credentials admin:geoserver
3. Enable 'application/vnd.mapbox-vector-tile' Tile caching for layer
tiger:tiger_roads (we are taking this as an example, but any should
cause the same)
4. Request tile to TMS:
'curl -u admin:geoserver
http://localhost:8080/geoserver/gwc/service/tms/1.0.0/tiger:tiger_roads@EPSG:4326@pbf/12/2412/2975.pbf'
The request will succeed and will return a binary output (we don't
really care about the content). So we confirm that by default the
tile generation/caching works.
5. Disable 'Explicitly require TILED Parameter' and enable 'Enable
direct integration with GeoServer WMS' under Tile Caching / Caching
Defaults
6. Clear cache for layer 'tiger:tiger_roads'. Tile layers /
'tiger:tiger_roads' / 'Empty'
7. Enable the VERBOSE_LOGGING profile
8. Ask for the same tile again
'curl -u admin:geoserver
http://localhost:8080/geoserver/gwc/service/tms/1.0.0/tiger:tiger_roads@EPSG:4326@pbf/12/2412/2975.pbf'
The request will return a 'GWC Error': '400: Problem communicating
with GeoServer' and while generate a huge stacktrace. Depending on
the PC the request may take a while.
The single tile request generates a log file of 418815lines and 34Mb. As
it's too big to send it here I uploaded it to GDrive:
https://drive.google.com/file/d/1zngWc3ga0ZCrMCr4umovzPTM6lqBoSoC/view?usp=sharing
[1] https://sourceforge.net/p/geoserver/mailman/message/37332774/
Thank you
--
*BINGEN GALARTZA IPARRAGIRRE*
magnet.coop
Santa Marina 3, OƱati (20560)
i...@magnet.coop
*www.magnet.coop*
/This e-mail and the documents attached are confidential and intended
solely for the addressee; it may also be privileged. If you receive this
communication in error, please notify the sender immediately and delete
it. If you are not the intended recipient, you are expressly prohibited
from reading, copying, distributing, disseminating or, in any other way,
using any of the information without the Magnet consent. Please note
that Internet e-mail guarantees neither the confidentiality nor the
proper receipt of the message sent, so that Magnet shall not be liable
for any damages caused. As its integrity cannot be secured on the
Internet, the Magnet liability cannot be triggered for the message
content. Although the sender endeavors to maintain a computer virus-free
network, the sender does not warrant that this transmission is
virus-free and will not be liable for any damages resulting from any
virus transmitted./_______________________________________________
Geoserver-users mailing list
Please make sure you read the following two resources before posting to this
list:
- Earning your support instead of buying it, but Ian Turton:
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines:
http://geoserver.org/comm/userlist-guidelines.html
If you want to request a feature or an improvement, also see this:
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users