Open myrainbowandsky opened 9 months ago
+ sudo -E -u nominatim nominatim admin --check-database
This is one of the very last commands in the setup. The database is filled and ready to use.
+ sudo -E -u nominatim nominatim replication --init
You chose to setup (daily) data updates, that initialization failed. You can retry running the command. Maks ure you're in the project directory (/nominatim
inside the docker container).
Checking TIGER external data table. ... not applicable
TIGER data is from the US census and relevant for US addresses. It's not part of OpenStreetMap but since you're importing North America region it might be useful for you. It's possible to install the TIGER data later (https://nominatim.org/release-docs/latest/customize/Tiger/)
Thx @mtmail . I did
docker container run -it --name b981927970a0 mediagis/nominatim:4.3
+ tailpid=0
+ replicationpid=0
+ trap stopServices SIGTERM TERM INT
+ /app/config.sh
You need to specify either the PBF_URL or PBF_PATH environment variable
docker run -e PBF_URL=https://download.geofabrik.de/europe/monaco-latest.osm.pbf ...
docker run -e PBF_PATH=/nominatim/data/monaco-latest.osm.pbf ...
How to go inside the docker again?
The command is usually docker container exec -it name-of-container command
You can find the name of your container with docker ps
but I see you already found it.
As command try /bin/bash
, the standard shell program on Ubuntu Linux. If not available try /bin/sh
.
Thx @mtmail. I tried:
docker container exec -it nominatim /bin/bash
Error response from daemon: Container b981927970a0b63a93afb1c953f27e3585a1ea8141d7831b0b053fe3758f6309 is not running
Then I tried :
docker run -it mediagis/nominatim:4.3
+ tailpid=0
+ replicationpid=0
+ trap stopServices SIGTERM TERM INT
+ /app/config.sh
You need to specify either the PBF_URL or PBF_PATH environment variable
docker run -e PBF_URL=https://download.geofabrik.de/europe/monaco-latest.osm.pbf ...
docker run -e PBF_PATH=/nominatim/data/monaco-latest.osm.pbf ...
I then tried docker run -it mediagis/nominatim:4.3 sh
# sudo -E -u nominatim nominatim admin --check-database
sudo: unknown user nominatim
sudo: error initializing audit plugin sudoers_audit
# #
# sudo -E -u nominatim nominatim admin --check-database
sudo: unknown user nominatim
sudo: error initializing audit plugin sudoers_audit`
kinda of dead cycle.
Does docker ps
show the container running in its list?
docker run -e PBF_URL=https://download.geofabrik.de/europe/monaco-latest.osm.pbf ...
What happens after you run this command? Are there error messages? Are you stopping the container?
docker ps
does not show the the nomitatim container, but docker ps -a
shows that.I tried:
docker run -it -e PBF_URL=https://download.geofabrik.de/europe/monaco-latest.osm.pbf -e REPLICATION_URL=https://download.geofabrik.de/europe/monaco-updates/ -p 8080:8080 --name nominatim_test mediagis/nominatim:4.3
I got:
docker: Error response from daemon: driver failed programming external connectivity on endpoint nominatim_test (c8fb06dbb6fa6be28b687f412144e4bdf99dc5a3f6c663c75b2bedf7f9ee1586): Error starting userland proxy: listen tcp4 0.0.0.0:8080: bind: address already in use.
ERRO[0000] error waiting for container:
I changed 8080 to 8081:
docker run -it -e PBF_URL=https://download.geofabrik.de/europe/monaco-latest.osm.pbf -e REPLICATION_URL=https://download.geofabrik.de/europe/monaco-updates/ -p 8081:8081 --name nominatim mediagis/nominatim:4.3
I got:
docker: Error response from daemon: Conflict. The container name "/nominatim" is already in use by container "b981927970a0b63a93afb1c953f27e3585a1ea8141d7831b0b053fe3758f6309". You have to remove (or rename) that container to be able to reuse that name.
I tried:
docker run -it -e PBF_URL=https://download.geofabrik.de/europe/monaco-latest.osm.pbf -e REPLICATION_URL=https://download.geofabrik.de/europe/monaco-updates/ -p 8081:8081 --name monacotest mediagis/nominatim:4.3
I got:
+ tailpid=0
+ replicationpid=0
+ trap stopServices SIGTERM TERM INT
+ /app/config.sh
+ id nominatim
+ useradd -m -p qaIACxO6wMR3 nominatim
+ IMPORT_FINISHED=/var/lib/postgresql/14/main/import-finished
+ '[' '!' -f /var/lib/postgresql/14/main/import-finished ']'
+ /app/init.sh
+ OSMFILE=/nominatim/data.osm.pbf
+ CURL=("curl" "-L" "-A" "${USER_AGENT}" "--fail-with-body")
+ SCP='sshpass -p DMg5bmLPY7npHL2Q scp -o StrictHostKeyChecking=no u355874-sub1@u355874-sub1.your-storagebox.de'
+ '[' -z '' ']'
++ nproc
+ THREADS=56
+ '[' '' = true ']'
+ '[' -f '' ']'
+ echo 'Skipping optional Wikipedia importance import'
Skipping optional Wikipedia importance import
+ '[' '' = true ']'
+ '[' -f '' ']'
+ echo 'Skipping optional GB postcode import'
Skipping optional GB postcode import
+ '[' '' = true ']'
+ '[' -f '' ']'
+ echo 'Skipping optional US postcode import'
Skipping optional US postcode import
+ '[' '' = true ']'
+ '[' -f '' ']'
+ echo 'Skipping optional Tiger addresses import'
Skipping optional Tiger addresses import
+ '[' https://download.geofabrik.de/europe/monaco-latest.osm.pbf '!=' '' ']'
+ echo Downloading OSM extract from https://download.geofabrik.de/europe/monaco-latest.osm.pbf
Downloading OSM extract from https://download.geofabrik.de/europe/monaco-latest.osm.pbf
+ curl -L -A mediagis/nominatim-docker:4.3.1 --fail-with-body https://download.geofabrik.de/europe/monaco-latest.osm.pbf -C - --create-dirs -o /nominatim/data.osm.pbf
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
27 521k 27 143k 0 0 24996 0 0:00:21 0:00:05 0:00:16 28261
-p 8081:8081
will map the port 8081 inside the docker container to 8081 on the host machine. But Nominatim inside the docker container doesn't run on port 8081. Consult the Docker documentation how the parameter works.
tcp4 0.0.0.0:8080: bind: address already in use
Find out what program uses the port. Maybe it's an existing Docker container. Or another webserver you ran for testing. Then you can stop that program. (Rebooting your computer also works but might be too drastic).
You have to remove (or rename) that container to be able to reuse that name.
.
Consult the Docker documentation how to remove or rename a container
Now I am doing:
docker run -it -e PBF_URL=192.168.50.183/us-latest.osm.pbf -p 8081:8081 --name nominatim -e IMPORT_US_POSTCODES=false -e IMPORT_GB_POSTCODES=false mediagis/nominatim:4.3
waiting for installation...
Good luck. Like I wrote Nominatim inside the container listens on port 8080, not 8081 (near the end of https://github.com/mediagis/nominatim-docker/blob/master/4.3/Dockerfile). You won't be able to access results from your host computer.
Ubuntu 22.04
Is the port occupied? Is it possible to continue to run instead of restarting.