I have been trying to get renderd to run but I can't get past this error:
I have even tried to create the folder /var/lib/mod_tile/default, but no luck. Any ideas? asked 11 Dec '16, 12:25 Luke16 SomeoneElse ♦ |
Apparently some file or directory that renderd wants to access is not readable for the user you're running it under (the user "postgres", I gather from your comment above). You can debug this further by installing (if not already present) the "strace" utility and then running
this will log all system calls the program makes; before it aborts with the error message, you will likely see something that looks a bit like
which then tells you which file or directory renderd tried to open and couldn't. Then fix permissions or ownership accordingly. Note that not all errors in a A general comment on your running renderd under the "postgres" user: it would be better to create a new Unix user (eg "osm" or "renderd") to run renderd under and ensure that that user has access to the PostgreSQL database (eg answered 11 Dec '16, 23:53 Frederik Ramm ♦ 1
It seems to be a problem with the database actually. This is a snippet of the dtruss (since strace is not available on macOS): Dec 12 12:21:54 renderd[55477] <error>: An error occurred while loading the map layer 'default': Postgis Plugin: timeout expired Connection string: ' dbname=gis connect_timeout=4' encountered during parsing of layer 'landuse_gen0' in Layer of '/usr/local/share/maps/style/OSMBright/OSMBright.xml' But I have no idea how to make sure if the script is able to access the database and/or check its DB connection configuration. PS: I am aware that I should have created a user the task, but, for now, I want it to work first.
(12 Dec '16, 14:33)
Luke16
1
After a system restart it seems to have worked but now I can't get Apache2 to run the mod_tile module. It crashes. When I built it from source I saw that it was pointing to the wrong installation of Apache2. It was using the /usr/libexec/apache2 and /usr/include/apache2. I thought that it would not interfere since I could just copy the mod_tile.so library to the correct running location of apache2. How does it solve the path for the apache2 installation? How can I change it? I have tried changing the order in the configure.ac file: AC_CHECK_PROGS(APXS, /opt/local/apache2/bin/apxs , reject) but then the ./configure won't complete. checking for /opt/local/apache2/bin/apxs... no even though it exists, is readable and executable by everyone.
(13 Dec '16, 10:02)
Luke16
2
Finally! The problem was really at the configure.ac file where the function AC_CHECK_PROGS just could not actually find the existing /opt/local/apache2/bin/apxs. Since /opt/local/bin is the first one on the $PATH, I had to pass ../apache2/bin/apxs as a parameter. Because, later on ../apache2/bin/apxs does not mean anything I also changed to the AC_CHECK_PROG function, which only accepts one parameter, but allows to return a different one as a result: AC_CHECK_PROG(APXS, [../apache2/bin/apxs], [/opt/local/apache2/bin/apxs], reject)
(13 Dec '16, 14:51)
Luke16
|
What file permissions does /var/lib/mod_tile have currently and what user are you running the above as?
The folder and its underlying files and folders are owned by user postgres:
drwxr-xr-x 4 postgres wheel 136 Dec 11 10:04 mod_tile
drwxr-xr-x 2 postgres wheel 68 Dec 11 10:04 default
and the command is run as:
sudo -u postgres renderd -f -c /usr/local/etc/renderd.conf