This is my second shot at posting - first went away when I validated my email. I'm trying to get a local instance of nominatim 3.1.0 running on FreeBSD 11.1 and PG 9.5. I followed the instructions published here: https://nominatim.org/release-docs/latest/admin/Installation/. I did not encounter any errors during the install and the apache/php side of things seems to be working nicely. I installed no additional components (no TIGER, wikipedia, etc.). I installed New Jersey from here: http://download.geofabrik.de/north-america.html However I can only query by zipcode. Entering a street name, city, town or place name gives no results. Zipcodes return a result, but clicking on the "details" link gives me an error. This example is zip "07960" and the URL that produces the below error is http://myinstall/details.php?place_id=430312
Poking around in the database, some seemingly important tables are empty:
Places seem populated:
I'm stumped. I went through the install a second time to make sure I was doing things correctly and to gather logs of the whole process. The gist below contains the cmake output, (g)make output, setup.php output and the pgsql log. Nothing stands out as an error in the setup log, but this is my first try at anything GIS-related so I have no idea what I'm looking at. https://gist.github.com/sporkman/969be026d7048eda54d1060312f8fedb Any ideas? The empty tables seem like a big hint, not sure what populates them though. asked 24 Feb '18, 09:16 spork123
showing 5 of 12
show 7 more comments
|
Could you please add the contents of your local settings file(build/settings/local.php)?
Yes, both installation and output of the setup.php look fine. And placex being filled is a good sign. The 'Create Search indices' step taking only 3 second could be suspicious. Best next good step is to try the installation with a small full country, e.g. Luxembourg or Monaco, so we can rule out the input file new-jersey causes this.
OK, here's more info... local overrides are minimal:
Also php version just in case there's an issue there:
Postgresql/related Versions:
Also, for reference, the entire nominatim source and build directories are owned by a "nominatim" user, and this user was also used to perform all database operations. I manually "dropdb nominatim" between tests.
I grabbed Luxembourg and verified the checksum is OK:
I searched for a number of towns listed here (https://en.wikipedia.org/wiki/List_of_towns_in_Luxembourg) and came up with no results. I searched on a postcode and after trying a few got a hit on "8070". And like the New Jersey data, the details link lead to the same error (partial URL: details.php?place_id=210598). Like NJ, "location_area" is empty, "place" and "placex" are populated. Not sure what other tables are important. Of note, a dump of this db, uncompressed is about 304MB. There's something in there. :)
I'm attaching the debug output for the successful and unsuccessful searches as screenshots. The setup.php log is here: https://gist.github.com/sporkman/6829ef07576678c884119bb2ee4f3c01
Scanning the log, things that look weird to me:
ps - sorry for "answering", this is too big for a comment and there's no formatting in comments.
300MB is still reasonable. The country_grid.sql.gz is already 100MB uncompressed and imported for partitioning data regardless. The "NOTICE: table "place" does not exist, skipping" are fine, postgresql doesn't have a silent "create this table if it doesnt exist yet" afaik so this goes to the output. Have you applied any of the http://www.nominatim.org/release-docs/latest/admin/Installation/#postgresql-tuning changes? For such a small import tuning makes no difference, I'm just wondering if there were any Postgresql config changes. Lastly can we rule out the harddrive is full (though usually Postgresql will print an error). I think it's the first time we see this kind of error, or rather lack of error message while looping through 0 places.
meta @spork123: there is formatting in comments - just no preview. You can use the preview of the answer or use https://daringfireball.net/projects/markdown/dingus for previewing which is more accurate anyway. (note: I have converted your "answer" to a "comment".)
I think I lost a reply, but the short version just that drive space is fine.
PG changes: shared_buffers = 1500MB, work_mem = 50MB, maintenance_work_mem = 512MB, synchronous_commit = off (for import), checkpoint_timeout = 10min, checkpoint_completion_target = 0.9 and the rest is stock.
PHP modules/PEAR: json, openssl, pgsql, xml, zlib and pear-1.10.5, pear-DB-1.9.2
I've been stepping through setup.php to see what it does, and now I see that the indexing step is handled by an executable: build/nominatim/nominatim - I'm going to assume that's where the issue is. Any thoughts on debugging that? It's not doing an instant segfault or anything, so that's good. But does it make any interesting assumptions about what OS it's running on?
btw, thanks @aseerel4c26, I had no idea.
So this indexer. Either it's silently failing or it's not seeing whatever input data it wants. Can anyone elaborate on what it's looking for so I can verify the input data exists?
Manual run:
Even more data. Installed using the same process on Ubuntu 16.04 LTS. Same dataset and all, biggest difference was that I saw the index process actually generate quite a bit of output. And it worked as well.
Experiments to narrow this down to the index process that calls the "nominatim" binary:
What does this show? Given a properly indexed db, the FreeBSD version works, which means the frontend is OK, osm2pgsql works, the nominatim.so module for PG works. It also shows that the data the indexer needs to function is present (proven when copying "bad" db to ubuntu and indexing it). So something is up with the indexer, no?
Hey all, is this better handled in a github ticket?
This looks like a compatibility bug in nominatim.index,c and will require some debugging on your side. Please open a new bug on github.
@spork123: please link the issue here once you have created it.