NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I'm done with my first suite setup attempt => the maps render blank and I have no idea how to troubleshoot. Any tips on where should I start please? To make things worse, I'm both OSM and Linux novice too.

For what it's worth, I ran "sudo -u renderaccount -- /usr/local/bin/renderd -fc /usr/local/etc/renderd.conf" manually and did not notice any errors. Some .meta files are getting generated in directories under /var/lib/mod_tile/ajt. For rendering I used this example https://switch2osm.github.io/using-tiles/getting-started-with-leaflet/ and did replace 'https://{s}.tile.openstreetmap.org' with 'http://ip address'.

I followed the instructions at https://switch2osm.org/serving-tiles/manually-building-a-tile-server-18-04-lts/ and am wondering if the various pieces of software/ styles/ fonts that will be used for rendering - starting from osm2pgsql in the list - do those need to be installed logged in as the user who'll do the rendering? In this particular document renderaccount.

Also, if I'll have to throw away the VM and redo the setup again, are there any better setup instructions?

Thanks very much, Eugen

asked 25 Apr '20, 03:32

eugen_nw's gravatar image

eugen_nw
31224
accept rate: 0%

edited 25 Apr '20, 03:46


I think that @Spiekerooger suggestion to run render_list got my maps to show, thanks very much!

I am not certain though because I did lots of tweaking using various pieces of information from two other OMS setup instructions websites. As of right now, I think that https://www.linuxbabe.com/ubuntu/openstreetmap-tile-server-ubuntu-18-04-osm has the best list of setup instructions.

permanent link

answered 04 May '20, 22:15

eugen_nw's gravatar image

eugen_nw
31224
accept rate: 0%

Some .meta files are getting generated in directories

That means that it's rendering tiles, which is the hard bit, and we just need to figure out why you can't see them in a browser.

What I'd suggest first is to use the web developer tools in your browser (usually via f12) to have a look at any errors and to see what's not loading.

When you tried "http://yourserveripaddress/hot/0/0/0.png" did that work? Did you try the html file “sample_leaflet.html” in mod_tile’s “extras” folder?

permanent link

answered 25 Apr '20, 23:12

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

edited 28 Apr '20, 01:12

Thanks very much @SomeoneElse for having looked into this!

"http://yourserveripaddress/hot/0/0/0.png" works, it shows a small & blank map of the world.

I cleared everything under /var/lib/mod_tile/ajtk, ran "sudo -u renderaccount -- /usr/local/bin/renderd -fc /usr/local/etc/renderd.conf" manually and did not notice any error. The browser's developer view complains only about not being able to find favicon.ico, other than that it loads successfully various .PNG files.

I loaded into postgres the data from us-pacific-latest.osm.pbf that I downloaded from https://download.geofabrik.de/north-america.html

I took a quick peek into the gis database and the tables seem to be populated with data:

gis=# SELECT COUNT(*) FROM "planet_osm_ways"; -[ RECORD 1 ]- count | 486952

gis=# SELECT COUNT(*) FROM "planet_osm_nodes"; -[ RECORD 1 ]-- count | 9573637

Right on the Linux VM where I have this running I opened the ~/src/mod_tile/extra/sample_leaflet.html file in FireFox and I see only a blank map.

I'd guess that the expected behavior would be that if I zoom into the west coast of the N. American continent to see some map being rendered. I see only a blank map.

(28 Apr '20, 01:08) eugen_nw

Is there a way we can see the Mapnik component's log? Is there a possibility that it cannot read the data from the Postgres database?

(28 Apr '20, 01:12) eugen_nw

Assuming you're running renderd in the background as you zoom around you should see "renderd" messages to /var/log/syslog .

(28 Apr '20, 01:28) SomeoneElse ♦

As I run renderd interactively, I see in renderd's output START/DONE TILE information and that it writes data into metafiles. In the browser's F12 window I do see calls like 'http://51.141.179.146/osm_tiles/7/20/43.png' displayed in red and with (canceled) Status. That may very well explain the behavior that I'm experiencing and shows that the rendering is not very successful.

This begs the question on what logs I should start looking at to diagnose this problem and where are those logs located? Alternatively, what do I need to do in order to enable the required logs to get generated? From what I've seen so far, renderd appears to be doing the right thing, so it could be either Mapnik, Postgres or some fault in the data import process.

(30 Apr '20, 01:25) eugen_nw
1

If you demand a tile at zoom 7 by the browser which had not been rendered before, your browser would have to wait minutes and minutes for that (meta)tile to render and caps the connection before the rendering is finished. Tiles below zoom 12 have to better be pre-rendered by render_list.

(30 Apr '20, 07:29) Spiekerooger

Thanks very much @Spiekerooger for having looked into this! I can certainly run render_list beforehand.

The required .PNG files are getting generated during rendering, right? Where are they cached please? In the subdirectories of my /var/lib/mod_tile/ equivalent directory I see only *.meta files.

I see information like below in renderd's output which made me believe that the rendering completed.

renderd[13515]: DEBUG: START TILE ajt 6 8-15 16-23, new metatile
renderd[13515]: Rendering projected coordinates 6 8 16 -> -15028131.257100|5009377.085700 -10018754.171400|10018754.171400 to a 8 x 8 tile
renderd[13515]: DEBUG: DONE TILE ajt 6 8-15 16-23 in 0.757 seconds debug: Creating and writing a metatile to /datadrive/caches/osm_tiles/ajt/6/0/0/0/1/128.meta

(30 Apr '20, 11:09) eugen_nw
1

They are only cached as metatitle in /var/lib/mod_tile or its equivalent. mod_tile (the apache module) retrieves the acutal tiles from the meta tile to display them.

What did you changed the TileLayer URL in your leaflet setup to?

It should be http://51.141.179.146/osm_tiles/{z}/{x}/{y}.png if "osm_tiles" is the url as defined in the renderd.conf.

(30 Apr '20, 12:43) Spiekerooger

Thanks very much again!

Yes I have it set to 'http://51.141.179.146/osm_tiles/{z}/{x}/{y}.png' The problem was that I did not have mod_tile configured in Apache2. I did configure it and now all the 'http://51.141.179.146/osm_tiles/7/20/43.png' type calls sent from the browser are successful. However, the map is still blank so now I'll start looking at the data in the Postgres database as I guess that missing/unreadable data may cause the tiles to display empty.

Alternatively, is it possible to enable logging in mod_tile so I can get an idea on what it does?

(30 Apr '20, 19:44) eugen_nw
showing 5 of 8 show 3 more comments

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×710
×31
×15

question asked: 25 Apr '20, 03:32

question was seen: 1,654 times

last updated: 04 May '20, 22:15

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum