I'm setting up my own Nominatim server for 2 countries being Belgium and The Netherlands.
Therefore I used the following online manual: Importing multiple regions (with updates)
I started by adjusting the COUNTRIES
to COUNTRIES="europe/belgium europe/netherlands"
in import_multiple_regions.sh
and update_database.sh
.
Running the import script worked, it ended (after about 2 days) without any errors.
But when I try to run the update script, it constantly logs a runtime exception and I have no clue how I can fix it.
This is a part of the output I get. It's the same for both countries:
rm -f update/europe/belgium/europe_belgium.osc.gz pyosmium-get-changes -o update/europe/belgium/europe_belgium.osc.gz
-f update/europe/belgium/sequence.state
--server https://download.geofabrik.de/europe/belgium-updates
-v Traceback (most recent call last): File "/usr/bin/pyosmium-get-changes", line 70, in from_id
seq_id=int(idstr) ValueError: invalid literal for int() with base 10: ''
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/bin/pyosmium-get-changes", line 243, in <module>
exit(main(sys.argv[1:])) File "/usr/bin/pyosmium-get-changes", line 188, in main
options.start = ReplicationStart.from_id(seq) File "/usr/bin/pyosmium-get-changes", line 72, in from_id
raise ArgumentTypeError("Sequence id '%s' is not a number" % idstr) argparse.ArgumentTypeError: Sequence id '' is not a number
+ echo 'Attempting to import diffs' Attempting to import diffs
+ nominatim add-data --diff update/europe/belgium/europe_belgium.osc.gz 2021-11-16 08:58:43: Using project directory: /srv/nominatim/nominatim-project 2021-11-16 08:58:43 osm2pgsql version
1.5.1 (1.5.1-4-gbd7b4440-changed) 2021-11-16 08:58:43 Database version:
12.9 (Ubuntu 12.9-0ubuntu0.20.04.1) 2021-11-16 08:58:43 PostGIS version:
3.0 2021-11-16 08:58:43 Parsing gazetteer style file '/usr/local/etc/nominatim/import-extratags.style'. 2021-11-16 08:58:43 ERROR: Open failed for 'update/europe/belgium/europe_belgium.osc.gz': No such file or directory Traceback (most recent call last): File "/usr/local/bin/nominatim", line 11, in <module>
exit(cli.nominatim(module_dir='/usr/local/lib/nominatim/module', File "/usr/local/lib/nominatim/lib-python/nominatim/cli.py", line 235, in nominatim
return parser.run(**kwargs) File "/usr/local/lib/nominatim/lib-python/nominatim/cli.py", line 96, in run
return args.command.run(args) File "/usr/local/lib/nominatim/lib-python/nominatim/clicmd/add_data.py", line 70, in run
return add_osm_data.add_data_from_file(args.file or args.diff, File "/usr/local/lib/nominatim/lib-python/nominatim/tools/add_osm_data.py", line 18, in add_data_from_file
run_osm2pgsql(options) File "/usr/local/lib/nominatim/lib-python/nominatim/tools/exec_utils.py", line 139, in run_osm2pgsql
subprocess.run(cmd, cwd=options.get('cwd', '.'), File "/usr/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['/usr/local/lib/nominatim/osm2pgsql', '--hstore', '--latlon', '--slim', '--with-forward-dependencies', 'false', '--log-progress', 'true', '--number-processes', '1', '--cache', '1000', '--output', 'gazetteer', '--style', '/usr/local/etc/nominatim/import-extratags.style', '--append', 'update/europe/belgium/europe_belgium.osc.gz']' returned non-zero exit status 1.
So does anyone have any idea what I'm doing wrong? I'm doing this on an Ubuntu 20.04.3 Server.
What are the contents of
update/europe/belgium/sequence.state
? It should look something like https://download.geofabrik.de/europe/belgium-updates/state.txt