Hello folks, I am three problems deep into the whole setup of nominatim. I know little or nothing on postgresq. PLEASE HELP ME OUT :(. I have hardware configuration details listed below. i know its a 16 GB memory hardware and not 32 which is required for PLANET data but still tried it. And I am trying to setup planet data. postgres@ilabshost18:/home/ilab$ free -m
Mem: 16043 314 15729 0 19 74 -/+ buffers/cache: 220 15823 Swap: 16383 0 16383 postgres@ilabshost18:/home/ilab$ uname -a Linux ilabshost18 3.5.0-34-generic #55~precise1-Ubuntu SMP Fri Jun 7 16:25:50 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux postgres@ilabshost18:/home/ilab$ df -kh Filesystem Size Used Avail Use% Mounted on /dev/mapper/ilabshost18-root 8.7G 4.3G 4.0G 52% / udev 7.9G 4.0K 7.9G 1% /dev tmpfs 3.2G 280K 3.2G 1% /run none 5.0M 0 5.0M 0% /run/lock none 7.9G 0 7.9G 0% /run/shm /dev/sda1 228M 51M 166M 24% /boot /dev/mapper/data-data 2.0T 40G 1.9T 3% /data Problem 1. I followed the installation instructions for ubuntu provided, in link http://wiki.openstreetmap.org/wiki/Nominatim/Installation think went fine until, I ran the command to import ./utils/setup.php --osm-file <your planet="" file=""> --all [--osm2pgsql-cache 18000] as it says. For me it did not pick up the arguments [--osm2pgsql-cache 18000] so had to run it without it. It ran for few minutes and then Problem 2. I ran just this ./utils/setup.php --osm-file <your planet="" file=""> --all but while import it failed with the following exception. Reading in file: /data/Nominatim-2.1/planet-131204.osm.pbf Processing: Node(2113460k 494.6k/s) Way(0k 0.00k/s) Relation(0 0.00/s)COPY_END for COPY planet_osm_nodes FROM STDIN; failed: ERROR: could not extend file "base/16386/18838.1": wrote only 4096 of 8192 bytes at block 246872 HINT: Check free disk space. CONTEXT: COPY planet_osm_nodes, line 45671321: "76661940 473543350 -1009701829 \N" Error occurred, cleaning up ERROR: Error executing external command: /data/Nominatim-2.1/osm2pgsql/osm2pgsql -lsc -O gazetteer --hstore -C 14914 -P 5432 -d nominatim /data/Nominatim-2.1planet-131204.osm.pbf Error executing external command: /data/Nominatim-2.1/osm2pgsql/osm2pgsql -lsc -O gazetteer --hstore -C 14914 -P 5432 -d nominatim /data/Nominatim-2.1/planet131204.osm.pbf The hint clearly says its a disk space issue. The mount which the directory has over 2TB of free space is /data/Nominatim-2.1/ but /var/lib has only 4 GB space. So I changed the data_directory in postgreSQL.conf to point the directory /data/nominatimdata killed the postgresql process and then restarted with the following command. /usr/lib/postgresql/9.1/bin/postgres -D /var/lib/postgresql/9.1/main -c config_file=/etc/postgresql/9.1/main/postgresql.conf It errored out suggesting that the directory /data/nominatimdata has no PG_VERSION file. So I reverted it back to the same old configuration in postgresql.conf and try fix this in a different way. Problem 3. After I changed this and tried to restart it, it errored again, following is the exception.As the HINT says I tried to reset the shared_buffers size from 4 gb to 2gb. Also I found a comment to change /etc/sysctl.conf the values of kernel.shmmax to a bigger number and to run sudo sysctl -p, kernel.shmmax in /etc/sysctl.conf was not present so I added the value as 4GB and ran sudo sysctl -p. tried restarting and found the same error. I found an another comment which said to update the values in /etc/sysctl.d/30-postgresql-shm.conf I tried that, even this dint work. Following the detailed exception I am encountering. postgres@ilabshost18:/home/ilab$ /usr/lib/postgresql/9.1/bin/postgres -D /var/lib/postgresql/9.1/main -c config_file=/etc/postgresql/9.1/main/postgresql.conf 2013-12-12 19:36:03 EST FATAL: could not create shared memory segment: Invalid argument 2013-12-12 19:36:03 EST DETAIL: Failed system call was shmget(key=5432001, size=2220433408, 03600). 2013-12-12 19:36:03 EST H INT: This error usually means that PostgreSQL's request for a shared memory segment exceeded your kernel's SHMMAX parameter. You can either reduce the request size or reconfigure the kernel with larger SHMMAX. To reduce the request size (currently 2220433408 bytes), reduce PostgreSQL's shared memory usage, perhaps by reducing shared_buffers or max_connections. If the request size is already small, it's possible that it is less than your kernel's SHMMIN parameter, in which case raising the request size or reconfiguring SHMMIN is called for. The PostgreSQL documentation contains more information about shared memory configuration. Please help me out. asked 13 Dec '13, 01:47 Ironknight SK53 ♦ |
The question has been closed for the following reason "Tl;dr. Most of question relates to Postgres /Ubuntu rather than Nominatim in particular." by SK53 13 Dec '13, 05:56
You have already asked about questions 2 & 3 a week ago on this site in response to this question. This site is meant for short SINGLE questions of wide-spread interest: it is not meant for detailed support for a specific user. Questions about allocating space for the default data storage of Postgres anyway belong on something like StackOverflow rather than here. In general it is much better to ask about this kind of detail via the OSM forum, on mailing lists or on an IRC channel: but before you do, please ensure you have sorted out how you allocate data for Postgres. Your first question may be more useful: but it will require rephrasing and shortening. It also dont know why you want to pass in a cache allocation limit which is more than your available memory. For these reasons I am closing this question. answered 13 Dec '13, 05:43 SK53 ♦ |