AcuGIS / Nominatim-Server

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

Installation Error #17

Closed AndyW999 closed 1 year ago

AndyW999 commented 1 year ago

Just tried to install it and I got -

/home/andy /home/ntim /home/andy --2023-11-07 10:23:52-- https://download.geofabrik.de/europe/great-britain-latest.osm.pbf Resolving download.geofabrik.de (download.geofabrik.de)... 65.109.48.72, 65.109.50.43 Connecting to download.geofabrik.de (download.geofabrik.de)|65.109.48.72|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 1682713311 (1,6G) [application/octet-stream] Saving to: 'great-britain-latest.osm.pbf'

great-britain-lates 100%[===================>] 1,57G 9,96MB/s in 2m 46s

2023-11-07 10:26:38 (9,65 MB/s) - 'great-britain-latest.osm.pbf' saved [1682713311/1682713311]

--2023-11-07 10:26:39-- 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... 301 Moved Permanently Location: https://www.nominatim.org/data/country_grid.sql.gz [following] --2023-11-07 10:26:39-- https://www.nominatim.org/data/country_grid.sql.gz Connecting to www.nominatim.org (www.nominatim.org)|138.201.190.130|:443... connected. HTTP request sent, awaiting response... 301 Moved Permanently Location: https://nominatim.org/data/country_grid.sql.gz [following] --2023-11-07 10:26:39-- https://nominatim.org/data/country_grid.sql.gz Resolving nominatim.org (nominatim.org)... 138.201.190.130 Connecting to nominatim.org (nominatim.org)|138.201.190.130|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 42146983 (40M) [application/octet-stream] Saving to: '/home/ntim/Nominatim/data/country_osm_grid.sql.gz'

/home/ntim/Nominati 100%[===================>] 40,19M 7,40MB/s in 5,5s

2023-11-07 10:26:45 (7,31 MB/s) - '/home/ntim/Nominatim/data/country_osm_grid.sql.gz' saved [42146983/42146983]

2023-11-07 10:26:48: Using project directory: /var/www/nominatim 2023-11-07 10:26:50: Creating database 2023-11-07 10:26:55: Setting up country tables Traceback (most recent call last): File "/usr/bin/nominatim", line 14, in exit(cli.nominatim(module_dir='/usr/lib/x86_64-linux-gnu/nominatim/module', File "/usr/lib/x86_64-linux-gnu/nominatim/lib-python/nominatim/cli.py", line 264, in nominatim return parser.run(kwargs) File "/usr/lib/x86_64-linux-gnu/nominatim/lib-python/nominatim/cli.py", line 126, in run return args.command.run(args) File "/usr/lib/x86_64-linux-gnu/nominatim/lib-python/nominatim/clicmd/setup.py", line 89, in run country_info.setup_country_tables(args.config.get_libpq_dsn(), File "/usr/lib/x86_64-linux-gnu/nominatim/lib-python/nominatim/data/country_info.py", line 142, in setup_country_tables cur.execute_values( File "/usr/lib/x86_64-linux-gnu/nominatim/lib-python/nominatim/db/connection.py", line 46, in execute_values psycopg2.extras.execute_values(self, sql, argslist, template=template) File "/usr/lib/python3/dist-packages/psycopg2/extras.py", line 1267, in execute_values parts.append(cur.mogrify(template, args)) File "/usr/lib/python3/dist-packages/psycopg2/extras.py", line 837, in _getquoted_9 return b"hstore(" + k.getquoted() + b", " + v.getquoted() + b")" UnicodeEncodeError: 'latin-1' codec can't encode characters in position 0-5: ordinal not in range(256) /home/andy Enabling conf nominatim_dir. To activate the new configuration, you need to run: systemctl reload apache2 could not change directory to "/home/andy": Permission denied GRANT could not change directory to "/home/andy": Permission denied GRANT /home/ntim /home/andy 2023-11-07 10:27:03: Using project directory: /home/ntim 2023-11-07 10:27:04: Initialising replication updates Traceback (most recent call last): File "/usr/bin/nominatim", line 14, in exit(cli.nominatim(module_dir='/usr/lib/x86_64-linux-gnu/nominatim/module', File "/usr/lib/x86_64-linux-gnu/nominatim/lib-python/nominatim/cli.py", line 264, in nominatim return parser.run(kwargs) File "/usr/lib/x86_64-linux-gnu/nominatim/lib-python/nominatim/cli.py", line 126, in run return args.command.run(args) File "/usr/lib/x86_64-linux-gnu/nominatim/lib-python/nominatim/clicmd/replication.py", line 191, in run return self._init_replication(args) File "/usr/lib/x86_64-linux-gnu/nominatim/lib-python/nominatim/clicmd/replication.py", line 79, in _init_replication replication.init_replication(conn, base_url=args.config.REPLICATION_URL, File "/usr/lib/x86_64-linux-gnu/nominatim/lib-python/nominatim/tools/replication.py", line 41, in init_replication date = status.compute_database_date(conn) File "/usr/lib/x86_64-linux-gnu/nominatim/lib-python/nominatim/db/status.py", line 41, in compute_database_date osmid = cur.scalar("SELECT max(osm_id) FROM placex WHERE osm_type='N'") File "/usr/lib/x86_64-linux-gnu/nominatim/lib-python/nominatim/db/connection.py", line 53, in scalar self.execute(sql, args) File "/usr/lib/x86_64-linux-gnu/nominatim/lib-python/nominatim/db/connection.py", line 36, in execute super().execute(query, args) File "/usr/lib/python3/dist-packages/psycopg2/extras.py", line 146, in execute return super().execute(query, vars) psycopg2.errors.UndefinedTable: relation "placex" does not exist LINE 1: SELECT max(osm_id) FROM placex WHERE osm_type='N'

kaloyan13 commented 1 year ago

Should be fixed by 491ed40.

AndyW999 commented 1 year ago

Great - it's working away right now!

Thanks

Andy.

AndyW999 commented 1 year ago

Great - it's working away right now!

Thanks

Andy.

GluteusMaximusHR commented 8 months ago

Hello! It seems i get the same error on clean install on Ubuntu 22

/home/ntim /home/intadmin --2024-03-16 11:54:48-- https://download.geofabrik.de/europe/croatia-latest.osm.pbf Resolving download.geofabrik.de (download.geofabrik.de)... 65.109.50.43, 65.109.48.72, 2a01:4f9:5a:2797::2, ... Connecting to download.geofabrik.de (download.geofabrik.de)|65.109.50.43|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 167977408 (160M) [application/octet-stream] Saving to: ‘croatia-latest.osm.pbf’

croatia-latest.osm.pbf 100%[=================================================>] 160.20M 7.98MB/s in 17s

2024-03-16 11:55:05 (9.57 MB/s) - ‘croatia-latest.osm.pbf’ saved [167977408/167977408]

--2024-03-16 11:55:05-- 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... 301 Moved Permanently Location: https://www.nominatim.org/data/country_grid.sql.gz [following] --2024-03-16 11:55:05-- https://www.nominatim.org/data/country_grid.sql.gz Connecting to www.nominatim.org (www.nominatim.org)|138.201.190.130|:443... connected. HTTP request sent, awaiting response... 301 Moved Permanently Location: https://nominatim.org/data/country_grid.sql.gz [following] --2024-03-16 11:55:06-- https://nominatim.org/data/country_grid.sql.gz Resolving nominatim.org (nominatim.org)... 138.201.190.130 Connecting to nominatim.org (nominatim.org)|138.201.190.130|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 42146983 (40M) [application/octet-stream] Saving to: ‘/home/ntim/Nominatim/data/country_osm_grid.sql.gz’

/home/ntim/Nominatim/data/coun 100%[=================================================>] 40.19M 7.08MB/s in 5.6s

2024-03-16 11:55:11 (7.16 MB/s) - ‘/home/ntim/Nominatim/data/country_osm_grid.sql.gz’ saved [42146983/42146983]

2024-03-16 11:55:12: Using project directory: /var/www/nominatim 2024-03-16 11:55:15: Creating database 2024-03-16 11:55:16: Setting up country tables 2024-03-16 11:55:18: Importing OSM data file 2024-03-16 11:55:18 osm2pgsql version 1.11.0 (1.11.0) 2024-03-16 11:55:18 ERROR: The following argument was not expected: --latlon Traceback (most recent call last): File "/usr/bin/nominatim", line 12, in exit(cli.nominatim(module_dir='/usr/lib/x86_64-linux-gnu/nominatim/module', File "/usr/lib/x86_64-linux-gnu/nominatim/lib-python/nominatim/cli.py", line 225, in nominatim return get_set_parser().run(kwargs) File "/usr/lib/x86_64-linux-gnu/nominatim/lib-python/nominatim/cli.py", line 121, in run return args.command.run(args) File "/usr/lib/x86_64-linux-gnu/nominatim/lib-python/nominatim/clicmd/setup.py", line 94, in run database_import.import_osm_data(files, File "/usr/lib/x86_64-linux-gnu/nominatim/lib-python/nominatim/tools/database_import.py", line 113, in import_osm_data run_osm2pgsql(options) File "/usr/lib/x86_64-linux-gnu/nominatim/lib-python/nominatim/tools/exec_utils.py", line 76, in run_osm2pgsql subprocess.run(cmd, cwd=options.get('cwd', '.'), File "/usr/lib/python3.10/subprocess.py", line 526, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['/usr/lib/x86_64-linux-gnu/nominatim/osm2pgsql', '--hstore', '--latlon', '--slim', '--log-progress', 'true', '--number-processes', '1', '--cache', '7959', '--style', '/etc/nominatim/import-extratags.lua', '--output', 'flex', '--create', '/home/ntim/croatia-latest.osm.pbf']' returned non-zero exit status 1. /home/intadmin Enabling conf nominatim_dir. To activate the new configuration, you need to run: systemctl reload apache2 could not change directory to "/home/intadmin": Permission denied GRANT could not change directory to "/home/intadmin": Permission denied GRANT /home/ntim /home/intadmin 2024-03-16 11:55:20: Using project directory: /home/ntim 2024-03-16 11:55:20: Initialising replication updates Traceback (most recent call last): File "/usr/bin/nominatim", line 12, in exit(cli.nominatim(module_dir='/usr/lib/x86_64-linux-gnu/nominatim/module', File "/usr/lib/x86_64-linux-gnu/nominatim/lib-python/nominatim/cli.py", line 225, in nominatim return get_set_parser().run(kwargs) File "/usr/lib/x86_64-linux-gnu/nominatim/lib-python/nominatim/cli.py", line 121, in run return args.command.run(args) File "/usr/lib/x86_64-linux-gnu/nominatim/lib-python/nominatim/clicmd/replication.py", line 194, in run return self._init_replication(args) File "/usr/lib/x86_64-linux-gnu/nominatim/lib-python/nominatim/clicmd/replication.py", line 79, in _init_replication replication.init_replication(conn, base_url=args.config.REPLICATION_URL, File "/usr/lib/x86_64-linux-gnu/nominatim/lib-python/nominatim/tools/replication.py", line 41, in init_replication date = status.compute_database_date(conn) File "/usr/lib/x86_64-linux-gnu/nominatim/lib-python/nominatim/db/status.py", line 41, in compute_database_date osmid = cur.scalar("SELECT max(osm_id) FROM placex WHERE osm_type='N'") File "/usr/lib/x86_64-linux-gnu/nominatim/lib-python/nominatim/db/connection.py", line 53, in scalar self.execute(sql, args) File "/usr/lib/x86_64-linux-gnu/nominatim/lib-python/nominatim/db/connection.py", line 36, in execute super().execute(query, args) File "/usr/lib/python3/dist-packages/psycopg2/extras.py", line 146, in execute return super().execute(query, vars) psycopg2.errors.UndefinedTable: relation "placex" does not exist LINE 1: SELECT max(osm_id) FROM placex WHERE osm_type='N'

kaloyan13 commented 8 months ago

I have updated version of Nominatim and UI, after which I have imported Andorra successfuly. Try again.

GluteusMaximusHR commented 8 months ago

Tried it on a new VM and it is working now...

Thank You!