socket connect failed for: /var/run/renderd/renderd.sock

Please help. I spent a lot of time trying to fix the issue explained below.

My OS is Unbuntu 10.04. I am trying to setup mod_tile. I installed postgresql, postgis, mapnik, osm2pgsql, apache2 and importer osm data to postgis using osm2pgsql. generate_image.py and generate_tiles.py are working ok. I setup mod_tile. But when I am trying to go to the following URL: http://tile.osm.org/osm_tiles2/0/0/0.png, I am getting 404 error (file not found).

The log file of apache (/var/log/apaches/errors.log) contains the following:

[Sun Jul 11 22:32:26 2010] [info] [client 127.0.1.1] tile_translate: uri(/osm_tiles2/0/0/0.png)
[Sun Jul 11 22:32:26 2010] [info] [client 127.0.1.1] tile_translate: baseuri(/osm_tiles2/) name(default)
[Sun Jul 11 22:32:26 2010] [info] [client 127.0.1.1] tile_translate: op(tile_serve) xml(default) z(0) x(0) y(0)
[Sun Jul 11 22:32:26 2010] [info] [client 127.0.1.1] tile_storage_hook: handler(tile_serve), uri(/osm_tiles2/0/0/0.png), filename(/var/lib/mod_tile/default/0/0/0/0/0/0.meta), path_info((null))
[Sun Jul 11 22:32:26 2010] [warn] [client 127.0.1.1] socket connect failed for: /var/run/renderd/renderd.sock
[Sun Jul 11 22:32:26 2010] [info] [client 127.0.1.1] Failed to connect to renderer
[Sun Jul 11 22:32:26 2010] [debug] mod_deflate.c(615): [client 127.0.1.1] Zlib: Compressed 296 to 226 : URL /osm_tiles2/0/0/0.png
[Sun Jul 11 22:38:54 2010] [info] [client 127.0.1.1] tile_translate: uri(/osm_tiles2/0/0/0.png)
[Sun Jul 11 22:38:54 2010] [info] [client 127.0.1.1] tile_translate: baseuri(/osm_tiles2/) name(default)
[Sun Jul 11 22:38:54 2010] [info] [client 127.0.1.1] tile_translate: op(tile_serve) xml(default) z(0) x(0) y(0)
[Sun Jul 11 22:38:54 2010] [info] [client 127.0.1.1] tile_storage_hook: handler(tile_serve), uri(/osm_tiles2/0/0/0.png), filename(/var/lib/mod_tile/default/0/0/0/0/0/0.meta), path_info((null))
[Sun Jul 11 22:38:54 2010] [warn] [client 127.0.1.1] socket connect failed for: /var/run/renderd/renderd.sock
[Sun Jul 11 22:38:54 2010] [info] [client 127.0.1.1] Failed to connect to renderer
[Sun Jul 11 22:38:54 2010] [debug] mod_deflate.c(615): [client 127.0.1.1] Zlib: Compressed 296 to 226 : URL /osm_tiles2/0/0/0.png

How to fix the “socket connect failed for: /var/run/renderd/renderd.sock… Failed to connect to renderer” issue? I checked, the /var/run/renderd/ folder is empty. What is the “renderd.sock” and how to install it?

here is renderd.conf file:
[renderd]
;socketname=/var/run/renderd/renderd.sock
num_threads=4
tile_dir=/var/lib/mod_tile ; DOES NOT WORK YET
stats_file=/var/run/renderd/renderd.stats

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

[default]
URI=/osm_tiles2/
XML=/home/vitaliy/bin/mapnik/osm.xml
HOST=tile.osm.org
;HTCPHOST=proxy.openstreetmap.org

The /etc/apache2/sites-available/tile.osm.org configuration file contains the following:

LoadModule tile_module /usr/lib/apache2/modules/mod_tile.so
<VirtualHost *:80>
ServerName tile.osm.org
ServerAlias a.tile.osm.org b.tile.osm.org c.tile.osm.org d.tile.osm.org
DocumentRoot /var/www/html
LoadTileConfigFile /etc/renderd.conf
ModTileRequestTimeout 3
ModTileMissingRequestTimeout 10
ModTileMaxLoadOld 2
ModTileMaxLoadMissing 5
ModTileRenderdSocketName /var/run/renderd/renderd.sock
ModTileCacheDurationMax 604800
ModTileCacheDurationDirty 900
ModTileCacheDurationMinimum 10800
ModTileCacheDurationMediumZoom 13 86400
ModTileCacheDurationLowZoom 9 518400
ModTileCacheLastModifiedFactor 0.20
LogLevel debug

I added the following to /etc/hosts file:
127.0.1.1 tile.osm.org www.tile.osm.org a.tile.osm.org

Thank you for any help.

Quite old post but … isn’t localhost 127.0.0.1 not 127.0.1.1 ?

Renderd started working on a VM when I removed the semicolon from renderd.conf, the start of the line that refers to that renderd.sock file. I didn’t do anything to specifically create it, so make or renderd itself creates it.