-
Notifications
You must be signed in to change notification settings - Fork 1
FAQ
If you have any problem during the installation of OpenQuake, please check this list before asking on IRC/ML.
java.lang.ExceptionPyRaisable: java.lang.Exception: Class XYZ not found
This is probably due to the OpenQuake jar that is missing. Try to build the jar with:
cd /to/your/openquake/dir/ ant build-openquake-jar
And run the tests suite (or the smoke test) again.
RuntimeError: Unable to start JVM at src/native/common/jp_env.cpp:54
This is probably because the max_mem parameter is set too high in openquake/java.py. Try to decrease it and run the tests suite (or the smoke test) again.
TypeError: unsupported operand type(s) for +: ‘NoneType’ and ‘str’
A more detailed stack trace:
File "/usr/lib/pymodules/python2.6/jpype/_core.py", line 96, in getDefaultJVMPath return _linux.getDefaultJVMPath() File "/usr/lib/pymodules/python2.6/jpype/_linux.py", line 36, in getDefaultJVMPath jvm = _getJVMFromJavaHome() File "/usr/lib/pymodules/python2.6/jpype/_linux.py", line 55, in _getJVMFromJavaHome if os.path.exists(java_home+"/bin/javac") : TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
This is because the JAVA_HOME environment variable is empty. Try to export it again before launching celeryd and rerun the tests suite.
RuntimeError: Unable to load DLL [/usr/java/jre1.5.0_05/lib/i386/client/libjvm.so]
A more detailed stack trace:
File "/usr/lib/pymodules/python2.6/jpype/_core.py", line 44, in startJVM _jpype.startup(jvm, tuple(args), True) RuntimeError: Unable to load DLL [/usr/java/jre1.5.0_05/lib/i386/client/libjvm.so], error = /usr/java/jre1.5.0_05/lib/i386/client/libjvm.so: cannot open shared object file: No such file or directory at src/native/common/include/jp_platform_linux.h:45
This is because the JAVA_HOME environment variable is set up, but it is pointing to the wrong directory. Try to export it again and rerun the tests suite.
ConnectionError: Error 111 connecting localhost:6379. Connection refused.
A more detailed stack trace:
File "/usr/lib/pymodules/python2.6/redis/client.py", line 315, in _execute_command self.connection.send(command, self) File "/usr/lib/pymodules/python2.6/redis/client.py", line 82, in send self.connect(redis_instance) File "/usr/lib/pymodules/python2.6/redis/client.py", line 62, in connect raise ConnectionError(error_message) redis.exceptions.ConnectionError: Error 111 connecting localhost:6379. Connection refused.
This is because Redis server is not running. Please look at the running OpenQuake page to learn how to start Redis.
error: [Errno 111] Connection refused
A more detailed stack trace:
File "/usr/local/lib/python2.6/dist-packages/carrot/connection.py", line 135, in connection self._connection = self._establish_connection() File "/usr/local/lib/python2.6/dist-packages/carrot/connection.py", line 148, in _establish_connection return self.create_backend().establish_connection() File "/usr/local/lib/python2.6/dist-packages/carrot/backends/pyamqplib.py", line 208, in establish_connection connect_timeout=conninfo.connect_timeout) File "/usr/local/lib/python2.6/dist-packages/amqplib/client_0_8/connection.py", line 125, in __init__ self.transport = create_transport(host, connect_timeout, ssl) File "/usr/local/lib/python2.6/dist-packages/amqplib/client_0_8/transport.py", line 220, in create_transport return TCPTransport(host, connect_timeout) File "/usr/local/lib/python2.6/dist-packages/amqplib/client_0_8/transport.py", line 58, in __init__ self.sock.connect((host, port)) File "", line 1, in connect error: [Errno 111] Connection refused
This is because RabbitMQ server is not running. Please look at the running OpenQuake":https://github.com/gem/openquake/wiki/Running-OpenQuake page to learn how to start RabbitMQ.
IOError: Socket closed
A more detailed stack trace:
File "/usr/local/lib/python2.6/dist-packages/carrot/connection.py", line 148, in _establish_connection return self.create_backend().establish_connection() File "/usr/local/lib/python2.6/dist-packages/carrot/backends/pyamqplib.py", line 208, in establish_connection connect_timeout=conninfo.connect_timeout) File "/usr/local/lib/python2.6/dist-packages/amqplib/client_0_8/connection.py", line 140, in __init__ (10, 30), # tune File "/usr/local/lib/python2.6/dist-packages/amqplib/client_0_8/abstract_channel.py", line 89, in wait self.channel_id, allowed_methods) File "/usr/local/lib/python2.6/dist-packages/amqplib/client_0_8/connection.py", line 198, in _wait_method self.method_reader.read_method() File "/usr/local/lib/python2.6/dist-packages/amqplib/client_0_8/method_framing.py", line 215, in read_method raise m IOError: Socket closed
This is because RabbitMQ server is not properly configured. Please look at the Installation page to learn how to properly configure RabbitMQ.
celery.exceptions.ImproperlyConfigured: Celery needs to be configured to run celeryd.
A more detailed stack trace:
File "/usr/local/bin/celeryd", line 9, in load_entry_point('celery==2.1.4', 'console_scripts', 'celeryd')() File "/usr/local/lib/python2.6/dist-packages/celery/bin/celeryd.py", line 166, in main worker.execute_from_commandline() File "/usr/local/lib/python2.6/dist-packages/celery/bin/base.py", line 40, in execute_from_commandline return self.run(*args, vars(options)) File "/usr/local/lib/python2.6/dist-packages/celery/bin/celeryd.py", line 85, in run return Worker(kwargs).run() File "/usr/local/lib/python2.6/dist-packages/celery/apps/worker.py", line 98, in run self.init_loader() File "/usr/local/lib/python2.6/dist-packages/celery/apps/worker.py", line 147, in init_loader "Celery needs to be configured to run celeryd." celery.exceptions.ImproperlyConfigured: Celery needs to be configured to run celeryd.
Solution:
Make you are running celeryd from the directory containing celeryconfig.py.
In some cases, the cause of this issue may be an incompatible version of python-gflags. This is indicated by the following error when trying to
import celeryconfig
in a Python console.
~/openquake$ python Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39) [GCC 4.4.5] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import celeryconfig Traceback (most recent call last): File "", line 1, in File "celeryconfig.py", line 11, in from openquake import flags File "openquake/flags.py", line 9, in from gflags import * File "/usr/local/lib/python2.6/dist-packages/gflags.py", line 396, in import gflags_validators ImportError: No module named gflags_validators
Make sure you have the proper version of python-gflags installed. Check out the Installation page for more information.
Exception on [GET] => ERR unknown command ‘some value’ (error with JRedis)
A Java error like this might appear in response to a Redis ‘get’ command. You can use the following test code to confirm the error:
import java.net.InetSocketAddress; import org.jredis.RedisException; import org.jredis.connector.ConnectionSpec; import org.jredis.ri.alphazero.JRedisClient; import org.jredis.ri.alphazero.connection.DefaultConnectionSpec; /** * Note: You may need to adjust to connection spec, host, and port * parameters to suit your environment. */ public class RedisTest { public static void main (String [] args) { InetSocketAddress addr = new InetSocketAddress("localhost", 6379); ConnectionSpec cs = DefaultConnectionSpec.newSpec(); cs.setAddress(addr.getAddress()) .setPort(addr.getPort()) .setReconnectCnt(2) .setDatabase(0); JRedisClient client = new JRedisClient(cs); try { client.set("test_key", "test_value"); String value = new String(client.get("test_key")); System.out.println(value); } catch (RedisException e) { e.printStackTrace(); } } }
The full error should look something like this:
Exception on [GET] => ERR unknown command ‘test_value’
at org.jredis.ri.alphazero.connection.SynchConnection.serviceRequest(SynchConnection.java:170)
at org.jredis.ri.alphazero.JRedisClient.serviceRequest(JRedisClient.java:151)
at org.jredis.ri.alphazero.JRedisSupport.get(JRedisSupport.java:950)
at RedisTest.main(RedisTest.java:25)
Cause:
This error appears to be caused by an incompatibility between the JRedis library used for OpenQuake and the installed version of the Redis server. In our tests, this error appeared with redis-server version 2.2.2.
Solution:
Try uninstalling redis-server and reinstall a known-working version, such as 2.0.4.
Back to Wiki Home