1

I am trying to build a custom map server tile server by following this tutorial on switch2osm.

Instead of using ubuntu as described in the tutorial, I am using docker for everything (postgis, apache, etc)

I am trying to build an image where apache and renderd are configured (I followed the instructions found here)

Here is my Dockerfile :

FROM httpd:2.4

RUN apt-get update && \
  apt-get install -y libapache2-mod-tile renderd

 RUN a2enmod tile
 RUN a2enconf renderd

 CMD ["renderd", "-f", "&&", "httpd-foreground"]

I keep having this error after building and creating the container :

renderd[1]: Initialising unix server socket on /run/renderd/renderd.sock
socket bind failed for: /run/renderd/renderd.sock

I know that's a user right issue but I dont see how to fix it.

Please can anyone help me solves this issue ?

Dimitri
  • 8,122
  • 19
  • 71
  • 128

1 Answers1

3

I saw the same problem. I've partially resolved it by changing the owner of /run/renderd via sudo chown -R osm:osm /run/renderd

Then restarting the renderd process.

I've further tried (and failed) to make this permanent by modifying the file: /etc/systemd/system/multi-user.target.wants/renderd.service and specify the user there as well

[Service] ExecStart=/usr/bin/renderd -f User=osm

I do believe the above 'fix' has worked in the past, but doesn't seem to work now on Ubuntu 22.04

An addition to Roger Hellman's answer:

To make this permanent on Ubuntu 22.04 change the owner _renderd of /run/renderd to osm in the file /usr/lib/tmpfiles.d/renderd.conf.