NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I'm running Nominatim on my server and I recently (2 weeks ago) imported full planet data. I'm assuming the import is complete (not sure if it is, as the output never explicitly stated "finished"). Here's my import output:

Done 87399141 in 624893 @ 139.862564 per second - Rank 30 ETA (seconds): -30.558571
Done 87399213 in 624894 @ 139.862473 per second - ETA (seconds): -31.073381
Done 87399213 in 624894 @ 139.862473 per second - FINISHED
...
CREATE INDEX
CREATE INDEX
CREATE INDEX

Postgres doesn't appear to be doing anything either:

[root~]# psql postgres
psql (9.1.9)
Type "help" for help.

postgres=# select * from pg_stat_activity;
 datid | datname  | procpid | usesysid | usename | application_name | client_addr | client_hostname | client
_port |         backend_start         |          xact_start           |          query_start          | wait
ing |          current_query
-------+----------+---------+----------+---------+------------------+-------------+-----------------+-------
------+-------------------------------+-------------------------------+-------------------------------+-----
----+---------------------------------
 12780 | postgres |   31281 |    16385 | root    | psql             |             |                 |
   -1 | 2014-02-26 11:52:00.615982-08 | 2014-02-26 11:52:10.074218-08 | 2014-02-26 11:52:10.074218-08 | f
    | select * from pg_stat_activity;
(1 row)

Having said that, I'm trying to reverse geocode via Nominatim, but it's giving me error messages:

Query:

http://my-servers-ip-address/nominatim/reverse?format=xml&lat=40.731389&lon=-73.998889&zoom=18&addressdetails=1

Output:

Internal Server Error
Nominatim has encountered an internal error while processing your request. This is most likely because of a bug in the software.
Details: Could not determine closest place. Feel free to report the bug in the http://trac.openstreetmap.org OSM bug database. Please include the error message above and the URL you used.

How can I debug to see what went wrong? Could the import have gone wrong? (Nominatim, the same installation on the same machine, was working fine before I wiped the database and imported new data) Is the import actually not finished?

Thanks

EDIT:

Adding apache error message and debug=1 option in the URL:

Apache error message:

[Fri Feb 28 09:56:49 2014] [error] an unknown filter was not added: proxy-html
[Fri Feb 28 09:56:49 2014] [error] [client my-ip-address] PHP Fatal error:  Cannot use object of type DB_Error as array in /postgres/OpenStreetMaps/Nominatim-2.2.0/lib/PlaceLookup.php on line 53

Output with debug=1 option:

string(561) "select place_id,parent_place_id,rank_search from placex WHERE ST_DWithin(ST_SetSRID(ST_Point(-73.998889,40.731389),4326), geometry, 0.0008) and rank_search != 28 and rank_search >= 30 and (name is not null or housenumber is not null) and class not in ('waterway','railway','tunnel','bridge') and indexed_status = 0  and (ST_GeometryType(geometry) not in ('ST_Polygon','ST_MultiPolygon')  OR ST_DWithin(ST_SetSRID(ST_Point(-73.998889,40.731389),4326), centroid, 0.0008)) ORDER BY ST_distance(ST_SetSRID(ST_Point(-73.998889,40.731389),4326), geometry) ASC limit 1"

asked 26 Feb '14, 19:57

baekacaek's gravatar image

baekacaek
176121317
accept rate: 0%

edited 28 Feb '14, 18:06

2

If you can, amend your question by adding the relevant messages of your Apache error log file. That will make answering easier.

(26 Feb '14, 21:30) Frederik Ramm ♦

Thanks. I added the apache error message. I'm not sure what it's telling me to do though.

(26 Feb '14, 23:10) baekacaek

Is it possible that you forgot to create the www-data user before starting the import?

(27 Feb '14, 07:23) lonvia

No, i created www-data user for my first import (this is my second import). I rechecked by running the command again, but no difference

(28 Feb '14, 17:45) baekacaek

It seems that for whatever reason the database query caused PostGIS to return an error. Check your database log file in /var/log/postgresql/ if you spot an error; or else do "su www-data", then "psql nominatim", and enter the "select place_id..." query in the psql shell. With any luck that will also return an error, and give us a hint about what is wrong.

(01 Mar '14, 23:29) Frederik Ramm ♦

I typed in "su www-data" from shell and I get "user www-data does not exist". Could this be the problem? If i run the query in psql shell, the query runs and I get 0 rows. No error message (unless I need to look elsewhere for the error message).

(03 Mar '14, 23:10) baekacaek

Btw, I'm on CentOS.

(04 Mar '14, 00:02) baekacaek

CentOS seems to have user apache instead of www-data.

(04 Mar '14, 07:30) scai ♦
showing 5 of 8 show 3 more comments

To debug internal server errors, add debug=1 as a parameter to your query. This will produce a lot of debug output which also includes the original SQL error message that is the cause of the internal error. There is a good chance that you simply have a permission problem.

permanent link

answered 26 Feb '14, 22:25

lonvia's gravatar image

lonvia
6.2k25789
accept rate: 40%

Thanks, I added the error message with the debug=1 option on. I could be wrong, but it doesn't appear to be permission problem.

(26 Feb '14, 23:09) baekacaek

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×689
×293
×85

question asked: 26 Feb '14, 19:57

question was seen: 8,015 times

last updated: 04 Mar '14, 07:30

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum