Mapnik: 'Peer authentication failed for user "www-data"'

Hello dear OSMappers,

I’m building own tile server on Ubuntu 12.04 with instructions from Importing the data with osm2pgsql ran without any authentication error(s).

But renderd fails to start:

$ renderd -f -c /etc/renderd.conf
renderd[5116]: Rendering daemon started
renderd[5116]: Parsing section renderd
[...more logging...]
renderd[5116]: DEBUG: Loading font: /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf
Running in foreground mode...
renderd[5116]: Starting stats thread
renderd[5116]: An error occurred while loading the map layer 'default': :
FATAL:  Peer authentication failed for user "www-data" (encountered during parsing of layer 'landcover' in map '/etc/mapnik-osm-data/osm.xml')

I see that the “offending” layer is not the first one in osm.xml:


Thanks for any insight.
Edit: title updated

…and I see that this is not error of renderd, but of mapnik (conclude so because the error string is not present in renderd binary, but in mapnik library). Should update the title. Help still wanted :slight_smile:

It’s nice to talk to self :laughing: Problem solved.
User “www-data” is configured in /etc/mapnik-osm-data/inc/, after replacing it with the username which was configured for postgresql, “everything works”. Well not absolutely everything but no this error at least! :slight_smile:

I got the same error, but I builded the tile-server manually. In my case, the solution was not only to change the username. I had also to uncomment the line where host is defined, so that the line looks as following:


Hope that this helps someone.