mediagis / nominatim-docker Goto Github PK
View Code? Open in Web Editor NEW100% working container for Nominatim
License: Creative Commons Zero v1.0 Universal
100% working container for Nominatim
License: Creative Commons Zero v1.0 Universal
Or I'm doing something wrong or there is a bug in version 3.3 on mac os (10.14.5).
I've downloaded poland-latest.osm.pbf and put it into a folder with path
/Users/me/repos/geocoding/data/poland
And then I've build the image and then I've run the following command:
_me $ docker run -t -v /Users/me/repos/geocoding/data/poland:/data nominatim sh /app/init.sh /data/merged.osm.pbf postgresdata 4
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "C.UTF-8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /data/postgresdata ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default timezone ... Etc/UTC
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok
WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
Success. You can now start the database server using:
/usr/lib/postgresql/11/bin/pg_ctl -D /data/postgresdata -l logfile start
waiting for server to start....2019-07-09 06:39:53.426 UTC [27] LOG: listening on IPv4 address "127.0.0.1", port 5432
2019-07-09 06:39:53.427 UTC [27] LOG: could not bind IPv6 address "::1": Cannot assign requested address
2019-07-09 06:39:53.427 UTC [27] HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
2019-07-09 06:39:53.430 UTC [27] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2019-07-09 06:39:53.491 UTC [28] LOG: database system was shut down at 2019-07-09 06:39:50 UTC
2019-07-09 06:39:53.514 UTC [27] LOG: database system is ready to accept connections
done
server started
NOTICE: database "nominatim" does not exist, skipping
DROP DATABASE
ERROR: the path supplied to --osm-file does not exist
string(46) "the path supplied to --osm-file does not exist"_
logs
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "C.UTF-8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /data/postgresdata ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
creating template1 database in /data/postgresdata/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating collations ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
loading PL/pgSQL server-side language ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok
syncing data to disk ... ok
WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
Success. You can now start the database server using:
/usr/lib/postgresql/9.5/bin/pg_ctl -D /data/postgresdata -l logfile start
server starting
LOG: could not bind IPv6 socket: Cannot assign requested address
HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
FATAL: the database system is starting up
createuser: could not connect to database postgres: FATAL: the database system is starting up
LOG: database system was shut down at 2018-10-25 21:38:03 UTC
LOG: MultiXact member wraparound protections are now enabled
LOG: database system is ready to accept connections
LOG: autovacuum launcher started
NOTICE: database "nominatim" does not exist, skipping
DROP DATABASE
ERROR: the path supplied to --osm-file does not exist
the path supplied to --osm-file does not exist
waiting for server to shut down....LOG: received fast shutdown request
LOG: aborting any active transactions
LOG: autovacuum launcher shutting down
LOG: shutting down
LOG: database system is shut down
done
server stopped
???
I tried today to use your docker. The docker setup is still running, but during the docker build I got the following warning:
WARNING: Unable to access the website at /
You may want to update settings/local.php with @define('CONST_Website_BaseURL', 'http://[HOST]/[PATH]/');
I build this on Ubuntu 16.04. To start I had to upgrade to docker 1.12. With the default docker 1.7 on a 16.04 it won't build. Not your fault. Just a hint for other people :-)
Nominatim 3.0, Ubuntu 16.04.4 LTS
sudo docker build -t nominatim .
Sending build context to Docker daemon 8.192kB Step 1/21 : FROM ubuntu:xenial ---> 0b1edfbffd27 Step 2/21 : MAINTAINER dorukozturk ---> Using cache ---> 796c941720e4 Step 3/21 : ENV DEBIAN_FRONTEND noninteractive ---> Using cache ---> 1b65d81bf0b6 Step 4/21 : ENV LANG C.UTF-8 ---> Using cache ---> 540a8b0615eb Step 5/21 : RUN apt-get -y update -qq && apt-get -y install locales && locale-gen en_US.UTF-8 && update-locale LANG=en_US.UTF-8 && apt-get install -y build-essential cmake g++ libboost-dev libboost-system-dev libboost-filesystem-dev libexpat1-dev zlib1g-dev libxml2-dev libbz2-dev libpq-dev libgeos-dev libgeos++-dev libproj-dev postgresql-server-dev-9.5 postgresql-9.5-postgis-2.2 postgresql-contrib-9.5 apache2 php php-pgsql libapache2-mod-php php-pear php-db php-intl git curl sudo python-pip libboost-python-dev osmosis && apt-get clean && rm -rf /var/lib/apt/lists/* && rm -rf /tmp/* /var/tmp/* ---> Using cache ---> b68abe4f1644 Step 6/21 : WORKDIR /app ---> Using cache ---> b5eab7b998f9 Step 7/21 : RUN echo "host all all 0.0.0.0/0 trust" >> /etc/postgresql/9.5/main/pg_hba.conf && echo "listen_addresses='*'" >> /etc/postgresql/9.5/main/postgresql.conf ---> Using cache ---> f54d99f2d1f5 Step 8/21 : ENV NOMINATIM_VERSION v3.0.1 ---> Using cache ---> 3cbc44cdd8c0 Step 9/21 : RUN git clone --recursive https://github.com/openstreetmap/Nominatim ./src ---> Using cache ---> 8283f8c3df75 Step 10/21 : RUN cd ./src && git checkout tags/$NOMINATIM_VERSION && git submodule update --recursive --init && mkdir build && cd build && cmake .. && make ---> Using cache ---> 7d54f45d0b6f Step 11/21 : RUN pip install osmium ---> Running in 959200486bfa Collecting osmium Downloading https://files.pythonhosted.org/packages/7a/eb/63d7af416ee6126c96a3e5c057750e266da5d1eecc108a6fe87cad9e98c9/osmium-2.14.1.tar.gz (1.6MB) Building wheels for collected packages: osmium Running setup.py bdist_wheel for osmium: started Running setup.py bdist_wheel for osmium: finished with status 'error' Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-vfCoTb/osmium/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmp0ii5aupip-wheel- --python-tag cp27: libosmium found in 'libosmium-2.14.0' protozero found in 'protozero-1.6.2' running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-2.7 creating build/lib.linux-x86_64-2.7/osmium copying src/osmium/__init__.py -> build/lib.linux-x86_64-2.7/osmium copying src/osmium/version.py -> build/lib.linux-x86_64-2.7/osmium creating build/lib.linux-x86_64-2.7/osmium/osm copying src/osmium/osm/__init__.py -> build/lib.linux-x86_64-2.7/osmium/osm copying src/osmium/osm/mutable.py -> build/lib.linux-x86_64-2.7/osmium/osm creating build/lib.linux-x86_64-2.7/osmium/replication copying src/osmium/replication/__init__.py -> build/lib.linux-x86_64-2.7/osmium/replication copying src/osmium/replication/utils.py -> build/lib.linux-x86_64-2.7/osmium/replication copying src/osmium/replication/server.py -> build/lib.linux-x86_64-2.7/osmium/replication running build_ext building 'osmium._osmium' extension creating build/temp.linux-x86_64-2.7 creating build/temp.linux-x86_64-2.7/lib c++ -pthread -DNDEBUG -g -fwrapv -O2 -Wall -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Iprotozero-1.6.2/include -Ilibosmium-2.14.0/include -I/usr/include -I/usr/include/python2.7 -c lib/osmium.cc -o build/temp.linux-x86_64-2.7/lib/osmium.o -std=c++11 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D__STDC_FORMAT_MACROS virtual memory exhausted: Cannot allocate memory error: command 'c++' failed with exit status 1 ---------------------------------------- �[91m Failed building wheel for osmium �[0m Running setup.py clean for osmium Failed to build osmium Installing collected packages: osmium Running setup.py install for osmium: started Running setup.py install for osmium: finished with status 'error' Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-vfCoTb/osmium/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-EIfiPr-record/install-record.txt --single-version-externally-managed --compile: libosmium found in 'libosmium-2.14.0' protozero found in 'protozero-1.6.2' running install running build running build_py creating build creating build/lib.linux-x86_64-2.7 creating build/lib.linux-x86_64-2.7/osmium copying src/osmium/__init__.py -> build/lib.linux-x86_64-2.7/osmium copying src/osmium/version.py -> build/lib.linux-x86_64-2.7/osmium creating build/lib.linux-x86_64-2.7/osmium/osm copying src/osmium/osm/__init__.py -> build/lib.linux-x86_64-2.7/osmium/osm copying src/osmium/osm/mutable.py -> build/lib.linux-x86_64-2.7/osmium/osm creating build/lib.linux-x86_64-2.7/osmium/replication copying src/osmium/replication/__init__.py -> build/lib.linux-x86_64-2.7/osmium/replication copying src/osmium/replication/utils.py -> build/lib.linux-x86_64-2.7/osmium/replication copying src/osmium/replication/server.py -> build/lib.linux-x86_64-2.7/osmium/replication running build_ext building 'osmium._osmium' extension creating build/temp.linux-x86_64-2.7 creating build/temp.linux-x86_64-2.7/lib c++ -pthread -DNDEBUG -g -fwrapv -O2 -Wall -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Iprotozero-1.6.2/include -Ilibosmium-2.14.0/include -I/usr/include -I/usr/include/python2.7 -c lib/osmium.cc -o build/temp.linux-x86_64-2.7/lib/osmium.o -std=c++11 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D__STDC_FORMAT_MACROS virtual memory exhausted: Cannot allocate memory error: command 'c++' failed with exit status 1 ---------------------------------------- �[91mCommand "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-vfCoTb/osmium/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-EIfiPr-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-vfCoTb/osmium/ �[0m�[91mYou are using pip version 8.1.1, however version 10.0.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command. �[0m
Documentation on docker build
docker run
and other necessary docker commands are not provided properly in README at landing page.
Hi,
I have recently tried to run version 3.1
. I also, as said in main README.md downloaded monaco osm.
However, I have met a couple problems like #33 and #18. Also, I have another one; bellow my build & run log (cache version):
PS C:\dev\code\macierze\nominatim-docker\3.1> docker build -t nominatim .
Sending build context to Docker daemon 39.61MB
Step 1/20 : FROM ubuntu:xenial
---> b9e15a5d1e1a
Step 2/20 : MAINTAINER dorukozturk <dorukozturk@kitware.com>
---> Using cache
---> 0dfda49bac65
Step 3/20 : ENV DEBIAN_FRONTEND noninteractive
---> Using cache
---> ef3440686d76
Step 4/20 : ENV LANG C.UTF-8
---> Using cache
---> 4a7d63ca6420
Step 5/20 : RUN apt-get -y update -qq && apt-get -y install locales && locale-gen en_US.UTF-8 && update-locale LANG=en_US.UTF-8 && apt-get install -y build-essential cmake g++ libboost-dev libboost-system-dev libboost-filesystem-dev libexpat1-dev zlib1g-dev libxml2-dev libbz2-dev libpq-dev libgeos-dev libgeos++-dev libproj-dev postgresql-server-dev-9.5 postgresql-9.5-postgis-2.2 postgresql-contrib-9.5 apache2 php php-pgsql libapache2-mod-php php-pear php-db php-intl git curl sudo python-pip libboost-python-dev osmosis && apt-get clean && rm -rf /var/lib/apt/lists/* && rm -rf /tmp/* /var/tmp/*
---> Using cache
---> 2260104da3de
Step 6/20 : WORKDIR /app
---> Using cache
---> 23a6f1c927ff
Step 7/20 : RUN echo "host all all 0.0.0.0/0 trust" >> /etc/postgresql/9.5/main/pg_hba.conf && echo "listen_addresses='*'" >> /etc/postgresql/9.5/main/postgresql.conf
---> Using cache
---> 0dbc5b8181ff
Step 8/20 : ENV NOMINATIM_VERSION v3.1.0
---> Using cache
---> c46015e5368c
Step 9/20 : RUN git clone --recursive https://github.com/openstreetmap/Nominatim ./src
---> Using cache
---> b72e57de6534
Step 10/20 : RUN cd ./src && git checkout tags/$NOMINATIM_VERSION && git submodule update --recursive --init && mkdir build && cd build && cmake .. && make
---> Using cache
---> 3e9b7ca36999
Step 11/20 : RUN pip install osmium
---> Using cache
---> 1566cc710995
Step 12/20 : COPY local.php /app/src/build/settings/local.php
---> Using cache
---> 60664f1eb74c
Step 13/20 : COPY nominatim.conf /etc/apache2/sites-enabled/000-default.conf
---> Using cache
---> ac59d56f5b3a
Step 14/20 : RUN curl http://www.nominatim.org/data/country_grid.sql.gz > /app/src/data/country_osm_grid.sql.gz
---> Using cache
---> 166e280606c5
Step 15/20 : EXPOSE 5432
---> Using cache
---> 624affd5643b
Step 16/20 : EXPOSE 8080
---> Using cache
---> 1636b889802f
Step 17/20 : COPY start.sh /app/start.sh
---> Using cache
---> 63cb56ee91bb
Step 18/20 : COPY startapache.sh /app/startapache.sh
---> Using cache
---> 963ade93a05b
Step 19/20 : COPY startpostgres.sh /app/startpostgres.sh
---> Using cache
---> 76a913035cd6
Step 20/20 : COPY init.sh /app/init.sh
---> Using cache
---> 499d269bd4b1
Successfully built 499d269bd4b1
Successfully tagged nominatim:latest
SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and directories.
and next:
PS C:\dev\code\macierze\nominatim-docker\3.1> docker run -t -v C:/dev/code/macierze/nominatim-docker/3.1/data:/data nomi
natim sh /app/init.sh /data/merged.osm.pbf postgresdata 4
* Starting PostgreSQL 9.5 database server [ OK ]
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "C.UTF-8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /data/postgresdata ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
creating template1 database in /data/postgresdata/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating collations ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
loading PL/pgSQL server-side language ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok
syncing data to disk ... initdb: could not fsync file "/data/postgresdata/base/1": Invalid argument
initdb: could not fsync file "/data/postgresdata/base/12374": Invalid argument
initdb: could not fsync file "/data/postgresdata/base/12379": Invalid argument
initdb: could not fsync file "/data/postgresdata/base": Invalid argument
initdb: could not fsync file "/data/postgresdata/global": Invalid argument
initdb: could not fsync file "/data/postgresdata/pg_clog": Invalid argument
initdb: could not fsync file "/data/postgresdata/pg_commit_ts": Invalid argument
initdb: could not fsync file "/data/postgresdata/pg_dynshmem": Invalid argument
initdb: could not fsync file "/data/postgresdata/pg_logical/mappings": Invalid argument
initdb: could not fsync file "/data/postgresdata/pg_logical/snapshots": Invalid argument
initdb: could not fsync file "/data/postgresdata/pg_logical": Invalid argument
initdb: could not fsync file "/data/postgresdata/pg_multixact/members": Invalid argument
initdb: could not fsync file "/data/postgresdata/pg_multixact/offsets": Invalid argument
initdb: could not fsync file "/data/postgresdata/pg_multixact": Invalid argument
initdb: could not fsync file "/data/postgresdata/pg_notify": Invalid argument
initdb: could not fsync file "/data/postgresdata/pg_replslot": Invalid argument
initdb: could not fsync file "/data/postgresdata/pg_serial": Invalid argument
initdb: could not fsync file "/data/postgresdata/pg_snapshots": Invalid argument
initdb: could not fsync file "/data/postgresdata/pg_stat": Invalid argument
initdb: could not fsync file "/data/postgresdata/pg_stat_tmp": Invalid argument
initdb: could not fsync file "/data/postgresdata/pg_subtrans": Invalid argument
initdb: could not fsync file "/data/postgresdata/pg_tblspc": Invalid argument
initdb: could not fsync file "/data/postgresdata/pg_twophase": Invalid argument
initdb: could not fsync file "/data/postgresdata/pg_xlog/archive_status": Invalid argument
initdb: could not fsync file "/data/postgresdata/pg_xlog": Invalid argument
initdb: could not fsync file "/data/postgresdata": Invalid argument
initdb: could not fsync file "/data/postgresdata/pg_tblspc": Invalid argument
ok
WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
Success. You can now start the database server using:
/usr/lib/postgresql/9.5/bin/pg_ctl -D /data/postgresdata -l logfile start
server starting
FATAL: data directory "/data/postgresdata" has wrong ownership
HINT: The server must be started by the user that owns the data directory.
NOTICE: database "nominatim" does not exist, skipping
DROP DATABASE
ERROR: the path supplied to --osm-file does not exist
the path supplied to --osm-file does not exist
pg_ctl: PID file "/data/postgresdata/postmaster.pid" does not exist
Is server running?
I'm using windows 10 & Powershell (with admin privileges). Also, propably not important - $Env:COMPOSE_CONVERT_WINDOWS_PATHS=1
is set in my PS.
I see that Fatal message, but...
Hello, I've had success with the project and modified the dockerfile to import wikipedia data but i cannot get it to work with flatnode storage of node locations as described in the Nominatim documentation.
I only get a very non-descriptive error message:
Processing: Node(32310k 375.7k/s) Way(0k 0.00k/s) Relation(0 0.00/s)Failed to write out node cache: Success Error occurred, cleaning up Error executing external command: /app/src/osm2pgsql/osm2pgsql --flat-nodes /app/src/data/flatnodes -lsc -O gazetteer --hstore --number-processes 1 -C 18090 -P 5432 -d nominatim /app/src/data.osm.pbf ERROR: Error executing external command: /app/src/osm2pgsql/osm2pgsql --flat-nodes /app/src/data/flatnodes -lsc -O gazetteer --hstore --number-processes 1 -C 18090 -P 5432 -d nominatim /app/src/data.osm.pbf
Any ideas how to get this to work?
In config with separate containers for apache and postgres 3 of 7 requests crash with error
SQLSTATE[HY000]: General error: 7 server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request.
UPDATE:
Sometimes error is:
SQLSTATE[HY000]: General error: 7 SSL SYSCALL error: EOF detected
Version 3.3
The latest tag on https://hub.docker.com/r/mediagis/nominatim/tags/ is pointing to version 3.0.1
instead of 3.1
which would be expected.
I get the following error during build.
Step 16/22 : ARG PBF_DATA=http://download.geofabrik.de/europe/germany-latest.osm.pbf
---> Running in 2b34de1ef3ba
---> d7c650986a24
Removing intermediate container 2b34de1ef3ba
Step 17/22 : RUN curl -L -f $PBF_DATA --create-dirs -o /app/src/data.osm.pbf
---> Running in 406d41420d22
curl: no URL specified!
curl: try 'curl --help' or 'curl --manual' for more information
The command '/bin/sh -c curl -L -f $PBF_DATA --create-dirs -o /app/src/data.osm.pbf' returned a non-zero code: 2
If anyone wants to use this image as a sub-part of docker-compose, it's impossible to specify PBF file location because within Dockerfile
ENV
key instead of ARG
is used.
Could you replace to the second one, please?
For "regular" nominatim installations these data files can just be dripped into a data folder and get picked up using -
wget --output-document=data/wikipedia_article.sql.bin http://www.nominatim.org/data/wikipedia_article.sql.bin
wget --output-document=data/wikipedia_redirect.sql.bin http://www.nominatim.org/data/wikipedia_redirect.sql.bin
wget --output-document=data/gb_postcode_data.sql.gz http://www.nominatim.org/data/gb_postcode_data.sql.gz
Thanks
I installed as described and everything works except for POI search it don't work. eg.
http://localhost:7070/search?format=json&q=[Hotel]&limit=50&bounded=1&viewbox=82.077664395592,28.43665715,82.877664395592,27.63665715. It return empty array as response but same query works in https://nominatim.openstreetmap.org/
When running the command:
docker run --restart=always -p 6432:5432 -p 7070:8080 -d -v /Users/agorton/nominatimdata:/var/lib/postgresql/9.5/main nominatim bash /app/start.sh
The following error occurs:
* Starting PostgreSQL 9.5 database server
* Error: Config owner (postgres:106) and data owner (root:0) do not match, and config owner is not root
...fail!
* Starting Apache httpd web server apache2
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using xxx.xxx.xxx.xxx. Set the 'ServerName' directive globally to suppress this message
Using mediagis/nominatim:3.1 configuring nominatim for updates via
docker exec -it nominatim sudo -u nominatim ./src/build/utils/update.php --import-osmosis-all
fails with sudo: unknown user: nominatim
Seems to me, that user nominatim is added in init.sh by the importing container, but not in the container executing start.sh afterwards.
Hello,
I have this issue where, after the container was started, I get the following error message when I go to "localhost:8080/search.php". According to "service postgresql status" inside the running container, everything's online (9.3/main (port 5432): online).
Here's what I see when accessing search.php.
Internal Server Error
Nominatim has encountered an internal error while accessing the database. This may happen because the database is broken or because of a bug in the software. If you think it is a bug, feel free to report it over on Github. Please include the URL that caused the problem and the complete error details below.
Message: Failed to establish database connection
SQL Error: DB Error: connect failed
Details:
[nativecode=pg_connect(): Unable to connect to PostgreSQL server: FATAL: the database system is starting up] ** pgsql://@/nominatim
I also checked the log files and they show the following:
==> /var/log/apache2/access.log <==
127.0.0.1 - - [22/Nov/2017:05:47:53 +0000] "OPTIONS * HTTP/1.0" 200 125 "-" "Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.22 (internal dummy connection)"
127.0.0.1 - - [22/Nov/2017:05:47:53 +0000] "OPTIONS * HTTP/1.0" 200 125 "-" "Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.22 (internal dummy connection)"
127.0.0.1 - - [22/Nov/2017:05:47:53 +0000] "OPTIONS * HTTP/1.0" 200 125 "-" "Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.22 (internal dummy connection)"
127.0.0.1 - - [22/Nov/2017:05:47:53 +0000] "OPTIONS * HTTP/1.0" 200 125 "-" "Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.22 (internal dummy connection)"
127.0.0.1 - - [22/Nov/2017:05:47:53 +0000] "OPTIONS * HTTP/1.0" 200 125 "-" "Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.22 (internal dummy connection)"==> /var/log/apache2/error.log <==
[Wed Nov 22 05:47:52.919962 2017] [mpm_prefork:notice] [pid 23] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.22 configured -- resuming normal operations
[Wed Nov 22 05:47:52.920287 2017] [core:notice] [pid 23] AH00094: Command line: '/usr/sbin/apache2'
[Wed Nov 22 05:47:53.943417 2017] [mpm_prefork:notice] [pid 23] AH00171: Graceful restart requested, doing restart==> /var/log/apache2/other_vhosts_access.log <==
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.3. Set the 'ServerName' directive globally to suppress this message==> /var/log/apache2/error.log <==
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.3. Set the 'ServerName' directive globally to suppress this message
[Wed Nov 22 07:17:39.541005 2017] [core:warn] [pid 161] AH00098: pid file /var/run/apache2/apache2.pid overwritten -- Unclean shutdown of previous Apache run?
[Wed Nov 22 07:17:39.544846 2017] [mpm_prefork:notice] [pid 161] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.22 configured -- resuming normal operations
[Wed Nov 22 07:17:39.544876 2017] [core:notice] [pid 161] AH00094: Command line: '/usr/sbin/apache2 -D FOREGROUND'
[Wed Nov 22 07:17:52.724268 2017] [authz_core:debug] [pid 162] mod_authz_core.c(802): [client 192.168.100.232:54833] AH01626: authorization result of Require all granted: granted
[Wed Nov 22 07:17:52.724334 2017] [authz_core:debug] [pid 162] mod_authz_core.c(802): [client 192.168.100.232:54833] AH01626: authorization result of : granted
Anything I'm doing wrong? I had a working container running in the past and I don't remember doing anything differently.
Hi guys,
I am running this docker (3.1). When i add format=json, I still get html. Any ideas?
http://ip_address:7070/details?osmtype=W&osmid=295384471&format=json
When running the command:
docker run -t -v /Users/avelferonpapel/Downloads/nominatim-docker-master/3.3/data:/data nominatim sh /app/init.sh /data/merged.osm.pbf postgresdata 4
The following error occurs:
server started
NOTICE: database "nominatim" does not exist, skipping
DROP DATABASE
ERROR: the path supplied to --osm-file does not exist
string(46) "the path supplied to --osm-file does not exist"
Someone has a solution?
many thanks
BR
Поиск в ограничительной рамке (используя параметр Viewbox) не выполняется. Установила в nominatim-docker карту Пензенской области. Выполняю запрос поиска объектов, находящихся в городе Пенза. Для этого указываю параметр viewbox. Но результаты поиска содержат не только объекты г. Пенза, но и объекты Пензенской области. Т.е фильтрации результатов с учетом viewbox не выполняется. Возможно неправильно указала параметр viewbox для г.Пензы?
Hei, I just compiled the container and I'm guessing a lot of packages are not necessary, especially the Gnome stuff, mysql, or the sound theme.
This is the list of packages that are additionally installed in the container :
libexpat1
libssl1.0.0
libroken18-heimdal
libasn1-8-heimdal
libkrb5support0
libk5crypto3
libkeyutils1
libkrb5-3
libgssapi-krb5-2
libidn11
libhcrypto4-heimdal
libheimbase1-heimdal
libwind0-heimdal
libhx509-5-heimdal
libkrb5-26-heimdal
libheimntlm0-heimdal
libgssapi3-heimdal
libsasl2-modules-db
libsasl2-2
libldap-2.4-2
librtmp0
libcurl3-gnutls
libglib2.0-0
libdbus-glib-1-2
libedit2
libelf1
libsystemd-daemon0
libapparmor1
libsystemd-login0
dbus
systemd-shim
libparted0debian1
libpolkit-gobject-1-0
libusb-1.0-0
libxau6
libxdmcp6
libxcb1
libx11-data
libx11-6
libxext6
libxml2
libxmuu1
ntfs-3g
sgml-base
sgml-base
autoconf-archive
libapr1
libaprutil1
liblzo2-2
libnettle4
libarchive13
libasan0
libasound2-data
libasound2
libasyncns0
libatasmart4
libatk1.0-data
libatk1.0-0
libatspi2.0-0
libatk-bridge2.0-0
libgtk2.0-common
fonts-dejavu-core
fontconfig-config
libfreetype6
libfontconfig1
libpixman-1-0
libxcb-render0
libxcb-shm0
libxrender1
libcairo2
libavahi-common-data
libavahi-common3
libavahi-client3
libcups2
libjpeg-turbo8
libjpeg8
libjasper1
libjbig0
libtiff5
libgdk-pixbuf2.0-common
libgdk-pixbuf2.0-0
libthai-data
libdatrie1
libthai0
fontconfig
libpango-1.0-0
libgraphite2-3
libharfbuzz0b
libpangoft2-1.0-0
libpangocairo-1.0-0
libxcomposite1
libxfixes3
libxcursor1
libxdamage1
libxi6
libxinerama1
libxrandr2
shared-mime-info
libgtk2.0-0
openssl
ca-certificates
libnspr4
tzdata-java
java-common
liblcms2-2
libpcsclite1
libogg0
libflac8
libvorbis0a
libvorbisenc2
libsndfile1
libwrap0
libpulse0
libsctp1
libgif4
x11-common
libglapi-mesa
libx11-xcb1
libxcb-dri2-0
libxcb-dri3-0
libxcb-glx0
libxcb-present0
libxcb-sync1
libxshmfence1
libxxf86vm1
libgl1-mesa-glx
libatomic1
libavahi-glib1
libbonobo2-common
libgmp10
libisl10
libcloog-isl4
libmpfr4
libmpc3
cpp-4.8
cpp
libidl-common
libidl0
liborbit-2-0
liborbit2
libbonobo2-0
libboost-atomic1.54.0
libboost-system1.54.0
libboost-chrono1.54.0
libboost-date-time1.54.0
libboost-filesystem1.54.0
libboost-serialization1.54.0
libboost-thread1.54.0
libcairo-gobject2
libltdl7
libtdb1
libvorbisfile3
sound-theme-freedesktop
libcanberra0
libcolord1
libcurl3
libdap11
libdapclient3
libdconf1
libpciaccess0
libdrm-intel1
libdrm-nouveau2
libdrm-radeon1
libepsilon1
libexif12
libfontenc1
gconf2-common
libgconf-2-4
libvpx1
libxpm4
libgd3
libquadmath0
libgfortran3
libllvm3.4
libgl1-mesa-dri
psmisc
libpython2.7-minimal
python2.7-minimal
libpython2.7-stdlib
python2.7
python-minimal
libpython-stdlib
python
libgomp1
libgphoto2-port10
libgphoto2-6
libgssrpc4
dconf-service
dconf-gsettings-backend
libgtk-3-common
libwayland-client0
libwayland-cursor0
libxkbcommon0
libgtk-3-0
libgudev-1.0-0
libhdf5-7
libicu52
libieee1284-3
libitm1
libkadm5clnt-mit9
libkdb5-7
libkadm5srv-mit9
liblua5.1-0
liblua5.2-0
mysql-common
libmysqlclient18
libodbc1
libpolkit-agent-1-0
libpolkit-backend-1-0
libpoppler44
acl
libsane-common
libv4lconvert0
libv4l-0
libsane
libsecret-common
libsecret-1-0
libsigsegv2
libfreexl1
libgeos-3.4.2
libgeos-c1
proj-data
libproj0
libspatialite5
libtsan0
libudisks2-0
libxcb-shape0
libxerces-c3.1
libxft2
libxslt1.1
libxv1
libxxf86dga1
libpq5
lsof
libgusb2
libcolorhug1
libtxc-dxtn-s2tc0
libwebp5
dosfstools
groff-base
krb5-locales
libglib2.0-data
libsasl2-modules
manpages
openssh-client
parted
rsync
xauth
xml-core
libxml-commons-resolver1.1-java
libxml-commons-external-java
libxerces2-java
libaprutil1-dbd-sqlite3
libaprutil1-ldap
apache2-bin
apache2-data
apache2
libaspectj-java
m4
autoconf
autotools-dev
automake
binutils
libc-dev-bin
linux-libc-dev
libc6-dev
libgcc-4.8-dev
gcc-4.8
gcc
libstdc++-4.8-dev
g++-4.8
g++
make
libtimedate-perl
libdpkg-perl
xz-utils
patch
dpkg-dev
build-essential
cmake-data
cmake
curl
desktop-file-utils
libfakeroot
fakeroot
fonts-dejavu-extra
libjaxp1.3-java
libxalan2-java
libapache-pom-java
libbsf-java
libavalon-framework-java
libcommons-io-java
libcommons-parent-java
libcommons-logging-java
unzip
java-wrappers
libxmlgraphics-commons-java
liberror-perl
git-man
git
glassfish-javaee
gvfs-common
gvfs-libs
hicolor-icon-theme
comerr-dev
krb5-multidev
libalgorithm-diff-perl
libalgorithm-diff-xs-perl
libalgorithm-merge-perl
libblas3
liblapack3
libarpack2
libarmadillo4
libasm3-java
libatinject-jsr330-api-java
libboost1.54-dev
libboost-atomic1.54-dev
libboost-chrono1.54-dev
libboost-serialization1.54-dev
libboost-date-time1.54-dev
libboost-dev
libboost-system1.54-dev
libboost-filesystem1.54-dev
libboost-filesystem-dev
libboost-filesystem-dev
libboost-system-dev
libboost-thread1.54-dev
libboost-thread-dev
libbz2-dev
libc3p0-java
libcglib-java
libcommons-codec-java
libcommons-collections3-java
libxz-java
libcommons-compress-java
libcommons-pool-java
libcommons-dbcp-java
libecj-java
libexpat1-dev
libfile-fcntllock-perl
libhdf4-0-alt
liburiparser1
libkml0
libnetcdfc7
libogdi3.2
libgeos-dev
libgeos++-dev
libosgi-core-java
libosgi-foundation-ee-java
libservlet2.5-java
libgeronimo-jta-1.1-spec-java
libgphoto2-l10n
libgtk-3-bin
libgtk2.0-bin
libjline-java
libltdl-dev
libtinfo-dev
libreadline6-dev
libreadline-dev
liblua5.1-0-dev
liblua5.2-dev
libluabind0.9.1
libluabind-dev
liblwgeom-2.1.2
libmysql-java
libossp-uuid16
libplexus-classworlds-java
libpostgresql-jdbc-java
libpostgis-java
zlib1g-dev
libssl-dev
libpq-dev
librhino-java
libsaxon-java
libssl-doc
libtomcat6-java
libtool
libxml2-dev
lksctp-tools
lua5.1
manpages-dev
libjpf-java
libspring-core-java
libspring-beans-java
libaopalliance-java
libspring-aop-java
libspring-expression-java
libspring-context-java
libspring-transaction-java
libspring-jdbc-java
libprotobuf-java
libosmpbf-java
pkg-config
postgresql-client-common
postgresql-client-9.3
ssl-cert
postgresql-common
postgresql-9.3-postgis-scripts
tcpd
gdisk
libproj-dev
libspring-instrument-java
proj-bin
libxtst6
dbus-x11
libice6
libsm6
libxt6
libxmu6
libxaw7
at-spi2-core
x11-utils
udisks2
gvfs-daemons
gvfs
postgresql-9.3
postgresql
postgresql-contrib-9.3
postgresql-contrib
postgresql-server-dev-9.3
systemd-services
libpam-systemd
policykit-1
colord
policykit-1-gnome
default-jre-headless
default-jre
gconf-service
libgnome2-bin
odbcinst
odbcinst1debian2
php5-json
php5-cli
php5-readline
ant
ant-optional
aspectj
libbatik-java
libfop-java
fop
libapache2-mod-php5
libgconf2-4
libgdal1h
libgeronimo-ejb-3.0-spec-java
libgeronimo-jms-1.1-spec-java
libosgi-compendium-java
libgeronimo-osgi-support-java
libgeronimo-validation-1.0-spec-java
osmosis
php-pear
php-db
php5
postgis
postgresql-9.3-postgis-2.1
rhino
libnss3-nssdb
libnss3
ca-certificates-java
openjdk-7-jre-headless
libatk-wrapper-java
libatk-wrapper-java-jni
openjdk-7-jre
gconf-service-backend
gconf2
libgnomevfs2-common
libgnomevfs2-0
libgnome2-common
libgnome2-0
libgeronimo-jpa-2.0-spec-java
Currently, Nominatim Docker (Nominatim version 3.0) by mediagis/nominatim. My issue is I cannot update contentiously. I already setup the updates in local.php
I encounter this message.. Updates not set up. Please run ./utils/update.php --init-updates
Hi I am trying to install the nominatim-image but get a error message:
root@Ubuntu-1804-bionic-64-minimal /srv/nominatim_new # docker build -t nominatim .
Sending build context to Docker daemon 3.584kB
Step 1/19 : FROM ubuntu:disco
---> 9b17fc7d6848
Step 2/19 : ENV DEBIAN_FRONTEND noninteractive
---> Using cache
---> 2698df7a0db9
Step 3/19 : ENV LANG C.UTF-8
---> Using cache
---> 350904b679d0
Step 4/19 : RUN apt-get -y update -qq && apt-get -y install locales && locale-gen en_US.UTF-8 && update-locale LANG=en_US.UTF-8 && apt-get install -y build-essential cmake g++ libboost-dev libboost-system-dev libboost-filesystem-dev libexpat1-dev zlib1g-dev libxml2-dev libbz2-dev libpq-dev libgeos-dev libgeos++-dev libproj-dev postgresql-server-dev-11 postgresql-11-postgis-2.5 postgresql-contrib-11 apache2 php php-pgsql libapache2-mod-php php-pear php-db php-intl git curl sudo python3-pip libboost-python-dev osmosis && apt-get clean && rm -rf /var/lib/apt/lists/* && rm -rf /tmp/* /var/tmp/*
---> Using cache
---> 7236ddc14195
Step 5/19 : WORKDIR /app
---> Using cache
---> 788c19d51bba
Step 6/19 : RUN echo "host all all 0.0.0.0/0 trust" >> /etc/postgresql/11/main/pg_hba.conf && echo "listen_addresses='*'" >> /etc/postgresql/11/main/postgresql.conf
---> Using cache
---> e3d6e0650261
Step 7/19 : ENV NOMINATIM_VERSION v3.3.0
---> Using cache
---> 7046d94706ca
Step 8/19 : RUN git clone --recursive https://github.com/openstreetmap/Nominatim ./src
---> Using cache
---> d2b3c1956418
Step 9/19 : RUN cd ./src && git checkout tags/$NOMINATIM_VERSION && git submodule update --recursive --init && mkdir build && cd build && cmake .. && make
---> Using cache
---> 48095d9f27a5
Step 10/19 : RUN pip3 install osmium
---> Using cache
---> 3886fbcd4425
Step 11/19 : COPY local.php /app/src/build/settings/local.php
COPY failed: stat /var/lib/docker/tmp/docker-builder766671982/local.php: no such file or directory
isn't there a file such as local.php in the image?
Hi
I'm trying to build the image on a mac (details below). When I try to build with:
docker build -t nominatim .
I get the following error:
Reading in file: /app/src/data.osm.pbf
Using PBF parser.
node cache: stored: 0(-nan%), storage efficiency: -nan% (dense blocks: 0, sparse nodes: 0), hit rate: -nan%
Osm2pgsql failed due to ERROR: PBF error: PBF format error
Error executing external command: /app/src/osm2pgsql/osm2pgsql -lsc -O gazetteer --hstore --number-processes 1 -C 1313 -P 5432 -d nominatim /app/src/data.osm.pbf
I'm running on mac os sierra (10.12.6) and Docker version 18.03.1-ce, build 9ee9f40
Any ideas what's happening?
Thanks for any advice
Liam
Hello! I have a question about version 3.3.
There is row with
@define('CONST_Database_DSN', 'pgsql:host=192.168.1.128;port=6432;user=nominatim;password=password1234;dbname=nominatim'); <driver>:host=<host>;port=<port>;user=<username>;password=<password>;dbname=<database>
But in readme it says to uncomment the line
@define('CONST_Database_DSN', 'pgsql://nominatim:[email protected]:6432/nominatim'); // <driver>://<username>:<password>@<host>:<port>/<database>
What is correct?
pgsql://nominatim:[email protected]:6432/nominatim
VS
pgsql:host=192.168.1.128;port=6432;user=nominatim;password=password1234;dbname=nominatim
The whole process works flawlessly for Monaco.
However when it comes to changing to EU's latest:
ENV PBF_DATA http://download.geofabrik.de/europe-latest.osm.pbf
The build is failing with the following error:
Reading in file: /app/src/data.osm.pbf
Using PBF parser.
node cache: stored: 0(-nan%), storage efficiency: -nan% (dense blocks: 0, sparse nodes: 0), hit rate: -nan%
Osm2pgsql failed due to ERROR: PBF error: invalid BlobHeader size (> max_blob_header_size)
ERROR: Error executing external command: /app/src/osm2pgsql/osm2pgsql -lsc -O gazetteer --hstore --number-processes 1 -C 1207 -P 5432 -d nominatim /app/src/data.osm.pbf
Error executing external command: /app/src/osm2pgsql/osm2pgsql -lsc -O gazetteer --hstore --number-processes 1 -C 1207 -P 5432 -d nominatim /app/src/data.osm.pbf
The command '/bin/sh -c service postgresql start && sudo -u postgres psql postgres -tAc "SELECT 1 FROM pg_roles WHERE rolname='nominatim'" | grep -q 1 || sudo -u postgres createuser -s nominatim && sudo -u postgres psql postgres -tAc "SELECT 1 FROM pg_roles WHERE rolname='www-data'" | grep -q 1 || sudo -u postgres createuser -SDR www-data && sudo -u postgres psql postgres -c "DROP DATABASE IF EXISTS nominatim" && useradd -m -p password1234 nominatim && chown -R nominatim:nominatim ./src && sudo -u nominatim ./src/utils/setup.php --osm-file /app/src/data.osm.pbf --all --threads 2 && service postgresql stop' returned a non-zero code: 255
In the beginning I though it was a RAM issue so I pumped it up to 120 GB!
But it seems that it is more of a postegres params issue. Any idea?
After long image build this happens:
PS G:\geodata\nominatim-docker\3.0> docker run --restart=always -p 8080:8080 --name nominatim-monacco nominatim
/bin/sh: 1: /app/start.sh: not found
What I do:
cd /opt/mediagis/nominatim-docker/3.3
docker build -t nominatim .
cd /opt/osrm/src
wget http://download.geofabrik.de/asia/maldives-latest.osm.pbf
docker run -t -v /opt/osrm/src:/data nominatim sh /app/init.sh /data/maldives-latest.osm.pbf postgresdata 4
docker run --restart=always -p 6432:5432 -p 7070:8080 -d --name nominatim -v /opt/osrm/src/postgresdata:/var/lib/postgresql/9.5/main nominatim bash /app/start.sh
[root@localhost src]# curl 'http://localhost:7070'
`
<style> em { font-weight: bold; font-family: monospace; color: #e00404; background-color: #ffeaea; } </style> <p>Nominatim has encountered an internal error while accessing the database.
This may happen because the database is broken or because of a bug in
the software.</p>
<h3>Details</h3>
Failed to establish database connection:SQLSTATE[08006] [7] FATAL: role "www-data" does not exist
<p>
If you feel this error is incorrect feel file an issue on
<a href="https://github.com/openstreetmap/Nominatim/issues">Github</a>.
Please include the error message above and the URL you used.
</p>
dear,
i am trying to update some data in the release files (even a small a change, like changing a title)
when i run my docker container it dosn't start, and says somthing like "Fatal Error : .........."
the purpos of my edits, is adapting the Json output format to my needs.
also i have noticed when using htop, just after starting the container, that there is no activity with pgsql.
what i am missing ?
I'm trying to build nominatim-docker 3.1 on rhel 7.4 and getting connection timeouts though I can manually pull the resource
$ docker build -t nominatim .
Sending build context to Docker daemon 15.36 kB
Sending build context to Docker daemon
Step 0 : FROM ubuntu:xenial
Trying to pull repository docker.io/ubuntu ... failed
INFO[0142] Get https://index.docker.io/v1/repositories/library/ubuntu/images: dial tcp 34.203.15.50:443: connection timed out
$ wget https://index.docker.io/v1/repositories/library/ubuntu/images
--2018-12-06 16:59:11-- https://index.docker.io/v1/repositories/library/ubuntu/images
Connecting to 10.144.27.35:8080... connected.
Proxy request sent, awaiting response... 200 OK
Length: unspecified [application/json]
Saving to: ‘images’
[ <=> ] 2 --.-K/s in 0s
2018-12-06 16:59:11 (118 KB/s) - ‘images’ saved [2]
Could this be a problem with docker version installed? I'm on 1.5
When i try to run the image it gives me permission error, so adding this line it will work fine in Dockerfile.
RUN ["chmod", "+x", "/app/start.sh"]
So it will be like this
...
EXPOSE 5432
EXPOSE 8080
COPY start.sh /app/start.sh
RUN ["chmod", "+x", "/app/start.sh"]
CMD /app/start.sh
Hi all, has anyone ran into this issue before? Ideas for workaround?
Operating System: Windows 10
Version: 3.3
Osm.pbf file: North America Latest
Description:
I run the commands from your installation instructions after creating a docker file for the data and copying all data to the volume. The line terminators were changed to make this work from \r\n to \n. Otherwise, installation fails.
Now, I get an issue at the end of the build when I try to import the data at the end of the load. This is not from a combined file.
This issue does not happen on Ubuntu
What this is not:
What this could be:
Question or call to action:
How can I resolve this? Can this be resolved? If so from the files, could someone either tell me how or do so? Thanks.
Error:
PS E:\nominatim-data\use> docker run -t -v postgres:/data nominatim sh /app/init.sh /data/north-america-latest.osm.pbf
postgresdata 2
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "C.UTF-8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /data/postgresdata ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default timezone ... Etc/UTC
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok
WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
Success. You can now start the database server using:
/usr/lib/postgresql/11/bin/pg_ctl -D /data/postgresdata -l logfile start
waiting for server to start....2019-06-24 08:47:21.321 UTC [26] LOG: listening on IPv4 address "127.0.0.1", port 5432
2019-06-24 08:47:21.321 UTC [26] LOG: could not bind IPv6 address "::1": Cannot assign requested address
2019-06-24 08:47:21.321 UTC [26] HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
2019-06-24 08:47:21.433 UTC [26] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2019-06-24 08:47:21.635 UTC [27] LOG: database system was shut down at 2019-06-24 08:47:18 UTC
2019-06-24 08:47:21.704 UTC [26] LOG: database system is ready to accept connections
done
server started
NOTICE: database "nominatim" does not exist, skipping
DROP DATABASE
2019-06-24 08:56:13 == module path: /app/src/build/module
2019-06-24 08:56:13 == Create DB
2019-06-24 08:56:13.736 UTC [98] FATAL: database "nominatim" does not exist
2019-06-24 08:56:16 == Setup DB
Postgres version found: 11
Postgis version found: 2.5
2019-06-24 08:56:27 == WARNING: optional external UK postcode table file (/app/src/data/gb_postcode_data.sql.gz) not found. Skipping.
2019-06-24 08:56:28 == Import data
osm2pgsql version 0.96.0 (64 bit id space)
Parsing gazetteer style file '/app/src/settings/import-full.style'.
Using projection SRS 4326 (Latlong)
NOTICE: table "place" does not exist, skipping
Allocating memory for dense node cache
Allocating dense node cache in one big chunk
Allocating memory for sparse node cache
Sharing dense sparse
Node-cache: cache=4172MB, maxblocks=66752*65536, allocation method=11
Mid: pgsql, cache=4172
Setting up table: planet_osm_nodes
NOTICE: table "planet_osm_nodes" does not exist, skipping
Setting up table: planet_osm_ways
NOTICE: table "planet_osm_ways" does not exist, skipping
Setting up table: planet_osm_rels
NOTICE: table "planet_osm_rels" does not exist, skipping
Reading in file: /data/north-america-latest.osm.pbf
Using PBF parser.
Processing: Node(145900k 48.5k/s) Way(0k 0.00k/s) Relation(0 0.00/s)2019-06-24 09:47:03.275 UTC [319] LOG: using stale statistics instead of current ones because stats collector is not responding
Processing: Node(147560k 47.4k/s) Way(0k 0.00k/s) Relation(0 0.00/s)2019-06-24 09:49:03.333 UTC [323] LOG: using stale statistics instead of current ones because stats collector is not responding
Processing: Node(392170k 34.0k/s) Way(0k 0.00k/s) Relation(0 0.00/s)2019-06-24 12:09:05.878 UTC [603] LOG: using stale statistics instead of current ones because stats collector is not responding
Processing: Node(1094243k 29.6k/s) Way(86731k 0.32k/s) Relation(91790 15.89/s)2019-06-28 00:25:15.390 UTC [214] LOG: unexpected EOF on client connection with an open transaction
2019-06-28 00:25:15.983 UTC [213] LOG: unexpected EOF on client connection with an open transaction
Killed
2019-06-28 00:25:16.154 UTC [215] LOG: incomplete message from client
2019-06-28 00:25:16.154 UTC [215] CONTEXT: COPY planet_osm_rels, line 91836
2019-06-28 00:25:16.154 UTC [215] STATEMENT: COPY planet_osm_rels FROM STDIN
2019-06-28 00:25:16.393 UTC [215] ERROR: unexpected EOF on client connection with an open transaction
2019-06-28 00:25:16.393 UTC [215] CONTEXT: COPY planet_osm_rels, line 91836
2019-06-28 00:25:16.393 UTC [215] STATEMENT: COPY planet_osm_rels FROM STDIN
2019-06-28 00:25:16.154 UTC [212] LOG: incomplete message from client
2019-06-28 00:25:16.154 UTC [212] CONTEXT: COPY place, line 42107155
2019-06-28 00:25:16.154 UTC [212] STATEMENT: COPY place (osm_type, osm_id, class, type, name, admin_level, address, extratags, geometry) FROM STDIN
2019-06-28 00:25:16.424 UTC [215] LOG: could not send data to client: Broken pipe
2019-06-28 00:25:16.424 UTC [215] STATEMENT: COPY planet_osm_rels FROM STDIN
2019-06-28 00:25:16.428 UTC [212] ERROR: unexpected EOF on client connection with an open transaction
2019-06-28 00:25:16.428 UTC [212] CONTEXT: COPY place, line 42107155
2019-06-28 00:25:16.428 UTC [212] STATEMENT: COPY place (osm_type, osm_id, class, type, name, admin_level, address, extratags, geometry) FROM STDIN
2019-06-28 00:25:16.459 UTC [212] LOG: could not send data to client: Broken pipe
2019-06-28 00:25:16.459 UTC [212] STATEMENT: COPY place (osm_type, osm_id, class, type, name, admin_level, address, extratags, geometry) FROM STDIN
2019-06-28 00:25:25.196 UTC [102] ERROR: relation "place" does not exist at character 15
2019-06-28 00:25:25.196 UTC [102] STATEMENT: select * from place limit 1
2019-06-28 00:25:25.224 UTC [215] FATAL: terminating connection because protocol synchronization was lost
PHP Fatal error: Uncaught Nominatim\DatabaseError: [500]: Database query failed
thrown in /app/src/lib/DB.php on line 187
I am trying to update my nominatim data. The first import was done for europe. I tried running the following command.
sudo docker exec -it openstreetmaps_nominatim_1 sudo -u nominatim src/utils/update.php --import-osmosis-all
The output is the following
2018-01-29 09:21:09 Replication Delay is 21603559
/usr/bin/osmosis --read-replication-interval workingDirectory=/app/src/settings --simplify-change --write-xml-change /app/src/data/osmosischange.osc
Jan 29, 2018 9:21:09 AM org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.40.1
Jan 29, 2018 9:21:09 AM org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
Jan 29, 2018 9:21:09 AM org.openstreetmap.osmosis.core.Osmosis run
INFO: Launching pipeline execution.
Jan 29, 2018 9:21:09 AM org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline executing, waiting for completion.
Jan 29, 2018 9:21:09 AM org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskManager waitForCompletion
SEVERE: Thread for task 1-read-replication-interval failed
org.openstreetmap.osmosis.core.OsmosisRuntimeException: Unable to read the state from the server.
at org.openstreetmap.osmosis.replication.common.ServerStateReader.getServerState(ServerStateReader.java:105)
at org.openstreetmap.osmosis.replication.common.ServerStateReader.getServerState(ServerStateReader.java:60)
at org.openstreetmap.osmosis.replication.v0_6.BaseReplicationDownloader.download(BaseReplicationDownloader.java:237)
at org.openstreetmap.osmosis.replication.v0_6.BaseReplicationDownloader.runImpl(BaseReplicationDownloader.java:279)
at org.openstreetmap.osmosis.replication.v0_6.BaseReplicationDownloader.run(BaseReplicationDownloader.java:349)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.FileNotFoundException: http://download.geofabrik.de/europe-updates/000/001/528.state.txt
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1674)
at org.openstreetmap.osmosis.replication.common.ServerStateReader.getServerState(ServerStateReader.java:91)
... 5 more
I think that it tries to find the file http://download.geofabrik.de/europe-updates/000/001/528.state.txt
which doesn't exist. Why am I getting this? Is there a way to fix it?
Version: 2.5
Hello together,
I've cloned your github repository and have built it locally on my Windows 10 machine. After that, I've started running the container. The container was created successfully and runs on port
5432/tcp, 0.0.0.0:8080->8080/tcp.
If I try to open http://localhost:8080/ in a webbrowser, the error message "You don't have permission to access / on this server." appears.
Hopefully you know what is going on,
Jan
Synopsis:
Each search query times out for Nominatim 2.5 running on a full Germany map.
Details:
I am trying to use nominatim-docker approach to create a working Nominatim docker image for Germany. After several building days the image was created (about 90Gb), but I am having difficulties to perform any query. Here are all the Postgres log entries after starting the image in docker container and making a query from Nominatim web interface:
2017-12-11 18:23:43 UTC LOG: database system was shut down at 2017-12-04 07:51:31 UTC
2017-12-11 18:23:43 UTC LOG: MultiXact member wraparound protections are now enabled
2017-12-11 18:23:43 UTC LOG: database system is ready to accept connections
2017-12-11 18:23:43 UTC LOG: autovacuum launcher started
2017-12-11 18:23:44 UTC LOG: incomplete startup packet
2017-12-11 18:25:35 UTC ERROR: canceling statement due to statement timeout
2017-12-11 18:25:35 UTC STATEMENT: select place_id, 0::int as exactmatch from search_name where name_vector @> ARRAY[2513074] order by (case when importance = 0 OR importance IS NULL then 0.75-(search_rank::float/40) else importance end) DESC limit 20
CPU usage is almost zero, RAM usage is also tiny. Nothing seems much to happen before and after the request is done. During the request is done i see at least one of 8 cores sometimes loaded up to 50% by a postgres process
The server has 122 Gb RAM and like 80Gb disk space free for use (checked from being within a docker container)
btw, is there some way to "warm-up" RAM and preload it with Postgres' OSM map content ?
Hints are welcome!
Please update the docker to support nominatim 3.0.0
I followed the instruction exactly as on the 3.3 documentation (docker run -t -v /home/bigdata/nominatim:/data nominatim sh /app/init.sh /data/merged.osm.pbf postgresdata 4) but ended up with this error:
ERROR: the path supplied to --osm-file does not exist
string(46) "the path supplied to --osm-file does not exist"
The folder itself is mounted on a 4TB partition, could that be a reason?
I am installing nominatim-docker 3.0 on VM with 128 GB RAM and 8 vcpus with 1TB disk. I am almost going to run out of disk(only 10 GB left). I am wondering if it is ok to restart pgsql service to stop rank 30 index/update. Here are last few steps of docker file.
...
...
...
RUN service postgresql start && \
sudo -u postgres psql postgres -tAc "SELECT 1 FROM pg_roles WHERE rolname='nominatim'" | grep -q 1 || sudo -u postgres createuser -s nominatim && \
sudo -u postgres psql postgres -tAc "SELECT 1 FROM pg_roles WHERE rolname='www-data'" | grep -q 1 || sudo -u postgres createuser -SDR www-data && \
sudo -u postgres psql postgres -c "DROP DATABASE IF EXISTS nominatim" && \
useradd -m -p password1234 nominatim && \
chown -R nominatim:nominatim ./src && \
sudo -u nominatim ./src/build/utils/setup.php --osm-file /app/src/data.osm.pbf --all --threads 6 --osm2pgsql-cache 20000 && \
service postgresql stop
EXPOSE 5432
EXPOSE 8080
COPY start.sh /app/start.sh
CMD /app/start.sh
My question: Are rank 30 updates so critical for geocoding?
If I restart postgresql at this stage of installation, would nominatim api be functional?
My current install is for the test purpose and I just want to checkout nominatim local.
Trying to import germany-latest (3GB, http://ftp5.gwdg.de/pub/misc/openstreetmap/download.geofabrik.de/germany-latest.osm.pbf)
All works fine until Using PBF parser
where it fails after some processing:
Processing: Node(263768k 707.2k/s) Way(42367k 44.98k/s) Relation(0 0.00/s)COPY_END for COPY planet_osm_ways FROM STDIN;
failed: ERROR: could not extend file "base/16386/19189.2": No space left on device
HINT: Check free disk space.
CONTEXT: COPY planet_osm_ways, line 11051968
Maybe I am missing some docker setting? I have tried setting "storage-opts": ["dm.basesize=100G"]
in the /etc/docker/daemon.json
, and /var/lib/docker
has enough space.
I just tried to build this via docker.
This command RUN git clone --recursive git://github.com/twain47/Nominatim.git ./src
is failing with:
fatal: unable to connect to github.com:
github.com[0: 192.30.253.112]: errno=Connection refused
github.com[1: 192.30.253.113]: errno=Connection refused
I've just found out that the repository was moved.
See: osm-search/Nominatim@a52455f
Dear mediagis,
I have a question regarding updating the nominatim data on docker. but unfortunately, I encounter this message.. Updates not set up. Please run ./utils/update.php --init-updates
When I run this command
docker exec -it nominatim sudo -u nominatim ./src/utils/update.php --init-updates :
Functions
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
NOTICE: drop cascades to function get_addressdata(bigint,integer)
DROP TYPE
CREATE TYPE
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
NOTICE: drop cascades to function get_wikipedia_match(hstore,character varying)
Instruction that I follow. This is working for a 3 months
https://hub.docker.com/r/mediagis/nominatim/
Hope you can help about this issue.. thank you in advance
I'd like to know what I will need to do to get regular updates when osm data changes without recreating the whole container. Cheers Jens
Getting below error after setup finished.
Summary of warnings:
2018-11-12 23:45:57 == Setup finished.
ERROR: relation "public.planet_osm_ways" does not exist
STATEMENT: CREATE INDEX nodes_index ON public.planet_osm_ways USING gin (nodes);
ERROR: relation "public.planet_osm_ways" does not exist
LOG: received fast shutdown request
LOG: aborting any active transactions
FATAL: terminating autovacuum process due to administrator command
LOG: autovacuum launcher shutting down
waiting for server to shut down....LOG: shutting down
...LOG: database system is shut down
.. done
server stopped
Hi,
I am using the latest 3.3 Dockerfile. After a fresh build and importing the data I want to setup the update mechanism like it is described here: https://github.com/mediagis/nominatim-docker/blob/master/3.3/README.md#update
→ sudo docker exec -it nominatim sudo -u postgres ./src/build/utils/update.php --init-updates
2019-05-24 12:14:07 == module path: /app/src/build/module
2019-05-24 12:14:07 == Create Functions
ERROR: HTTP Error 404: Not Found
ERROR: HTTP Error 404: Not Found
ERROR: HTTP Error 404: Not Found
ERROR: HTTP Error 404: Not Found
ERROR: HTTP Error 404: Not Found
Done. Database updates will start at sequence 2252 (2019-05-18T17:12:29Z)
Seems fine, although I did not look into 404er errors.
→ sudo docker exec -it nominatim sudo -u postgres ./src/build/utils/update.php --import-osmosis-all
Currently at sequence 2252 (18/05/2019 20:12:29) - 1 indexed
/usr/local/bin/pyosmium-get-changes --server https://download.geofabrik.de/europe-updates -o /app/src/build/osmosischange.osc -s 30 -I 2252
Traceback (most recent call last):
File "/usr/local/bin/pyosmium-get-changes", line 243, in <module>
exit(main(sys.argv[1:]))
File "/usr/local/bin/pyosmium-get-changes", line 224, in main
outhandler = WriteHandler(options.outfile)
RuntimeError: Open failed for '/app/src/build/osmosischange.osc': Permission denied
ERROR: updates failed.%
This is the result when I run the update script. Seems like there is an issue with folder permissions. After manually fixing that and adding in the container I get the following message:
→ sudo docker exec -it nominatim sudo -u postgres ./src/build/utils/update.php --import-osmosis-all
Currently at sequence 2252 (18/05/2019 20:12:29) - 1 indexed
/usr/local/bin/pyosmium-get-changes --server https://download.geofabrik.de/europe-updates -o /app/src/build/osmosischange.osc -s 30 -I 2252
Traceback (most recent call last):
File "/app/src/utils/osm_file_date.py", line 3, in <module>
import osmium
ImportError: No module named osmium
ERROR: Error getting date from diff file.
string(34) "Error getting date from diff file."
So it seems like there are modules etc. in the docker image missing to run the update.
Thanks
Failed to establish database connection:SQLSTATE[08006] [7] could not connect to server: No such file or directory
Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
Full log of DB installation:
[root@localhost map]# docker run -t -v /opt/nominatim/src/map:/data nominatim sh /app/init.sh /data/maldives-latest.osm.pbf postgresdata 40
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "C.UTF-8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /data/postgresdata ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok
WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
Success. You can now start the database server using:
/usr/lib/postgresql/11/bin/pg_ctl -D /data/postgresdata -l logfile start
waiting for server to start....2019-06-04 13:06:31.989 UTC [27] LOG: listening on IPv4 address "127.0.0.1", port 5432
2019-06-04 13:06:31.989 UTC [27] LOG: could not bind IPv6 address "::1": Cannot assign requested address
2019-06-04 13:06:31.989 UTC [27] HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
2019-06-04 13:06:32.110 UTC [27] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2019-06-04 13:06:32.370 UTC [28] LOG: database system was shut down at 2019-06-04 13:06:31 UTC
2019-06-04 13:06:32.462 UTC [27] LOG: database system is ready to accept connections
done
server started
NOTICE: database "nominatim" does not exist, skipping
DROP DATABASE
2019-06-04 13:11:29 == module path: /app/src/build/module
2019-06-04 13:11:29 == Create DB
2019-06-04 13:11:29.981 UTC [95] FATAL: database "nominatim" does not exist
2019-06-04 13:11:31 == Setup DB
Postgres version found: 11
Postgis version found: 2.5
2019-06-04 13:11:40 == WARNING: optional external UK postcode table file (/app/src/data/gb_postcode_data.sql.gz) not found. Skipping.
2019-06-04 13:11:41 == Import data
osm2pgsql version 0.96.0 (64 bit id space)
Parsing gazetteer style file '/app/src/settings/import-full.style'.
Using projection SRS 4326 (Latlong)
NOTICE: table "place" does not exist, skipping
Allocating memory for dense node cache
Allocating dense node cache in one big chunk
Allocating memory for sparse node cache
Sharing dense sparse
Node-cache: cache=3136MB, maxblocks=50176*65536, allocation method=11
Mid: pgsql, cache=3136
Setting up table: planet_osm_nodes
NOTICE: table "planet_osm_nodes" does not exist, skipping
Setting up table: planet_osm_ways
NOTICE: table "planet_osm_ways" does not exist, skipping
Setting up table: planet_osm_rels
NOTICE: table "planet_osm_rels" does not exist, skipping
Reading in file: /data/maldives-latest.osm.pbf
Using PBF parser.
Processing: Node(367k 183.8k/s) Way(27k 27.29k/s) Relation(860 430.00/s) parse time: 5s
Node stats: total(367691), max(6516133640) in 2s
Way stats: total(27287), max(693469837) in 1s
Relation stats: total(881), max(9637303) in 2s
Setting up table: planet_osm_nodes
Setting up table: planet_osm_ways
Setting up table: planet_osm_rels
Going over pending ways...
0 ways are pending
Using 1 helper-processes
Finished processing 0 ways in 1 s
0 Pending ways took 1s at a rate of 0.00/s
Going over pending relations...
0 relations are pending
Using 1 helper-processes
Finished processing 0 relations in 1 s
0 Pending relations took 1s at a rate of 0.00/s
node cache: stored: 367691(100.00%), storage efficiency: 49.55% (dense blocks: 2, sparse nodes: 362834), hit rate: 100.00%
Stopping table: planet_osm_nodes
Stopped table: planet_osm_nodes in 0s
Stopping table: planet_osm_ways
Stopped table: planet_osm_ways in 0s
Stopping table: planet_osm_rels
Building index on table: planet_osm_rels
Stopped table: planet_osm_rels in 0s
Osm2pgsql took 8s overall
2019-06-04 13:11:49 == Create Functions
2019-06-04 13:11:51 == Create Tables
2019-06-04 13:11:56 == Create Functions
2019-06-04 13:11:58 == Create Partition Tables
2019-06-04 13:15:03 == Create Partition Functions
2019-06-04 13:15:04 == WARNING: wikipedia article dump file not found - places will have default importance
2019-06-04 13:15:04 == WARNING: wikipedia redirect dump file not found - some place importance values may be missing
2019-06-04 13:15:04 == Drop old Data
......................................................................................................................................................................................................................................................................
2019-06-04 13:17:01 == Loading word list
count
-------
3873
(1 row)
count
-------
718
(1 row)
2019-06-04 13:17:04 == Load Data
2019-06-04 13:17:14 == Reanalysing database
Latest data imported from 2019-05-30T06:57:19Z.
2019-06-04 13:17:19 == Calculate Postcodes
2019-06-04 13:17:26 == Index ranks 0 - 4
nominatim version 3.3.0
Starting indexing rank (0 to 4) using 40 threads
Starting rank 0
Done 0 in 0 @ 0.000000 per second - FINISHED
Starting rank 1
Done 0 in 0 @ 0.000000 per second - FINISHED
Starting rank 2
Done 2 in 1 @ 2.000000 per second - ETA (seconds): 0.000000
Done 2 in 1 @ 2.000000 per second - FINISHED
Starting rank 3
Done 0 in 0 @ 0.000000 per second - FINISHED
Starting rank 4
Done 2 in 0 @ 2.000000 per second - ETA (seconds): 0.000000
Done 2 in 0 @ 2.000000 per second - FINISHED
2019-06-04 13:17:34 == Index ranks 5 - 25
nominatim version 3.3.0
Starting indexing rank (5 to 25) using 40 threads
Starting rank 5
Done 0 in 0 @ 0.000000 per second - FINISHED
Starting rank 6
Done 0 in 0 @ 0.000000 per second - FINISHED
Starting rank 7
Done 0 in 0 @ 0.000000 per second - FINISHED
Starting rank 8
Slow place_id 108739
Done 21 in 2 @ 10.500000 per second - ETA (seconds): 0.000000
Done 21 in 2 @ 10.500000 per second - FINISHED
Starting rank 9
Done 0 in 0 @ 0.000000 per second - FINISHED
Starting rank 10
Done 0 in 0 @ 0.000000 per second - FINISHED
Starting rank 11
Done 0 in 0 @ 0.000000 per second - FINISHED
Starting rank 12
Done 0 in 0 @ 0.000000 per second - FINISHED
Starting rank 13
Done 0 in 0 @ 0.000000 per second - FINISHED
Starting rank 14
Done 0 in 0 @ 0.000000 per second - FINISHED
Starting rank 15
Done 1 in 0 @ 1.000000 per second - ETA (seconds): 0.000000
Done 1 in 0 @ 1.000000 per second - FINISHED
Starting rank 16
Done 3 in 0 @ 3.000000 per second - ETA (seconds): 0.000000
Done 3 in 0 @ 3.000000 per second - FINISHED
Starting rank 17
Slow place_id 104395
Slow place_id 103536
Slow place_id 109193
Slow place_id 102650
Slow place_id 102479
Slow place_id 103059
Slow place_id 103046
Slow place_id 103274
Slow place_id 103990
Slow place_id 103786
Slow place_id 112853
Slow place_id 106029
Slow place_id 102949
Done 173 in 2 @ 86.500000 per second - ETA (seconds): 0.000000
Done 173 in 2 @ 86.500000 per second - FINISHED
Starting rank 18
Done 18 in 0 @ 18.000000 per second - ETA (seconds): 0.000000
Done 18 in 0 @ 18.000000 per second - FINISHED
Starting rank 19
Done 8 in 0 @ 8.000000 per second - ETA (seconds): 0.000000
Done 8 in 0 @ 8.000000 per second - FINISHED
Starting rank 20
Done 219 in 1 @ 219.000000 per second - ETA (seconds): 0.000000
Done 219 in 1 @ 219.000000 per second - FINISHED
Starting rank 21
Done 3 in 0 @ 3.000000 per second - ETA (seconds): 0.000000
Done 3 in 0 @ 3.000000 per second - FINISHED
Starting rank 22
Done 56 in 0 @ 56.000000 per second - ETA (seconds): 0.000000
Done 56 in 0 @ 56.000000 per second - FINISHED
Starting rank 23
Done 0 in 0 @ 0.000000 per second - FINISHED
Starting rank 24
Done 52 in 0 @ 52.000000 per second - ETA (seconds): 0.000000
Done 52 in 0 @ 52.000000 per second - FINISHED
Starting rank 25
Done 0 in 0 @ 0.000000 per second - FINISHED
2019-06-04 13:17:45 == Index ranks 26 - 30
nominatim version 3.3.0
Starting indexing rank (26 to 30) using 40 threads
Starting rank 26
Slow place_id 106782
Slow place_id 106398
Slow place_id 103597
Slow place_id 111544
Slow place_id 112468
Slow place_id 105194
Slow place_id 112377
Slow place_id 105184
Slow place_id 105468
Slow place_id 107904
Slow place_id 112225
Slow place_id 111500
Slow place_id 111196
Slow place_id 105428
Slow place_id 101774
Slow place_id 106348
Slow place_id 104617
Slow place_id 104399
Slow place_id 107080
Slow place_id 112217
Slow place_id 104902
Slow place_id 105406
Slow place_id 108212
Slow place_id 100244
Slow place_id 100242
Slow place_id 104622
Slow place_id 104624
Slow place_id 105174
Slow place_id 105109
Slow place_id 105170
Slow place_id 112843
Slow place_id 111558
Slow place_id 101772
Slow place_id 100338
Slow place_id 100243
Slow place_id 112858
Slow place_id 107083
Slow place_id 105268
Slow place_id 101771
Done 637 in 5 @ 127.400002 per second - Rank 26 ETA (seconds): 36.907379
Done 1657 in 7 @ 236.714279 per second - Rank 26 ETA (seconds): 15.554617
Done 2607 in 9 @ 289.666656 per second - Rank 26 ETA (seconds): 9.431531
Done 3558 in 11 @ 323.454559 per second - Rank 26 ETA (seconds): 5.506183
Done 4592 in 13 @ 353.230774 per second - Rank 26 ETA (seconds): 2.114765
Done 5339 in 14 @ 381.357147 per second - ETA (seconds): 0.000000
Done 6060 in 16 @ 378.750000 per second - Rank 26 ETA (seconds): -1.903630
Done 6540 in 17 @ 384.705872 per second - Rank 26 ETA (seconds): -3.121866
Done 7299 in 18 @ 405.500000 per second - Rank 26 ETA (seconds): -4.833539
Done 8019 in 19 @ 422.052643 per second - Rank 26 ETA (seconds): -6.349919
Done 8741 in 20 @ 437.049988 per second - Rank 26 ETA (seconds): -7.784007
Done 9541 in 21 @ 454.333344 per second - Rank 26 ETA (seconds): -9.248715
Done 10301 in 23 @ 447.869568 per second - Rank 26 ETA (seconds): -11.079119
Done 10678 in 23 @ 464.260864 per second - ETA (seconds): -11.500000
Done 10678 in 23 @ 464.260864 per second - FINISHED
Starting rank 27
Done 128 in 1 @ 128.000000 per second - ETA (seconds): 0.000000
Done 128 in 1 @ 128.000000 per second - FINISHED
Starting rank 28
Done 0 in 0 @ 0.000000 per second - FINISHED
Starting rank 29
Done 0 in 0 @ 0.000000 per second - FINISHED
Starting interpolation lines (location_property_osmline)
Done 19 in 0 @ 19.000000 per second - ETA (seconds): 0.000000
Done 19 in 0 @ 19.000000 per second - FINISHED
Starting rank 30
Done 1151 in 3 @ 383.666656 per second - Rank 30 ETA (seconds): 14.801911
Done 2244 in 6 @ 374.000000 per second - Rank 30 ETA (seconds): 12.262033
Done 3487 in 8 @ 435.875000 per second - Rank 30 ETA (seconds): 7.669630
Done 4642 in 11 @ 422.000000 per second - Rank 30 ETA (seconds): 5.184834
Done 5675 in 13 @ 436.538452 per second - Rank 30 ETA (seconds): 2.645815
Done 6755 in 15 @ 450.333344 per second - Rank 30 ETA (seconds): 0.166543
Done 6830 in 16 @ 426.875000 per second - ETA (seconds): 0.000000
Done 7590 in 17 @ 446.470581 per second - Rank 30 ETA (seconds): -1.702240
Done 8271 in 18 @ 459.500000 per second - Rank 30 ETA (seconds): -3.136017
Done 9030 in 19 @ 475.263153 per second - Rank 30 ETA (seconds): -4.629014
Done 9790 in 20 @ 489.500000 per second - Rank 30 ETA (seconds): -6.046987
Done 10592 in 22 @ 481.454559 per second - Rank 30 ETA (seconds): -7.813821
Done 11272 in 23 @ 490.086945 per second - Rank 30 ETA (seconds): -9.063698
Done 11986 in 24 @ 499.416656 per second - Rank 30 ETA (seconds): -10.324045
Done 12746 in 25 @ 509.839996 per second - Rank 30 ETA (seconds): -11.603641
Done 13470 in 26 @ 518.076904 per second - Rank 30 ETA (seconds): -12.816630
Done 13660 in 27 @ 505.925934 per second - ETA (seconds): -13.500000
Done 13660 in 27 @ 505.925934 per second - FINISHED
2019-06-04 13:18:38 == Index postcodes
2019-06-04 13:18:47 == Create Search indices
2019-06-04 13:18:50 == Create search index for default country names
getorcreate_country
---------------------
48915
(1 row)
getorcreate_country
---------------------
48916
(1 row)
count
-------
251
(1 row)
count
-------
247
(1 row)
count
-------
11688
(1 row)
Summary of warnings:
* optional external UK postcode table file (/app/src/data/gb_postcode_data.sql.gz) not found. Skipping.
* wikipedia article dump file not found - places will have default importance
* wikipedia redirect dump file not found - some place importance values may be missing
2019-06-04 13:18:53 == Setup finished.
waiting for server to shut down....2019-06-04 13:18:54.049 UTC [27] LOG: received fast shutdown request
2019-06-04 13:18:54.120 UTC [27] LOG: aborting any active transactions
2019-06-04 13:18:54.133 UTC [27] LOG: background worker "logical replication launcher" (PID 34) exited with exit code 1
..2019-06-04 13:18:56.872 UTC [29] LOG: shutting down
.2019-06-04 13:18:58.039 UTC [27] LOG: database system is shut down
done
server stopped
[root@localhost map]# docker run --restart=always -p 6432:5432 -p 7070:8080 -d --name nominatim -v /opt/osrm/src/map/postgresdata:/var/lib/postgresql/11/main nominatim bash /app/start.sh
60efb973fab9da98eec10dd7c524db4556d60de1bdd4fb07a7f9d0def53f1c26
[root@localhost map]# curl 'http://localhost:7070'
<!DOCTYPE html>
<html lang="en">
<head>
<style>
em { font-weight: bold; font-family: monospace; color: #e00404; background-color: #ffeaea; }
</style>
</head>
<body>
<h1>Internal Server Error</h1>
<p>Nominatim has encountered an internal error while accessing the database.
This may happen because the database is broken or because of a bug in
the software.</p>
<h3>Details</h3>
Failed to establish database connection:SQLSTATE[08006] [7] could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
<p>
If you feel this error is incorrect feel file an issue on
<a href="https://github.com/openstreetmap/Nominatim/issues">Github</a>.
Please include the error message above and the URL you used.
</p>
</body>
</html>
From the docker quickstart terminal I following the instructions to install. I run the command,
docker run http://wiki.openstreetmap.org/wiki/nominatim
and I get this error:
c:\program files\docker toolbox\docker.exe: invald reference format.
I haven't found any information on this on Nominatim website or here.
Is it possible to use the container with Nominatim, while I'm building the databse on a local folder? The reason is that I started the process on the full data, but it takes weeks to run, but Id like to start using the image because I don't want to test my apps against an official or free registry (ToU and other reasons like these).
I ve a got a strange error when trying to build the database
Docker is run in WSL (installed on windows 10), below is the full log.
Can someone help me with that please?
This user must also own the server process.
The database cluster will be initialized with locale "C.UTF-8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /data/postgresdata ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
creating template1 database in /data/postgresdata/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating collations ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
loading PL/pgSQL server-side language ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok
syncing data to disk ... ok
WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
Success. You can now start the database server using:
/usr/lib/postgresql/9.5/bin/pg_ctl -D /data/postgresdata -l logfile start
server starting
LOG: could not bind IPv6 socket: Cannot assign requested address
HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
LOG: database system was shut down at 2019-02-26 16:13:34 UTC
LOG: MultiXact member wraparound protections are now enabled
LOG: database system is ready to accept connections
LOG: autovacuum launcher started
NOTICE: database "nominatim" does not exist, skipping
DROP DATABASE
2019-02-26 16:13:48 == Create DB
FATAL: database "nominatim" does not exist
2019-02-26 16:13:48 == Setup DB
Postgres version found: 9.5
Postgis version found: 2.2
2019-02-26 16:13:51 == WARNING: external UK postcode table not found.
2019-02-26 16:13:51 == Import data
osm2pgsql version 0.93.0-dev (64 bit id space)
Using projection SRS 4326 (Latlong)
NOTICE: table "place" does not exist, skipping
Allocating memory for dense node cache
Allocating dense node cache in one big chunk
Allocating memory for sparse node cache
Sharing dense sparse
Node-cache: cache=1025MB, maxblocks=16400*65536, allocation method=11
Mid: pgsql, cache=1025
Setting up table: planet_osm_nodes
Setting up table: planet_osm_ways
Setting up table: planet_osm_rels
Reading in file: /titi/monaco.osm.pbf
Using PBF parser.
node cache: stored: 0(-nan%), storage efficiency: -nan% (dense blocks: 0, sparse nodes: 0), hit rate: -nan%
ERROR: unexpected message type 0x58 during COPY from stdin
CONTEXT: COPY planet_osm_nodes, line 1
STATEMENT: COPY planet_osm_nodes FROM STDIN;
ERROR: unexpected message type 0x58 during COPY from stdin
CONTEXT: COPY planet_osm_rels, line 1
STATEMENT: COPY planet_osm_rels FROM STDIN;
LOG: could not send data to client: Broken pipe
STATEMENT: COPY planet_osm_rels FROM STDIN;
ERROR: unexpected message type 0x58 during COPY from stdin
CONTEXT: COPY planet_osm_ways, line 1
STATEMENT: COPY planet_osm_ways FROM STDIN;
LOG: could not send data to client: Broken pipe
STATEMENT: COPY planet_osm_ways FROM STDIN;
LOG: could not send data to client: Broken pipe
STATEMENT: COPY planet_osm_nodes FROM STDIN;
Osm2pgsql failed due to ERROR: Read failed: Is a directory
FATAL: connection to client lost
LOG: unexpected EOF on client connection with an open transaction
ERROR: Error executing external command: /app/src/build/osm2pgsql/osm2pgsql -lsc -O gazetteer --hstore --number-processes 1 -C 1025 -P 5432 -d nominatim /titi/monaco.osm.pbf
Error executing external command: /app/src/build/osm2pgsql/osm2pgsql -lsc -O gazetteer --hstore --number-processes 1 -C 1025 -P 5432 -d nominatim /titi/monaco.osm.pbf
FATAL: connection to client lost
FATAL: connection to client lost
waiting for server to shut down....LOG: received fast shutdown request
LOG: aborting any active transactions
LOG: autovacuum launcher shutting down
LOG: shutting down
LOG: database system is shut down
done
server stopped
``` `
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.