Having HUGE problems setting up Open Street Maps on my Ubuntu 14.04 setup.
All the software is up to date and is kept up to date, so obsolete software is not a problem. All dependencies were installed after a bit of a wrestling match with libgdal and how the multiple versions are forking annoying.
I initially (4 days ago) started with the tutorial http://switch2osm.org/serving-tiles/manually-building-a-tile-server-12-04/ . I was able to get everything to compile error free and get Mapnik going to generate_image.py and such by following the instructions from switch2osm to set up all access in the PostgreSQL “gis” database to my local user account (astump) as well as setting the owner of the gis database to my user account, making a minor adjustment as apache2 no longer uses the conf.d folder and instead uses mods-enabled/mod_tile.load – and a similar minor nuisance as /etc/apache2/sites-available/default is now known as /etc/apache2/sites-available/000-default.conf
I was able to get /etc/init.d/renderd to start and not produce any errors other than the ones because some lines are commented out on purpose. Yay!
Problem is – upon visiting http://localhost/osm_tiles/0/0/0.png I only saw a “Page not found” error. Pulling up the tiles in the freely available Slippytile pointing them to localhost gives image not found boxes, as well.
So I found another great tutorial at http://seshagiriprabhu.wordpress.com/2013/07/21/building-an-openstreetmap-tile-server-on-ubuntu-12-04-lts/ and after uninstalling everything, and reinstalling everything, and uninstalled everything again, over about 5 times and per the tutorial and everything I read online, decided to use all the steps from the switch2osm tutorial but change the user to www-data per the 2nd tutorial changing the owner to “www-data” on all tables in postgres gis database, as well as chown –R www-data /var/run/renderd and /var/lib/mod_tile I was able to get the command “ sudo –u www-data renderd –f –c /usr/local/etc/renderd.conf “ to run flawlessly.
First immediate problem is /var/run/ apparently resets permissions on every reboot, so the sudo chown www-data -R that was ran on /var/run/renderd was lost upon reboot. So I had to change this again after rebooting, and again, it worked but no tiles found, etc.
What sucks is because renderd even with –f on, shows no errors – I have no idea what is going wrong. Apache’s error & access logs are not giving any hints, either. And further – when I run the initial /etc/init.d/renderd service (under my account as that is what it inherits) – it produces no errors, either!
Here are config file snippets that are applicable – not sure if I missed something obvious or not:
#####HIDDEN BUT SET######
ServerAdmin webmaster@localhost DocumentRoot /var/www LoadTileConfigFile /usr/local/etc/renderd.conf ModTileRenderedSocketName /var/run/renderd/renderd.sock ModTileRequestTimeout 0 ModTileMissingRequestTimeout 30
The PBF I am using is from Metro Extracts http://osm-extracted-metros.s3.amazonaws.com/chicago.osm.pbf