Hi Guys ;)
I have no clue anymore...
When I just do the import and run it everything works flawlessly but as soon as i use a "custom" style it does not work anymore ;(. I am pretty sure I am missing something but i dont know what...
The error message is:
ERROR **: 16:45:53.403: An error occurred while loading the map layer 'default': XML document not well formed:
Document is empty at line 1 of '/home/renderer/src/openstreetmap-carto/mapnik.xml'
and yes that is true... but why is it empty?
My steps:
-
Got a brandnew VM from Linode with Debian 11
-
installed Docker
-
created the path /home/osm/
-
git cloned the official openstreetmap carto
-
which left me with this folder:

Please pay attention to the test.txt file. I created this file to check if the file gets listed when starting the container (it lists all the style files on boot) and yes it does.
-
ok so at first: --> import
docker run
-e DOWNLOAD_PBF=https://download.geofabrik.de/europe/germany/bayern-latest.osm.pbf
-e DOWNLOAD_POLY=https://download.geofabrik.de/europe/germany/bayern.poly
-e NAME_LUA=openstreetmap-carto.lua
-e NAME_STYLE=openstreetmap-carto.style
-e NAME_MML=project.mml
-e NAME_SQL=indexes.sql
-v osm-data:/data/database/
-v /home/osm/openstreetmap-carto:/data/style/
overv/openstreetmap-tile-server
import
import runs through exactly as the non custom style does.
After that I run it with:
docker run
-e NAME_LUA=openstreetmap-carto.lua
-e NAME_STYLE=openstreetmap-carto.style
-e NAME_MML=project.mml
-e NAME_SQL=indexes.sql
-v osm-data:/data/database/
-v /home/osm/openstreetmap-carto:/data/style/
overv/openstreetmap-tile-server
run
Tja and all those steps leave me with an empty mapnik.xml file...
Does anyone know what i forgot?
Thank you for every help.
PS: Here is the complete output of the run command:
root@localhost:/home/osm/openstreetmap-carto# docker run -e NAME_LUA=openstreetmap-carto.lua -e NAME_STYLE=openstreetmap-carto.style -e NAME_MML=project.mml -e NAME_SQL=indexes.sql -v osm-data:/data/database/ -v /home/osm/openstreetmap-carto:/data/style/ overv/openstreetmap-tile-server run
++ ls -A /data/style/
+ '[' '!' '.dockerignore
.editorconfig
.git
.gitattributes
.github
.gitignore
CARTOGRAPHY.md
CHANGELOG.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
DOCKER.md
Dockerfile
Dockerfile.db
Dockerfile.import
INSTALL.md
LICENSE.txt
README.md
RELEASES.md
USECASES.md
data
docker-compose.yml
external-data.yml
indexes.sql
indexes.yml
mapnik.xml
openstreetmap-carto.lua
openstreetmap-carto.style
patterns
preview.png
project.mml
road-colors.yaml
scripts
style
symbols
test.txt' ']'
+ '[' '!' -f /data/style/mapnik.xml ']'
+ '[' run == import ']'
+ '[' run == run ']'
+ rm -rf /tmp/hsperfdata_root
+ '[' -f /data/database/PG_VERSION ']'
+ '[' -f /nodes/flat_nodes.bin ']'
+ '[' -f /data/tiles/data.poly ']'
+ '[' -f /data/tiles/planet-import-complete ']'
+ '[' -f /data/tiles/planet-import-complete ']'
+ '[' -f /data/database/planet-import-complete ']'
+ cp /data/database/planet-import-complete /data/tiles/planet-import-complete
+ chown -R postgres: /var/lib/postgresql/ /data/database/postgres/
+ '[' '' == enabled ']'
+ '[' '' == 1 ']'
+ createPostgresConfig
+ cp /etc/postgresql/14/main/postgresql.custom.conf.tmpl /etc/postgresql/14/main/conf.d/postgresql.custom.conf
+ sudo -u postgres echo 'autovacuum = on'
+ cat /etc/postgresql/14/main/conf.d/postgresql.custom.conf
# Suggested minimal settings from
# https://ircama.github.io/osm-carto-tutorials/tile-server-ubuntu/
shared_buffers = 128MB
min_wal_size = 1GB
# max_wal_size = 2GB # Overridden below
maintenance_work_mem = 256MB
# Suggested settings from
# https://github.com/openstreetmap/chef/blob/master/roles/tile.rb#L38-L45
max_connections = 250
temp_buffers = 32MB
work_mem = 128MB
wal_buffers = 1024kB
wal_writer_delay = 500ms
commit_delay = 10000
# checkpoint_segments = 60 # unrecognized in psql 10.7.1
max_wal_size = 2880MB
random_page_cost = 1.1
track_activity_query_size = 16384
autovacuum_vacuum_scale_factor = 0.05
autovacuum_analyze_scale_factor = 0.02
listen_addresses = '*'
autovacuum = on
+ service postgresql start
* Starting PostgreSQL 14 database server
...done.
+ service apache2 restart
* Restarting Apache httpd web server apache2
[Thu Jan 12 16:45:51.996851 2023] [so:warn] [pid 64:tid 140646807861120] AH01574: module tile_module is already loaded, skipping
[Thu Jan 12 16:45:51.999335 2023] [tile:warn] [pid 64:tid 140646807861120] Could not determine host name of server to configure tile-json request. Using localhost instead
[Thu Jan 12 16:45:51.999844 2023] [tile:notice] [pid 64:tid 140646807861120] Loading tile config default at /tile/ for zooms 0 - 20 from tile directory /var/cache/renderd/tiles with extension .png and mime type image/png
[Thu Jan 12 16:45:52.000428 2023] [tile:notice] [pid 64:tid 140646807861120] Loading tile config default at /tile/ for zooms 0 - 20 from tile directory /var/cache/renderd/tiles with extension .png and mime type image/png
[Thu Jan 12 16:45:52.000816 2023] [tile:notice] [pid 64:tid 140646807861120] Loading tile config default at /tile/ for zooms 0 - 20 from tile directory /var/cache/renderd/tiles with extension .png and mime type image/png
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message
[Thu Jan 12 16:45:52.017337 2023] [so:warn] [pid 64:tid 140646807861120] AH01574: module tile_module is already loaded, skipping
...done.
+ setPostgresPassword
+ sudo -u postgres psql -c 'ALTER USER renderer PASSWORD '\''renderer'\'''
ALTER ROLE
+ sed -i -E 's/num_threads=[0-9]+/num_threads=4/g' /etc/renderd.conf
+ '[' disabled == enabled ']'
+ '[' disabled == 1 ']'
+ trap stop_handler SIGTERM
+ child=130
+ wait 130
+ sudo -u renderer renderd -f -c /etc/renderd.conf
** INFO: 16:45:53.177: Rendering daemon started
** INFO: 16:45:53.178: Initialising request_queue
** INFO: 16:45:53.179: Parsing section renderd
** INFO: 16:45:53.179: Parsing render section 0
** INFO: 16:45:53.179: Parsing section mapnik
** INFO: 16:45:53.180: Parsing section default
** INFO: 16:45:53.180: config renderd: unix socketname=/run/renderd/renderd.sock
** INFO: 16:45:53.180: config renderd: num_threads=4
** INFO: 16:45:53.180: config renderd: num_slaves=0
** INFO: 16:45:53.181: config renderd: tile_dir=/var/cache/renderd/tiles
** INFO: 16:45:53.181: config renderd: stats_file=/run/renderd/renderd.stats
** INFO: 16:45:53.181: config mapnik: plugins_dir=/usr/lib/mapnik/3.1/input
** INFO: 16:45:53.181: config mapnik: font_dir=/usr/share/fonts
** INFO: 16:45:53.182: config mapnik: font_dir_recurse=1
** INFO: 16:45:53.182: config renderd(0): Active
** INFO: 16:45:53.182: config renderd(0): unix socketname=/run/renderd/renderd.sock
** INFO: 16:45:53.182: config renderd(0): num_threads=4
** INFO: 16:45:53.183: config renderd(0): tile_dir=/var/cache/renderd/tiles
** INFO: 16:45:53.183: config renderd(0): stats_file=/run/renderd/renderd.stats
** INFO: 16:45:53.183: config map 0: name(default) file(/home/renderer/src/openstreetmap-carto/mapnik.xml) uri(/tile/) htcp() host(localhost)
** INFO: 16:45:53.184: Initialising unix server socket on /run/renderd/renderd.sock
** INFO: 16:45:53.184: Renderd is using mapnik version 3.1.0
** INFO: 16:45:53.398: Running in foreground mode...
** INFO: 16:45:53.400: Loading parameterization function for
** (process:131): ERROR **: 16:45:53.401: An error occurred while loading the map layer 'default': XML document not well formed:
Document is empty at line 1 of '/home/renderer/src/openstreetmap-carto/mapnik.xml'
** INFO: 16:45:53.400: Loading parameterization function for
** INFO: 16:45:53.402: Loading parameterization function for
** INFO: 16:45:53.403: Loading parameterization function for
** (process:131): ERROR **: 16:45:53.403: An error occurred while loading the map layer 'default': XML document not well formed:
Document is empty at line 1 of '/home/renderer/src/openstreetmap-carto/mapnik.xml'
** (process:131): ERROR **: 16:45:53.403: An error occurred while loading the map layer 'default': XML document not well formed:
Document is empty at line 1 of '/home/renderer/src/openstreetmap-carto/mapnik.xml'
** (process:131): ERROR **: 16:45:53.404: An error occurred while loading the map layer 'default': XML document not well formed:
Document is empty at line 1 of '/home/renderer/src/openstreetmap-carto/mapnik.xml'
Hi Guys ;)
I have no clue anymore...
When I just do the import and run it everything works flawlessly but as soon as i use a "custom" style it does not work anymore ;(. I am pretty sure I am missing something but i dont know what...
The error message is:
and yes that is true... but why is it empty?
My steps:
Got a brandnew VM from Linode with Debian 11
installed Docker
created the path /home/osm/
git cloned the official openstreetmap carto
which left me with this folder:

Please pay attention to the test.txt file. I created this file to check if the file gets listed when starting the container (it lists all the style files on boot) and yes it does.
ok so at first: --> import
import runs through exactly as the non custom style does.
After that I run it with:
Tja and all those steps leave me with an empty mapnik.xml file...
Does anyone know what i forgot?
Thank you for every help.
PS: Here is the complete output of the run command: