I get an error related to socket communication: //var/run/renderd/renderd.sock, if I am a regular user, is everything working fine?

I am trying to manually create a map server according to the instructions on switch2osm.org. I set everything up. I have a mayank database owned by the mayank user and I'm trying to use renderd, but I cannot bind this connection to a socket: //var/run/renderd/renderd.sock. Now, if I switch to root and do the same, it will not have any problems with direct resolution, because I recursively changed the owner for the directories. But there may be some problems with intermediate resolution. I can not run it as root, since I use psql, and my owner for the mayank database is my user, and this leads to no fragments being renderd. And I do not want to reinstall my OS, but I seriously understand the cause of this problem. Please help, I'm new to openstreetmaps and Linux. Below are 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 indicated as root, but no fragments are generated by this process, probably due to the database

 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 
+4
source share
4 answers

I ran into almost the same problem as yours. As far as I can see, there can be two reasons for this. Please try again with

 sudo -u 'username' renderd -f -c /usr/local/etc/renderd.conf 

after applying one of the proposed solutions. Replace "username" for the username running renderd:

Reason # 1 No write permissions

You probably do not have write permissions to the /var/run/renderd/renderd.sock file.

A solution for you would change the owner of the directory:

 sudo chown 'username' /var/run/renderd 

and / or change the owner of the file by typing

 sudo chown 'username' /var/run/renderd/renderd.sock 

where "username" denotes the user who will run renderd.

Reason number 2 missing directory

I have an almost identical error message like you.

In my case, I was not in the / var / run / renderd directory . In my case, the solution was to create the / var / run / renderd directory and then change its owner:

 sudo mkdir /var/run/renderd sudo chown 'username' /var/run/renderd 

where "username" is the user who will runnng renderd.

+11
source

There seems to be a syntax error in your renderd.conf file. Just remove the end semicolon in renderd.conf to
;[renderd02]

A whole semicolon offers comments. Therefore, if you have not commented on this, there should not be a semicolon in front of it.

+1
source

All the tips I found here are correct. But I also needed to replace in /usr/local/etc/renderd.conf as follows:

 ;** config options used by mod_tile, but not renderd ** 

in it:

 ;xxx=** config options used by mod_tile, but not renderd ** 

It seems like the semicolon is considered as a comment, but the line that after it should still be applied to the key=value formula, otherwise you will get "

iniparser: syntax error in /usr/local/etc/renderd.conf

Or you can also delete this whole line (actually two lines, as it occurs there twice), as this is a comment anyway.

+1
source

permission error, just run:

 renderd -f -c /usr/local/etc/renderd.conf 
0
source

Source: https://habr.com/ru/post/1483721/


All Articles