An error occurred while loading the map layer
I am follwing Switch2OSM link (https://switch2osm.org/serving-tiles/manually-building-a-tile-server-ubuntu-24-04-lts/) for tileserver implementation & I am getting the following error:
root@forlinx:/run/media/mmcblk1p1/tileserver# su - _renderd -c "renderd -f -c /etc/renderd.conf" ** INFO: 14:49:55.349: Rendering daemon started (version 0.7.1) ** INFO: 14:49:55.350: Initialising request queue ** INFO: 14:49:55.350: Parsing config file: /etc/renderd.conf ** INFO: 14:49:55.351: config renderd: unix socketname=/run/renderd/renderd.sock ** INFO: 14:49:55.351: config renderd: num_threads=2 ** INFO: 14:49:55.351: config renderd: num_slaves=0 ** INFO: 14:49:55.351: config renderd: tile_dir=/run/media/mmcblk1p1/tileserver/tiles/ ** INFO: 14:49:55.351: config renderd: stats_file=/run/renderd/renderd.stats ** INFO: 14:49:55.351: config renderd: pid_file=var/run/renderd/renderd.pid ** INFO: 14:49:55.351: config mapnik: plugins_dir=/usr/lib/mapnik/input ** INFO: 14:49:55.351: config mapnik: font_dir=/run/media/mmcblk1p1/tileserver/openstreetmap-carto/fonts/ ** INFO: 14:49:55.351: config mapnik: font_dir_recurse=1 ** INFO: 14:49:55.351: config renderd(0): Active ** INFO: 14:49:55.351: config renderd(0): unix socketname=/run/renderd/renderd.sock ** INFO: 14:49:55.351: config renderd(0): num_threads=2 ** INFO: 14:49:55.351: config renderd(0): tile_dir=/run/media/mmcblk1p1/tileserver/tiles/ ** INFO: 14:49:55.351: config renderd(0): stats_file=/run/renderd/renderd.stats ** INFO: 14:49:55.351: config renderd(0): pid_file=var/run/renderd/renderd.pid ** INFO: 14:49:55.351: config map 0: name(s2o) file(/run/media/mmcblk1p1/tileserver/openstreetmap-carto/mapnik.xml) uri(/tile/) output_format(png256) htcp() host(localhost) ** INFO: 14:49:55.351: Initialising unix server socket on /run/renderd/renderd.sock ** INFO: 14:49:55.352: Renderd is using mapnik version 3.1.0 ** INFO: 14:49:55.489: Running in foreground mode...
** (process:14161): ERROR **: 14:49:55.882: An error occurred while loading the map layer 's2o': Postgis Plugin: ERROR: syntax error at or near "0.001" LINE 10: way_area/NULLIF(POW(0.0010.28,2),0) AS way_pixels, ^ in executeQuery Full sql was: 'SELECT * FROM (SELECT way, way_pixels, COALESCE(wetland, landuse, "natural") AS feature FROM (SELECT way, ('landuse_' || (CASE WHEN landuse IN ('forest', 'farmland', 'residential', 'commercial', 'retail', 'industrial', 'meadow', 'grass', 'village_green', 'vineyard', 'orchard') THEN landuse END)) AS landuse, ('natural_' || (CASE WHEN "natural" IN ('wood', 'sand', 'scree', 'shingle', 'bare_rock', 'heath', 'grassland', 'scrub') THEN "natural" END)) AS "natural", ('wetland_' || (CASE WHEN "natural" IN ('wetland', 'mud') THEN (CASE WHEN "natural" IN ('mud') THEN "natural" ELSE tags->'wetland' END) END)) AS wetland, way_area/NULLIF(POW(0.0010.28,2),0) AS way_pixels, way_area FROM planet_osm_polygon WHERE (landuse IN ('forest', 'farmland', 'residential', 'commercial', 'retail', 'industrial', 'meadow', 'grass', 'village_green', 'vineyard', 'orchard') OR "natural" IN ('wood', 'wetland', 'mud', 'sand', 'scree', 'shingle', 'bare_rock', 'heath', 'grassland', 'scrub')) AND way_area > 0.010::real0::real AND building IS NULL ) AS features ORDER BY way_area DESC, feature ) AS landcover_low_zoom LIMIT 0' encountered during parsing of layer 'landcover-low-zoom' in Layer of '/run/media/mmcblk1p1/tileserver/openstreetmap-carto/mapnik.xml'
** (process:14161): ERROR **: 14:49:55.880: An error occurred while loading the map layer 's2o': Postgis Plugin: ERROR: syntax error at or near "0.001" LINE 10: way_area/NULLIF(POW(0.0010.28,2),0) AS way_pixels, ^ in executeQuery Full sql was: 'SELECT * FROM (SELECT way, way_pixels, COALESCE(wetland, landuse, "natural") AS feature FROM (SELECT way, ('landuse_' || (CASE WHEN landuse IN ('forest', 'farmland', 'residential', 'commercial', 'retail', 'industrial', 'meadow', 'grass', 'village_green', 'vineyard', 'orchard') THEN landuse END)) AS landuse, ('natural_' || (CASE WHEN "natural" IN ('wood', 'sand', 'scree', 'shingle', 'bare_rock', 'heath', 'grassland', 'scrub') THEN "natural" END)) AS "natural", ('wetland_' || (CASE WHEN "natural" IN ('wetland', 'mud') THEN (CASE WHEN "natural" IN ('mud') THEN "natural" ELSE tags->'wetland' END) END)) AS wetland, way_area/NULLIF(POW(0.0010.28,2),0) AS way_pixels, way_area FROM planet_osm_polygon WHERE (landuse IN ('forest', 'farmland', 'residential', 'commercial', 'retail', 'industrial', 'meadow', 'grass', 'village_green', 'vineyard', 'orchard') OR "natural" IN ('wood', 'wetland', 'mud', 'sand', 'scree', 'shingle', 'bare_rock', 'heath', 'grassland', 'scrub')) AND way_area > 0.010::real0::real AND building IS NULL ) AS features ORDER BY way_area DESC, feature ) AS landcover_low_zoom LIMIT 0' encountered during parsing of layer 'landcover-low-zoom' in Layer of '/run/media/mmcblk1p1/tileserver/openstreetmap-carto/mapnik.xml'
The only difference is I am trying to implement it without systemd service that ubuntu offers. Kindly provide me a solution to overcome the above error. Thanks in advance
This is extremely unlikely to be related to mod_tile :)
The message 'Postgis Plugin: ERROR: syntax error at or near "0.001"' makes me wonder if there's a problem with Postgis plugin (either versions, or are they installed at all?). A web search suggests that no-one else on the internet has had your problem before, which suggests it might be related to something different that you are doing. c.osm.org might be a better place to ask this question, and you'll need to explain what you've actually done that is different.