Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup fails #22

Open
alexeyismirnov opened this issue Jul 3, 2015 · 2 comments
Open

Setup fails #22

alexeyismirnov opened this issue Jul 3, 2015 · 2 comments

Comments

@alexeyismirnov
Copy link

I am using Ubuntu 14.04 VM on DigitalOcean wtih 8GB of RAM. But the setup fails after downloading many packages. Here is the error message:

Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Error: 1. Re-trying: /usr/local/bin/osmosis -q --read-replication-lag workingDirectory=/home/nominatim/Nominatim/settings in 900 secs

Here is my .config.sh

#!/bin/sh
# Contains credentials
# This is a template file, save as simply .config.sh (amd make executable) and set your own values below.

# System language
utf8Language=en_GB

# Define the website hostname and e-mail for the VirtualHost
# Several option groups here, comment in / out as necessary
# Localhost
websiteurl=nominatim.localhost
emailcontact=nominatim@localhost
# CycleStreets
#websiteurl=nominatim.cyclestreets.net
#emailcontact=webmasterATcyclestreets.net

# Define the username for Nominatim to install/run under, so that it can run independent of any individual personal account on the machine
username=nominatim
password=password

# Apache virtual host configuration file name - with .conf extension
nominatimVHfile=400-nominatim.conf

# Wikipedia rankings
# Default is yes. To turn off this feature leave as blank.
includeWikipedia=yes

# Set up the website for use with Apache
wwwNominatim=/websites/www/nominatim

### SETTINGS ###
# Define either a full planet, or an extract by commenting in the relevant sections

## Full Planet
# On a machine with 1.2TB disk, 32 GB RAM, Quad processors - it took 10 days to run and used about 700GB. (December 2013)
#planetUrl=http://ftp5.gwdg.de/pub/misc/openstreetmap/planet.openstreetmap.org/pbf/
#postgresconfigmode=dw
#override_maintenance_work_mem=10GB
# 24GB is recommended for full planet import (arg value is in MB)
#osm2pgsqlcache="--osm2pgsql-cache 24000"


## Geofabrik Extract
# If planetUrl is an empty string that tells the install script to configure for Geofabrik extract
planetUrl=
geofabrikUrl=http://download.geofabrik.de/
postgresconfigmode=oltp
override_maintenance_work_mem=

# Default cache size
# Seemed to be necessary to use cache as small as 512MB on a VM that had 2GB RAM.
osm2pgsqlcache="--osm2pgsql-cache 512"

# Define the location of the .pbf OSM data file; -latest.osm.pbf will be appended automatically
# Several option groups here, comment in / out as necessary
# Andorra (install, without wikipedia data, takes 12 minutes)
# Test street: Andorra la Vella
osmdatafolder=asia/
osmdatacountry=taiwan
@devployment
Copy link

A bit aged already but maybe it helps somebody else. I encountered the same issue. Issuing the following command should output the current java version java -Xms128m -Xmx128m -version

If this works for you can add the following line to the export _JAVA_OPTIONS='-Xms128M -Xmx128m' to the nominatim users .profile. for the regular installation found at /home/nominatim/.profile to use this values executing under the nominatim user as well.

I'm no Java pro, but I assume this is related somehow to the process architecture as I'm running on an x64 Ubuntu. Probably as you do as well. Will validate this issue by testing with a x86 machine.

@devployment
Copy link

Looks like the root cause is/was a missing swap file on my machine.

Executeing cat /proc/meminfo showed me

...
SwapTotal:             0 kB
SwapFree:              0 kB
...

I added a script that checks for a swap file and if it's not available it creates it.
Solved the problem for me without fiddling with the -Xms and -Xmx parameters.

Will create a pull request including the script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants