Hi all,

I'm working on setting up a tile server and I've gotten everything to work except mod_tile. renderd works fine, I'm able to pre-render with render_all and I can see the queries in the query logs in the database. I was also able to use the generate_img.py in mapnik and the image was good. The one part I havent been able to get to work is being able to view through apache. When I go to http://url/mod_tile/ I get what is expected, but if i do something like /mod_url/0/0/0.png it says the image cant be displayed because it contains a error. When I setup slippymap.html it shows pink tiles and I see nothing in the database query log. Any pointers to what the issue is would be greatly appreciated. I'm running CentOS7.

asked 04 May '15, 21:26

Root's gravatar image

accept rate: 0%

Monitor rendering activity while accessing tiles. If there is activity then mod_tile gets the request through to renderd but the finished tile is somehow not saved or the return message does not reach mod_tile in time. If there is no rendering activity (perhaps also error messages in Apache's error log) then mod_tile cannot access the renderd socket. This can be a side effect of SELinux and perhaps the quick fix is as easy as "disable SELinux" (even though more fine grained approaches exist).

permanent link

answered 04 May '15, 21:35

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
accept rate: 24%

Thanks for your quick reply! I dont see anything when running renderd in the foreground and then accessing slippymap.html or trying to access /mod_tile/0/0/0.png. SELinux is disabled. The apache logs dont show anything I see as useful when accessing either url....

(04 May '15, 21:56) Root

The problem ended up being that you cant use /mod_tile in renderd.conf for the URI. /mod_tile is already taken by the mod_tile stats and it ended up creating a conflict. I found this out by changing the tile.conf line "ModTileEnableStats On" to off and then went to /mod_tile/0/0/0.png. A error in the logs said the stats were off and I figured it out from there. Thanks to Andy Allan for kinda pointing me in that direction.

permanent link

answered 05 May '15, 21:34

Root's gravatar image

accept rate: 0%

Are you sure that your URLs are correct? Check that the url matches whatever is set in renderd.conf for your style, for example, http://url/openstreetmap/0/0/0.png - it's normally the name of the stylesheet, rather than "mod_tile", when requesting images.

permanent link

answered 05 May '15, 08:53

Andy%20Allan's gravatar image

Andy Allan
accept rate: 29%

Not sure what you mean here? My renderd.conf is fairly simple but maybe I'm doing something wrong?

[renderd] socketname=/var/run/renderd/renderd.sock num_threads=4 tile_dir=/var/lib/mod_tile stats_file=/var/run/renderd/renderd.stats

[default] URI=/mod_tile/ TILEDIR=/data/tiles XML=/root/install/mapnik-v2.2.0/src/mapnik-style/osm.xml TILESIZE=256 HOST=localhost

[mapnik] plugins_dir=/usr/local/lib/mapnik/input font_dir=/usr/local/lib/mapnik/fonts font_dir_recurse=1

(05 May '15, 15:21) Root
Your answer
toggle preview

Follow this question

By Email:

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



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:


question asked: 04 May '15, 21:26

question was seen: 4,171 times

last updated: 05 May '15, 21:34

powered by OSQA