mediagis / nominatim-docker

100% working container for Nominatim
Creative Commons Zero v1.0 Universal
1.03k stars 434 forks source link

OSM import fails due to URL corruption #538

Closed salfter closed 4 months ago

salfter commented 4 months ago

Describe the bug Output from the initial load:

+ sudo -E -u nominatim nominatim import --osm-file https://download.geofabrik.de/north-america/us/nevada-latest.osm.pbf --threads 24
2024-03-13 22:36:32: Using project directory: /nominatim
2024-03-13 22:36:38: OSM file 'https:/download.geofabrik.de/north-america/us/nevada-latest.osm.pbf' does not exist.
2024-03-13 22:36:38: FATAL: Cannot access file.

It looks like the second slash after "https:" is getting dropped on the floor somewhere.

To Reproduce

docker create --restart=unless-stopped --name nominatim \
  -v nominatim-postgres:/var/lib/postgresql/14/main \
  -v nominatim-flatnode:/nominatim/flatnode \
  -e PBF_PATH=https://download.geofabrik.de/north-america/us/nevada-latest.osm.pbf \
  -e REPLICATION_URL=https://download.geofabrik.de/north-america/us/nevada-updates/ \
  -e IMPORT_WIKIPEDIA=false \
  -e IMPORT_US_POSTCODES=true \
  -e IMPORT_TIGER_ADDRESSES=true \
  -p 80:8080/tcp \
  mediagis/nominatim:4.3
docker start -a nominatim

Note that the URL given to PBF_PATH is correct and starts downloading if you pass it to (for instance) wget.

Expected behavior Nominatim configures itself and starts up.

Screenshots & Logs If applicable, add screenshots & logs to help explain your problem.

Desktop / Server (please complete the following information):

mtmail commented 4 months ago

Try PBF_URL instead of PBF_PATH for urls. https://github.com/mediagis/nominatim-docker/tree/master/4.3#general-parameters

salfter commented 4 months ago

That seems to have done it...it's now setting itself up.