mod_tile icon indicating copy to clipboard operation
mod_tile copied to clipboard

"out of the box" configuration no longer works.

Open SomeoneElseOSM opened this issue 2 years ago • 5 comments

Previously on Debian 11 and Ubuntu 22.04 installation "just worked" with an out-of-the-box configuration. That's one of the reasons that https://switch2osm.org/serving-tiles/manually-building-a-tile-server-debian-11/ and https://switch2osm.org/serving-tiles/manually-building-a-tile-server-ubuntu-22-04-lts/ were much shorter than previous versions. Unfortunately, there seems to have been a regression.

https://packages.debian.org/search?suite=bullseye&arch=any&mode=path&searchon=contents&keywords=renderd.conf shows that the renderd.conf for mod_tile was present in Debian 11 but https://packages.debian.org/search?suite=bookworm&arch=any&mode=path&searchon=contents&keywords=renderd.conf shows that it is missing in Debian 12. This doesn't seem to be a Debian packaging issue but instead a change here.

The replacement config seems to be in "/usr/share/doc/renderd/examples/renderd-example-map.conf", but that has a bunch of other things in it that won't work for 99% of people like port numbers and a hardcoded path "/var/www/example-map/".

https://github.com/openstreetmap/mod_tile/blob/master/README.rst is now completely muddled. It mixes up installing from the OS's repository (which "just works" on Debian 11 and Ubuntu 22.04 but fails on Debian 12), building from scratch (which also "just works" on Ubuntu 22.04 at least) and configuration (essentially unnecessary on Debian 11 and Ubuntu 22.04, some but not all sections required on Debian 12). The parts of https://github.com/openstreetmap/mod_tile/blob/master/README.rst that need to be manually executed refer to files that are not actually installed (at least not by the "apt install libapache2-mod-tile renderd" suggested earlier).

As a stopgap, I'll try put something together for Debian 12 that tries to simplify the manual tinkering required as much as possible (for the Debian 12 version of https://switch2osm.org/serving-tiles/manually-building-a-tile-server-ubuntu-22-04-lts/ ), but would it be possible to revert to a "working out of the box" configuration in time for the next LTS release? Essentially, restore the vanilla /etc/apache2/conf-available/renderd.conf from https://packages.debian.org/search?suite=bullseye&arch=any&mode=path&searchon=contents&keywords=renderd.conf without "example" settings that won't work for most people, and undo any other similar changes.

SomeoneElseOSM avatar Jul 01 '23 01:07 SomeoneElseOSM

I tried to figure out which parts of this are issues here and which are with debian packaging, but couldn't.

pnorman avatar Jul 02 '23 04:07 pnorman

which parts of this are issues here and which are with debian packaging, but couldn't.

I also spent quite a bit of time doing that before writing the screed above :)

I suspect what happened was that there was an attempt to make a fuller featured "example map" in the commits at https://github.com/openstreetmap/mod_tile/commits/master/etc/apache2/renderd-example-map.conf . I don't know what conversations happened after the commits here with the Debian packagers, but even if there was lots of configuration I can understand why Debian might not want to package that specific example map (it's of very limited application).

Unfortunately the commits at https://github.com/openstreetmap/mod_tile/commit/43beadaf0849dfb85e9d2e9ecbab9f6510f6200c and https://github.com/openstreetmap/mod_tile/commit/27c470c3eb3fa7fe0e36e9cfee056067f9c3ad00 don't have any information beyond the commit titles.

For info, other sites such as https://www.linuxbabe.com/debian/openstreetmap-osm-tile-server-debian-12-bookworm now suggest creating /etc/apache2/sites-available/tileserver_site.conf manually. My experience (and I'm sure @pnorman's) is that large amounts of "text to be added" or "text to be edited" tend to catch new users out.

SomeoneElseOSM avatar Jul 02 '23 10:07 SomeoneElseOSM

I too noticed some inconsistencies in various places as it pertains to configuration files and have even done some work to help improve it where possible. Take a look at https://github.com/openstreetmap/mod_tile/pull/320 if you are interested. Also, in order to try and generate basic "usable" configuration files during build-time, https://github.com/openstreetmap/mod_tile/pull/316 was created to help make things easier for package maintainers in the future.

hummeltech avatar Jul 20 '23 03:07 hummeltech

It looks like this is the commit where the change was made and it seems that the contents of /etc/apache2/renderd.conf were basically just removed and appended into /etc/apache2/renderd-example-map.conf.

Also, I have created a pull request to test that the instructions in README.rst will indeed work when being executed after having installed the Debian/Ubuntu packages (rather than building from source): https://github.com/openstreetmap/mod_tile/pull/330

hummeltech avatar Jul 23 '23 20:07 hummeltech

See also https://github.com/openstreetmap/mod_tile/issues/295 which is at least somewhat related and has some useful info.

SomeoneElseOSM avatar Nov 02 '23 20:11 SomeoneElseOSM