I am trying to manually build a map server as per instructions on switch2osm.org. I have configured everything. I have a database mayank owned by user mayank and I am trying to use renderd but i get this error socket bind failed for: /var/run/renderd/renderd.sock. Now if i switch to root and do the same it runs perfectly no direct permission issues because i have changed the owner for the directories recursively. But there might be some intermediate permission issues. I can not run it as root since I am using psql and my owner for the database mayank is my user mayank and this results in no tiles being renderd. And i don't want to reinstall my os but seriously understand the reason for this problem. Please help I am new to openstreetmaps and Linux. Below is the exact codes for my process:
mayank@DC050:~$ renderd
socket bind failed for: /var/run/renderd/renderd.sock
mayank@DC050:~$ sudo renderd
sudo: /var/lib/sudo owned by uid 1000, should be uid 0
[sudo] password for mayank:
mayank@DC050:~$
mayank@DC050:~$ renderd -f -c /usr/local/etc/renderd.conf
renderd[9178]: Rendering daemon started
renderd[9178]: Initiating reqyest_queue
iniparser: syntax error in /usr/local/etc/renderd.conf (8):
-> ;[renderd01]
iniparser: syntax error in /usr/local/etc/renderd.conf (15):
-> ;[renderd02]
iniparser: syntax error in /usr/local/etc/renderd.conf (33):
-> ;** config options used by mod_tile, but not renderd **
iniparser: syntax error in /usr/local/etc/renderd.conf (42):
-> ;[style2]
iniparser: syntax error in /usr/local/etc/renderd.conf (49):
-> ;** config options used by mod_tile, but not renderd **
renderd[9178]: Parsing section renderd
renderd[9178]: Parsing render section 0
renderd[9178]: Parsing section mapnik
renderd[9178]: Parsing section default
renderd[9178]: config renderd: unix socketname=/var/run/renderd/renderd.sock
renderd[9178]: config renderd: num_threads=4
renderd[9178]: config renderd: num_slaves=0
renderd[9178]: config renderd: tile_dir=/var/lib/mod_tile
renderd[9178]: config renderd: stats_file=/var/run/renderd/renderd.stats
renderd[9178]: config mapnik: plugins_dir=/usr/local/lib/mapnik/input
renderd[9178]: config mapnik: font_dir=/usr/local/lib64/mapnik/fonts
renderd[9178]: config mapnik: font_dir_recurse=1
renderd[9178]: config renderd(0): Active
renderd[9178]: config renderd(0): unix socketname=/var/run/renderd/renderd.sock
renderd[9178]: config renderd(0): num_threads=4
renderd[9178]: config renderd(0): tile_dir=/var/lib/mod_tile
renderd[9178]: config renderd(0): stats_file=/var/run/renderd/renderd.stats
renderd[9178]: config map 0: name(default) file(/home/mayank/src/mapnik-style/osm.xml) uri(/osm_tiles/) htcp() host(localhost)
renderd[9178]: Initialising unix server socket on /var/run/renderd/renderd.sock
socket bind failed for: /var/run/renderd/renderd.sock
Below is as root but no tiles are generated by this process probably because of the database thing
renderd -f -c /usr/local/etc/renderd.conf
renderd[9347]: Rendering daemon started
renderd[9347]: Initiating reqyest_queue
iniparser: syntax error in /usr/local/etc/renderd.conf (8):
-> ;[renderd01]
iniparser: syntax error in /usr/local/etc/renderd.conf (15):
-> ;[renderd02]
iniparser: syntax error in /usr/local/etc/renderd.conf (33):
-> ;** config options used by mod_tile, but not renderd **
iniparser: syntax error in /usr/local/etc/renderd.conf (42):
-> ;[style2]
iniparser: syntax error in /usr/local/etc/renderd.conf (49):
-> ;** config options used by mod_tile, but not renderd **
renderd[9347]: Parsing section renderd
renderd[9347]: Parsing render section 0
renderd[9347]: Parsing section mapnik
renderd[9347]: Parsing section default
renderd[9347]: config renderd: unix socketname=/var/run/renderd/renderd.sock
renderd[9347]: config renderd: num_threads=4
renderd[9347]: config renderd: num_slaves=0
renderd[9347]: config renderd: tile_dir=/var/lib/mod_tile
renderd[9347]: config renderd: stats_file=/var/run/renderd/renderd.stats
renderd[9347]: config mapnik: plugins_dir=/usr/local/lib/mapnik/input
renderd[9347]: config mapnik: font_dir=/usr/local/lib64/mapnik/fonts
renderd[9347]: config mapnik: font_dir_recurse=1
renderd[9347]: config renderd(0): Active
renderd[9347]: config renderd(0): unix socketname=/var/run/renderd/renderd.sock
renderd[9347]: config renderd(0): num_threads=4
renderd[9347]: config renderd(0): tile_dir=/var/lib/mod_tile
renderd[9347]: config renderd(0): stats_file=/var/run/renderd/renderd.stats
renderd[9347]: config map 0: name(default) file(/home/mayank/src/mapnik-style/osm.xml) uri(/osm_tiles/) htcp() host(localhost)
renderd[9347]: Initialising unix server socket on /var/run/renderd/renderd.sock
renderd[9347]: Created server socket 5
renderd[9347]: Renderd is using mapnik version 2.0.3
renderd[9347]: Unable to open font directory: /usr/local/lib64/mapnik/fonts
Running in foreground mode...
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[9347]: Starting stats thread
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[9347]: Using web mercator projection settings
renderd[9347]: Using web mercator projection settings
renderd[9347]: Using web mercator projection settings
renderd[9347]: Using web mercator projection settings