AcuGIS / Nominatim-Server

Script for Building a Basic Nominatim Server
https://www.acugis.com/opennamesearch/
17 stars 8 forks source link

Error creating server #11

Closed smsoousa closed 2 years ago

smsoousa commented 5 years ago

Hi friend, thanks for the great work. But I am having error while executing the file, basically at the end of the installation, I get the error and the nominatim server is not installed correctly. If you can help me, I will be forever grateful.

... [ 93%] Building C object nominatim/CMakeFiles/nominatim.dir/nominatim.c.o [ 95%] Building C object nominatim/CMakeFiles/nominatim.dir/postgresql.c.o [ 97%] Building C object nominatim/CMakeFiles/nominatim.dir/sprompt.c.o [100%] Linking CXX executable nominatim [100%] Built target nominatim ALTER ROLE --2019-08-19 17:46:16-- http://download.geofabrik.de/south-america/brazil-latest.osm.pbf Resolving download.geofabrik.de (download.geofabrik.de)... 88.99.142.44, 88.99.105.98 Connecting to download.geofabrik.de (download.geofabrik.de)|88.99.142.44|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 791622859 (755M) [application/octet-stream] Saving to: 'brazil-latest.osm.pbf'

brazil-latest.osm.pbf 100%[==========================================>] 754.95M 21.4MB/s in 43s

2019-08-19 17:46:59 (17.4 MB/s) - 'brazil-latest.osm.pbf' saved [791622859/791622859]

--2019-08-19 17:46:59-- http://www.nominatim.org/data/country_grid.sql.gz Resolving www.nominatim.org (www.nominatim.org)... 138.201.190.130 Connecting to www.nominatim.org (www.nominatim.org)|138.201.190.130|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 42146983 (40M) [application/x-gzip] Saving to: '/home/ntim/Nominatim/data/country_osm_grid.sql.gz'

/home/ntim/Nominatim/data/c 100%[==========================================>] 40.19M 12.4MB/s in 3.3s

2019-08-19 17:47:04 (12.4 MB/s) - '/home/ntim/Nominatim/data/country_osm_grid.sql.gz' saved [42146983/42146983]

2019-08-19 17:47:04 == module path: /home/ntim/Nominatim/build/module 2019-08-19 17:47:04 == Create DB 2019-08-19 17:47:04 == Setup DB Postgres version found: 9.05 Postgis version found: 2.2 2019-08-19 17:47:08 == WARNING: optional external GB postcode table file (/home/ntim/Nominatim/data/gb_postcode _data.sql.gz) not found. Skipping. 2019-08-19 17:47:08 == WARNING: optional external US postcode table file (/home/ntim/Nominatim/data/us_postcode _data.sql.gz) not found. Skipping. 2019-08-19 17:47:08 == Import data osm2pgsql version 0.96.0 (64 bit id space)

Allocating memory for dense node cache Allocating dense node cache in one big chunk Out of memory for dense node cache, reduce --cache size Error occurred, cleaning up PHP Fatal error: Uncaught Nominatim\DatabaseError: [500]: Database query failed

thrown in /home/ntim/Nominatim/lib/DB.php on line 187 Enabling conf nominatim_dir. To activate the new configuration, you need to run: service apache2 reload GRANT GRANT Collecting osmium Downloading https://files.pythonhosted.org/packages/13/bf/64b82965ecae84d9c6a03599db55515101c6900e5ad89d24d43 3cc7ca957/osmium-2.15.3-cp27-cp27mu-manylinux1_x86_64.whl (1.2MB) 100% |################################| 1.2MB 1.0MB/s Installing collected packages: osmium Successfully installed osmium You are using pip version 8.1.1, however version 19.2.2 is available. You should consider upgrading via the 'pip install --upgrade pip' command. 2019-08-19 17:47:15 == module path: /home/ntim/Nominatim/build/module 2019-08-19 17:47:15 == Index ranks 0 - 4 nominatim version 3.3.0

Failed preparing index_sectors: ERROR: relation "placex" does not exist LINE 1: select geometry_sector,count(*) from placex where rank_searc... ^

ERROR: error status 1 running nominatim! string(33) "error status 1 running nominatim!" 2019-08-19 17:47:15 == module path: /home/ntim/Nominatim/build/module 2019-08-19 17:47:15 == Create Functions Summary of warnings:

2019-08-19 17:47:15 == Setup finished.

CONST_Pyosmium_Binary not configured. You need to install pyosmium and set up the path to pyosmium-get-changes in your local settings file.

ERROR: CONST_Pyosmium_Binary not configured string(36) "CONST_Pyosmium_Binary not configured" Created symlink from /etc/systemd/system/multi-user.target.wants/nominatum-updates.service to /etc/systemd/syst em/nominatum-updates.service.

smsoousa commented 5 years ago

someone?

f1ana commented 4 years ago

Looks like you don't have enough memory: Out of memory for dense node cache, reduce --cache size

smsoousa commented 4 years ago

Hello, thanks for the direction. What would be the ideal configuration for this installation? I was using a server with 6GB of RAM.

f1ana commented 4 years ago

The more memory that you can provide, the better. 6GB is pretty lean in my opinion. I suspect that you would need to tell postgres to use 2-3GB of RAM so that osm2pgsql has enough room to work as well. Hard to say since I've never done an import with that little memory.

smsoousa commented 4 years ago

Would it be able to adapt this memory allocation to the postgres in your installer?

f1ana commented 4 years ago

It's been a long time since I set up a Nominatim server, but in the past I think I've had at least 16 or 32GB of RAM to work with. Even if you are able to get the installer to work in a relatively low memory condition, performance is probably not going to be very good.

smsoousa commented 4 years ago

Hello friend, I hired a VPS with 400gb SSD and 16gb RAM. But still getting the memory error, could you help me?

Allocating memory for dense node cache Allocating dense node cache in one big chunk Out of memory for dense node cache, reduce --cache size Error occurred, cleaning up PHP Fatal error: Uncaught Nominatim \ DatabaseError: [500]: Database query failed

  thrown in /home/nominatim/Nominatim/lib/DB.php on line 187 Enabling conf nominatim_dir. To activate the new configuration, you need to run:   service apache2 reload GRANT GRANT -su: line 2: pip: command not found 2019-11-04 13:30:53 == module path: / home / nominatim / Nominatim / build / module 2019-11-04 13:30:53 == Index ranks 0 - 4 nominatim version 3.4.0

Failed preparing index_sectors: ERROR: relation "placex" does not exist LINE 1: select geometry_sector, count (*) from placex where rank_searc ...                                              ^

ERROR: error status 1 running nominatim! string (33) "error status 1 running nominatim!" 2019-11-04 13:30:53 == module path: / home / nominatim / Nominatim / build / module 2019-11-04 13:30:53 == Create Functions Summary of warnings:

2019-11-04 13:30:53 == Setup finished. sh: 1: /home/user/.local/bin/pyosmium-get-changes: not found Cannot execute pyosmium-get-changes. Make sure you have pyosmium installed correctly and have set up CONST_Pyosmium_Binary to point to pyosmium-get-changes. ERROR: pyosmium-get-changes not found or not usable string (44) "pyosmium-get-changes not found or not usable" Created symlink from /etc/systemd/system/multi-user.target.wants/nominatum-updates.service to /etc/systemd/system/nominatum-updates.service.

DavidGhedini commented 4 years ago

The options are to either use a VM with more RAM or adjust the memory allotted for caching nodes to a smaller amount. Try with 1/4 of the VM RAM.

DavidGhedini commented 2 years ago

Closing