Hello, I am using the instructions found at https://switch2osm.org/manually-building-a-tile-server-18-04-lts/ to setup a OSM mapping server. If the ubuntu user matches the postgresql user ( i.e. renderaccount) everything works without any problems. However, I would like to get stuff to work where the ubuntu user is XXX and the postgresql user remains renderaccount. I can get past most issues by:
However, when I am ready to startup the renderer by doing: renderd -f -c /usr/local/etc/renderd.conf I am presented with the errors:
I am assuming what is going on is that it is trying to talk to the database using the renderaccount user, but because there is a password, it cannot and does not try to look at the .pgpass file. This seems to be an issue with postgis... What might I need to change so the rendering system can use the specific user I specify? Regards, Willie asked 23 Sep '19, 13:07 Willie_H |
You might have to add the username and password to the XML style that is processed my mapnik/renderd, or if you prefer add it to the project.mml file before you execute the "carto" command to process that into an XML file. There's a "osm2pgsql" section near the start of the mml file that has database access information:
answered 23 Sep '19, 15:30 Frederik Ramm ♦ This is what that section currently looks like in the project.mml I am using...
where is this section documented? I am not certain what the keys should be.
(23 Sep '19, 15:48)
Willie_H
Ok. I was able to find the keys that one needed to use:
If you wanted to add this to your answer to make it complete, I will mark it as the answer.
(23 Sep '19, 16:10)
Willie_H
sorry for being imprecise, and glad you found it.
(23 Sep '19, 19:43)
Frederik Ramm ♦
Need one more detail. As it turns out, /etc/postgresql/10/main/pg_hba.conf needs to be edited as well to say:
(Although, I am not quite sure why this is necessary and it may mean (checked at the moment) that the password entry in the osm2pgsql section is unnecessary. Can you add that to your answer as well?
(23 Sep '19, 20:48)
Willie_H
|