1

Iḿ trying to get a local tile server running. Using this guide . Iḿ pretty much at the end of the guide but using the render command it fails.

user:/usr/local/etc$ sudo -u username renderd -f -c /usr/local/etc/renderd.conf
renderd[9849]: Rendering daemon started
renderd[9849]: Initiating reqyest_queue
renderd[9849]: Parsing section renderd
renderd[9849]: Parsing render section 0
renderd[9849]: Parsing section mapnik
renderd[9849]: Parsing section default
renderd[9849]: config renderd: unix socketname=/var/run/renderd/renderd.sock
renderd[9849]: config renderd: num_threads=4
renderd[9849]: config renderd: num_slaves=0
renderd[9849]: config renderd: tile_dir=/var/lib/mod_tile
renderd[9849]: config renderd: stats_file=/var/run/renderd/renderd.stats
renderd[9849]: config mapnik:  plugins_dir=/usr/local/lib/mapnik/input
renderd[9849]: config mapnik:  font_dir=/usr/share/fonts/truetype/ttf-dejavu
renderd[9849]: config mapnik:  font_dir_recurse=1
renderd[9849]: config renderd(0): Active
renderd[9849]: config renderd(0): unix socketname=/var/run/renderd/renderd.sock
renderd[9849]: config renderd(0): num_threads=4
renderd[9849]: config renderd(0): tile_dir=/var/lib/mod_tile
renderd[9849]: config renderd(0): stats_file=/var/run/renderd/renderd.stats
renderd[9849]: config map 0:   name(default) file(/usr/local/share/maps/style/OSMBright/OSMBright.xml) uri(/osm_tiles/) htcp() host(localhost)
renderd[9849]: Initialising unix server socket on /var/run/renderd/renderd.sock
socket bind failed for: /var/run/renderd/renderd.sock

I searched for the "socket bind failed for: /var/run/renderd/renderd.sock" problem quite a while in the INTERNET to find a solution for it, but, although I could find some people with similar problems the solutions for their case didn't apply to me.

So here are some hints for my situation:

  1. The folder "/var/run/renderd/" exist and my user has the right to access it.

  2. My renderd.conf file is also accessible for my user, it also should be properly configured but to be sure here is the code of it:

renderd.conf

[renderd]
socketname=/var/run/renderd/renderd.sock
num_threads=4
tile_dir=/var/lib/mod_tile
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=/usr/local/share/maps/style/OSMBright/OSMBright.xml
HOST=localhost
TILESIZE=256
  1. I think its somehow a "rights to access" issue because on the command:

user:/usr/local/etc$ sudo renderd -f

[sudo] password for user: 
renderd[11904]: Rendering daemon started
renderd[11904]: Initiating reqyest_queue
iniparser: cannot open /etc/renderd.conf

It can somehow not open the file even trough I double checked it, folder and file are access able to the user

If anyone has any ideas or questions , any input is welcome!

Tharif
  • 13,794
  • 9
  • 55
  • 77
rocko17
  • 11
  • 1
  • 4

3 Answers3

1

This is a permissions issue. I had the same issue, which was based on the Install PostgreSQL and PostGIS, specifically, the add user and grant access to gis DB.

You must add the user that the server was created under, then grant all privileges. Once I made this change, I restarted the server, and it worked great!

0

I fixed this by copying my renderd.conf file to /etc. My renderd.conf was in /usr/local/etc.

Richard Erickson
  • 2,568
  • 8
  • 26
  • 39
Divya Konda
  • 1,427
  • 2
  • 10
  • 11
-1

Make sure the directory for /var/run/renderd/renderd.sock exists and has write permissions for the user running renderd as per https://stackoverflow.com/a/28884976/1860663

Community
  • 1
  • 1
Pocketsand
  • 1,261
  • 10
  • 15