mediagis / nominatim-docker

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

Import fails with index check error (v.4.1) #365

Closed IvanShift closed 2 years ago

IvanShift commented 2 years ago

Describe the bug Import always ends with an index check error (tried on different PCs and servers): With v.4.0 everything is OK.

+ '[' -f tiger-nominatim-preprocessed.csv.tar.gz ']'
+ sudo -E -u nominatim nominatim admin --check-database
2022-08-26 20:09:08: Using project directory: /nominatim
2022-08-26 20:09:08: Checking database
Checking database connection ... OK
Checking for placex table ... OK
Checking for placex content ... OK
Checking that tokenizer works ... OK
Checking for wikipedia/wikidata data ... WARNING

Wikipedia/Wikidata importance tables missing.
Quality of search results may be degraded. Reverse geocoding is unaffected.
See https://nominatim.org/release-docs/latest/admin/Import/#wikipediawikidata-rankings

Checking indexing status ... Failed
The indexing didn't finish. 61006 entries are not yet indexed.

To index the remaining entries, run:   nominatim index

Checking that database indexes are complete ... OK
Checking that all database indexes are valid ... OK
Checking TIGER external data table. ... not applicable

To Reproduce I use this docker-compose file:

version: "3.6"

services:
    nominatim:
        container_name: nominatim
        image: mediagis/nominatim:4.1
        restart: always
        ports:
            - "6080:8080"
        environment:
            PBF_URL: https://download.geofabrik.de/russia-latest.osm.pbf
            REPLICATION_URL: https://download.geofabrik.de/russia-updates/
            NOMINATIM_PASSWORD: very_password_123
            UID: 2082
        volumes:
            - nominatim-pg:/var/lib/postgresql/14/main
        shm_size: 8gb

volumes:
    nominatim-pg:
        driver: local
        driver_opts:
            o: bind
            type: none
            device: /media/dev/osm

Expected behavior Successful import

Screenshots & Logs full_log.log

Desktop / Server (please complete the following information):

mtmail commented 2 years ago

https://github.com/mediagis/nominatim-docker/discussions/331 reports the same. Can you try adding sudo -E -u nominatim nominatim index --threads $THREADS before sudo -E -u nominatim nominatim admin --check-database in init.sh ?

IvanShift commented 2 years ago

Thank you! Everything is OK! log2.log

leonardehrenfried commented 2 years ago

Should we do this in the initialisation by default, @mtmail ?