1

Hi All,

I tried to set MapServer (http://switch2osm.org/serving-tiles/manually-building-a-tile-server-12-04/), the only change was that I replaced planet map with india map (with the same name as planet_osm.pbf).

I did all the steps as explained, once rendered and restarted the apache server...on accessing http://localhost/osm_tiles/0/0/0.png is giving me NOT FOUND ERROR.

When I run "renderd -f -c /usr/local/etc/renderd.conf" I am getting the following console output

sanal@sanal-virtual-machine:~/src/mapnik-style/inc$ renderd -f -c /usr/local/etc/renderd.conf
    renderd[25743]: Rendering daemon started
    renderd[25743]: Initiating reqyest_queue
    renderd[25743]: Parsing section renderd
    renderd[25743]: Parsing render section 0
    renderd[25743]: Parsing section renderd01
    renderd[25743]: Parsing render section 1
    renderd[25743]: Parsing section renderd02
    renderd[25743]: Parsing render section 2
    renderd[25743]: Parsing section mapnik
    renderd[25743]: Parsing section default
    renderd[25743]: Parsing section style2
    renderd[25743]: config renderd: unix socketname=/var/run/renderd/renderd.sock
    renderd[25743]: config renderd: num_threads=4
    renderd[25743]: config renderd: num_slaves=8
    renderd[25743]: config renderd: tile_dir=/var/lib/mod_tile
    renderd[25743]: config renderd: stats_file=/var/run/renderd/renderd.stats
    renderd[25743]: config mapnik:  plugins_dir=/usr/local/lib/mapnik/input
    renderd[25743]: config mapnik:  font_dir=/usr/share/fonts/truetype/ttf-dejavu
    renderd[25743]: config mapnik:  font_dir_recurse=1
    renderd[25743]: config renderd(0): Active
    renderd[25743]: config renderd(0): unix socketname=/var/run/renderd/renderd.sock
    renderd[25743]: config renderd(0): num_threads=4
    renderd[25743]: config renderd(0): tile_dir=/var/lib/mod_tile
    renderd[25743]: config renderd(0): stats_file=/var/run/renderd/renderd.stats
    renderd[25743]: config renderd(1): unix socketname=/var/run/renderd/renderd.sock
    renderd[25743]: config renderd(1): num_threads=4
    renderd[25743]: config renderd(1): tile_dir=/var/lib/mod_tile
    renderd[25743]: config renderd(1): stats_file=(null)
    renderd[25743]: config renderd(2): unix socketname=/var/run/renderd/renderd.sock
    renderd[25743]: config renderd(2): num_threads=4
    renderd[25743]: config renderd(2): tile_dir=/var/lib/mod_tile
    renderd[25743]: config renderd(2): stats_file=(null)
    renderd[25743]: config map 0:   name(default) file(/home/sanal/src/mapnik-style/osm.xml) uri(/osm_tiles/) htcp() host(localhost)
    renderd[25743]: config map 1:   name(style2) file() uri() htcp() host()
    renderd[25743]: Initialising unix server socket on /var/run/renderd/renderd.sock
    renderd[25743]: Created server socket 5
    renderd[25743]: Renderd is using mapnik version 3.0.0
    renderd[25743]: DEBUG: Loading font: /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansCondensed-Bold.ttf
    renderd[25743]: DEBUG: Loading font: /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Oblique.ttf
    renderd[25743]: DEBUG: Loading font: /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf
    renderd[25743]: DEBUG: Loading font: /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono-Oblique.ttf
    renderd[25743]: DEBUG: Loading font: /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf
    renderd[25743]: DEBUG: Loading font: /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf
    renderd[25743]: DEBUG: Loading font: /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansCondensed-BoldOblique.ttf
    renderd[25743]: DEBUG: Loading font: /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-ExtraLight.ttf
    renderd[25743]: DEBUG: Loading font: /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerifCondensed-BoldItalic.ttf
    renderd[25743]: DEBUG: Loading font: /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono-Bold.ttf
    renderd[25743]: DEBUG: Loading font: /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif-Bold.ttf
    renderd[25743]: DEBUG: Loading font: /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerifCondensed-Italic.ttf
    renderd[25743]: DEBUG: Loading font: /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-BoldOblique.ttf
    renderd[25743]: DEBUG: Loading font: /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerifCondensed-Bold.ttf
    renderd[25743]: DEBUG: Loading font: /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerifCondensed.ttf
    renderd[25743]: DEBUG: Loading font: /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif-Italic.ttf
    renderd[25743]: DEBUG: Loading font: /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono-BoldOblique.ttf
    renderd[25743]: DEBUG: Loading font: /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansCondensed.ttf
    renderd[25743]: DEBUG: Loading font: /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf
    renderd[25743]: DEBUG: Loading font: /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif-BoldItalic.ttf
    renderd[25743]: DEBUG: Loading font: /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansCondensed-Oblique.ttf
    Running in foreground mode...
    renderd[25743]: Starting stats thread
    renderd[25743]: Initialising unix client socket on /var/run/renderd/renderd.sock
    renderd[25743]: socket /var/run/renderd/renderd.sock initialised to fd 6
    renderd[25743]: Initialising unix client socket on /var/run/renderd/renderd.sock
    debug: init_storage_backend: initialising file storage backend at: /var/lib/mod_tile
    renderd[25743]: Initialising unix client socket on /var/run/renderd/renderd.sock
    renderd[25743]: socket /var/run/renderd/renderd.sock initialised to fd 7
    renderd[25743]: socket /var/run/renderd/renderd.sock initialised to fd 8
    debug: init_storage_backend: initialising file storage backend at: /var/lib/mod_tile
    debug: init_storage_backend: initialising file storage backend at: /var/lib/mod_tile
    debug: init_storage_backend: initialising file storage backend at: /var/lib/mod_tile
    renderd[25743]: Initialising unix client socket on /var/run/renderd/renderd.sock
    renderd[25743]: socket /var/run/renderd/renderd.sock initialised to fd 9
    renderd[25743]: Initialising unix client socket on /var/run/renderd/renderd.sock
    renderd[25743]: socket /var/run/renderd/renderd.sock initialised to fd 10
    renderd[25743]: Initialising unix client socket on /var/run/renderd/renderd.sock
    renderd[25743]: socket /var/run/renderd/renderd.sock initialised to fd 11
    renderd[25743]: DEBUG: Got incoming connection, fd 14, number 1
    renderd[25743]: DEBUG: Got incoming connection, fd 15, number 2
    renderd[25743]: DEBUG: Got incoming connection, fd 16, number 3
    renderd[25743]: DEBUG: Got incoming connection, fd 17, number 4
    renderd[25743]: Initialising unix client socket on /var/run/renderd/renderd.sock
    renderd[25743]: DEBUG: Got incoming connection, fd 18, number 5
    renderd[25743]: DEBUG: Got incoming connection, fd 20, number 6
    renderd[25743]: socket /var/run/renderd/renderd.sock initialised to fd 19
    renderd[25743]: DEBUG: Got incoming connection, fd 21, number 7
    renderd[25743]: Initialising unix client socket on /var/run/renderd/renderd.sock
    renderd[25743]: socket /var/run/renderd/renderd.sock initialised to fd 22
    renderd[25743]: DEBUG: Got incoming connection, fd 23, number 8
    renderd[25743]: Using web mercator projection settings
    renderd[25743]: Using web mercator projection settings
    renderd[25743]: Using web mercator projection settings
    renderd[25743]: Using web mercator projection settings

    > Blockquote
    > 
    > Blockquote

and when I restarted apache server it gave me this

    sanal@sanal-virtual-machine:/var/lib$ sudo /etc/init.d/apache2 restart
 * Restarting web server apache2                                                                                         [Wed Jun 12 16:21:35 2013] [warn] module tile_module is already loaded, skipping
[Wed Jun 12 16:21:35 2013] [warn] Could not determine host name of server to configure tile-json request. Using localhost instead
[Wed Jun 12 16:21:35 2013] [notice] Loading tile config default at /osm_tiles/ for zooms 0 - 20 from tile directory /var/lib/mod_tile with extension .png and mime type image/png
[Wed Jun 12 16:21:35 2013] [warn] Could not determine host name of server to configure tile-json request. Using localhost instead
[Wed Jun 12 16:21:35 2013] [notice] Loading tile config style2 at  for zooms 0 - 20 from tile directory /var/lib/mod_tile with extension .png and mime type image/png
 ... waiting .[Wed Jun 12 16:21:37 2013] [warn] module tile_module is already loaded, skipping
[Wed Jun 12 16:21:37 2013] [warn] Could not determine host name of server to configure tile-json request. Using localhost instead
[Wed Jun 12 16:21:37 2013] [notice] Loading tile config default at /osm_tiles/ for zooms 0 - 20 from tile directory /var/lib/mod_tile with extension .png and mime type image/png
[Wed Jun 12 16:21:37 2013] [warn] Could not determine host name of server to configure tile-json request. Using localhost instead
[Wed Jun 12 16:21:37 2013] [notice] Loading tile config style2 at  for zooms 0 - 20 from tile directory /var/lib/mod_tile with extension .png and mime type image/png

and my renderd.conf file contents is below

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

[renderd01]
;iphostname=::1
;ipport=7654
;num_threads=4
;tile_dir=rados://tiles/etc/ceph/ceph.conf
;stats_file=/var/run/renderd/renderd.stats

[renderd02]
;iphostname=::1
;ipport=7654
;num_threads=8
;tile_dir=memcached://
;stats_file=/var/run/renderd/renderd.stats

[mapnik]
plugins_dir=/usr/local/lib/mapnik/input
font_dir=/usr/share/fonts/truetype/ttf-dejavu
font_dir_recurse=1

[default]
URI=/osm_tiles/
TILEDIR=/var/lib/mod_tile
XML=/home/sanal/src/mapnik-style/osm.xml
HOST=localhost
TILESIZE=256
;HTCPHOST=proxy.openstreetmap.org
;MINZOOM=0
;MAXZOOM=18
;TYPE=png image/png
;DESCRIPTION=This is a description of the tile layer used in the tile json request
;ATTRIBUTION=&copy;<a href=\"http://www.openstreetmap.org/\">OpenStreetMap</a> and <a href=\"http://wiki.openstreetmap.org/wiki/Contributors\">contributors</a>, <a href=\"http://opendatacommons.org/licenses/odbl/\">ODbL</a>
;SERVER_ALIAS=http://localhost/
;CORS=http://www.openstreetmap.org

[style2]
;URI=/osm_tiles2/
;TILEDIR=rados://tiles/etc/ceph/ceph.conf
;TILESIZE=512
;XML=/home/jburgess/osm/svn.openstreetmap.org/applications/rendering/mapnik/osm-local2.xml
;HOST=tile.openstreetmap.org
;HTCPHOST=proxy.openstreetmap.org
;MINZOOM=0
;MAXZOOM=22
;TYPE=png image/png
;DESCRIPTION=This is a description of the tile layer used in the tile json request
;ATTRIBUTION=&copy;<a href=\"http://www.openstreetmap.org/\">OpenStreetMap</a> and <a href=\"http://wiki.openstreetmap.org/wiki/Contributors\">contributors</a>, <a href=\"http://opendatacommons.org/licenses/odbl/\">ODbL</a>
;SERVER_ALIAS=http://localhost/
;CORS=*

Please help me in fixing this...thanks in advance

asked 12 Jun '13, 12:02

Sanal's gravatar image

Sanal
16111
accept rate: 0%

What does "ls -al /var/lib/mod_tile/" return?

(12 Jun '13, 12:04) SomeoneElse ♦

I have changed the permissions of mod_tile drwxrwxrwx 2 sanal root 4096 Jun 12 10:54 mod_tile

(12 Jun '13, 12:14) Sanal

That should allow you to write to it, sure! For info what you should see in the renderd debug output in response to browsing to http://yourserveraddress/osm_tiles/0/0/0.png is something like:

renderd[16245]: Using web mercator projection settings
renderd[16245]: Using web mercator projection settings
renderd[16245]: Using web mercator projection settings
renderd[16245]: Using web mercator projection settings
renderd[16245]: DEBUG: Got incoming connection, fd 12, number 1
renderd[16245]: DEBUG: Got command Render fd(12) xml(default), z(0), x(0), y(0)
renderd[16245]: DEBUG: START TILE default 0 0-0 0-0, age 19.84 days
renderd[16245]: DEBUG: Connection 0, fd 12 closed, now 0 left
renderd[16245]: DEBUG: DONE TILE default 0 0-0 0-0 in 5.732 seconds
debug: Creating and writing a metatile to /var/lib/mod_tile/default/0/0/0/0/0/0.meta
(12 Jun '13, 12:22) SomeoneElse ♦

@SomeoneElse

This is the output to

sanal@sanal-virtual-machine:~$ ls -al /var/lib/mod_tile/
total 8
drwxrwxrwx  2 sanal root 4096 Jun 12 10:54 .
drwxr-xr-x 65 root  root 4096 Jun 12 13:19
(13 Jun '13, 04:25) Sanal

on render the output is

renderd[13603]: Using web mercator projection settings
renderd[13603]: Using web mercator projection settings
renderd[13603]: Using web mercator projection settings
renderd[13603]: DEBUG: Got incoming connection, fd 25, number 9
renderd[13603]: DEBUG: Got command RenderPrio fd(25) xml(default), z(0), x(0), y(0)
renderd[13603]: Dispatching request to slave thread on fd 6
renderd[13603]: DEBUG: Got command Render fd(14) xml(default), z(0), x(0), y(0)
renderd[13603]: DEBUG: Connection 8, fd 25 closed, now 8 left
(13 Jun '13, 04:26) Sanal

Unfortunately, the next step is probably to try and add some more debug to the rendering code to try and see what's not working.

Even if you're not a C programmer this needn't be too scary since you should be able to copy some of the existing debug messages, and the "make" instructions are contained on the switch2osm page.

(20 Jun '13, 13:04) SomeoneElse ♦

I m also facing the same problem someone please answer this question

(02 Aug '13, 06:52) san

i am also having same problem, i did every thing as given in http://switch2osm.org/serving-tiles/manually-building-a-tile-server-12-04/ help me to get out of this issue

(12 Feb '14, 12:30) Arun kmp
showing 5 of 8 show 3 more comments

3 Answers:
0

I followed tutorial on osm2switch and installed the server on ubuntu 11.10. but I am also getting the similar problem No output is shown on http://localhost/osm_tiles/0/0/0.png. But fortunately maps are available on localhost/osm/slippymap.html page.

Can any body resolve this problem

permanent link

answered 04 Sep '13, 05:15

SUKHJIT%20SINGH%20SEHRA's gravatar image

SUKHJIT SING...
261
accept rate: 0%

0

I was having this problem too, but I think I've found the solution.

The problem is that the tiles are being generated as http://localhost/osm_tiles/0/0/0.png. Of course localhost is translated to the machine you're browsing from, so what that should be is http://tile.mytileserver.org/osm_tiles/0/0/0.png or http://10.10.10.10/osm_tiles/0/0/0.png.

So first thing to do is to set your hostname. I used tile.mytileserver.org eg nano /etc/hostname -> tile.mytileserver.org hostname -F /etc/hostname nano /etc/hosts -> tile.mytileserver.org

Then change the value for <paraeter name="host"></parameter> in /etc/mapnik-osm-data/inc/datasource-settings.xml.inc

If you're using slippymap.html, open that at /var/www/osm/slippymap.html and change localhost to tile.mytileserver.org

Previously I tried changing the HOST parameter in /etc/renderd.conf and the Server parameter in /etc/apache2/sites-enabled/tileserver-site so if the above doesn't work, you might want to look at those too.

permanent link

answered 01 Nov '13, 04:06

Plutocrat's gravatar image

Plutocrat
11
accept rate: 0%

edited 01 Nov '13, 04:26

0

No one have an answer for this question... so many threads, no answer.

permanent link

answered 17 May '14, 06:55

alexlana's gravatar image

alexlana
1
accept rate: 0%

1

There are a large number of possible reasons why it might not work: software versions in different distributions, permissions in various places, missing fonts (depending on machine setup), possible apache issues such as the one that @Plutocrat above mentioned, and more.

It's probably easiest to create a wiki page behind your user page describing what you've done, what you've tried and what still doesn't work, and then asking on IRC (#osm should have people with some experience of tile server setup; if it doesn't then try #osm=dev).

(17 May '14, 10:11) SomeoneElse ♦

Yes, it can be anything. The problem is that I am not a programer, and this issue took me all my week and weekend, my nights... it's a beautiful project, but it's useless for designers, business people, someone looking for fun... and it's only because nobody think about the layer that reach non-programers. All what I need is some healthy image to download and use on Virtualbox... like that: http://tek.io/1ge1kuq

Sorry if it is not the right place for post that, but after dozens of installations, searches on google, Virtualbox snapshots, log reads... I quit...

(18 May '14, 08:23) alexlana

@alexlana - the reason why I suggested IRC is that it allows faster communication with people trying to help. Asking here is not wrong, (better as a new question than as an "answer" to a previous one though) but it wouldn't be as fast a conversation.

However, we don't actually know what your problem is yet (beyond "it doesn't work"). That's why I suggested putting some details together explaining it.

(18 May '14, 10:46) SomeoneElse ♦

powered by OSQA