0

我已经下载了 cassandra 的 DataStax 构建(dsc...-bin.tar.gz)并正确解压缩到 Solaris Server 机器上。根据http://wiki.apache.org/cassandra/GettingStarted/编辑配置目录后,我第一次尝试使用 ~/cassandra/bin 中的“./cassandra -f”启动 cassandra,但遇到异常导致堆栈跟踪的启动。

日志文件如下。

我在 Windows 机器上安装了相同版本的 cassandra(用于测试),但从未遇到过此类错误。如果 Cassandra 兽医可以帮助我,我将不胜感激。

系统日志:

>  INFO [main] 2012-07-31 15:02:02,608 AbstractCassandraDaemon.java (line 100) Logging initialized
 INFO [main] 2012-07-31 15:02:02,636 AbstractCassandraDaemon.java (line 121) JVM vendor/version: Java HotSpot(TM) Server VM/1.6.0_04
 INFO [main] 2012-07-31 15:02:02,638 AbstractCassandraDaemon.java (line 122) Heap size: 2091843584/2093940736
 INFO [main] 2012-07-31 15:02:02,640 AbstractCassandraDaemon.java (line 123) Classpath: ./../conf:./../build/classes/main:./../build/classes/thrift:./../lib/antlr-3.2.jar:./../lib/apache-cassandra-1.1.2.jar:./../lib/apache-cassandra-clientutil-1.1.2.jar:./../lib/apache-cassandra-thrift-1.1.2.jar:./../lib/avro-1.4.0-fixes.jar:./../lib/avro-1.4.0-sources-fixes.jar:./../lib/commons-cli-1.1.jar:./../lib/commons-codec-1.2.jar:./../lib/commons-lang-2.4.jar:./../lib/compress-lzf-0.8.4.jar:./../lib/concurrentlinkedhashmap-lru-1.3.jar:./../lib/guava-r08.jar:./../lib/high-scale-lib-1.1.2.jar:./../lib/jackson-core-asl-1.9.2.jar:./../lib/jackson-mapper-asl-1.9.2.jar:./../lib/jamm-0.2.5.jar:./../lib/jline-0.9.94.jar:./../lib/json-simple-1.1.jar:./../lib/libthrift-0.7.0.jar:./../lib/log4j-1.2.16.jar:./../lib/metrics-core-2.0.3.jar:./../lib/servlet-api-2.5-20081211.jar:./../lib/slf4j-api-1.6.1.jar:./../lib/slf4j-log4j12-1.6.1.jar:./../lib/snakeyaml-1.6.jar:./../lib/snappy-java-1.0.4.1.jar:./../lib/snaptree-0.1.jar:./../lib/jamm-0.2.5.jar
 INFO [main] 2012-07-31 15:02:02,649 CLibrary.java (line 62) JNA not found. Native methods will be disabled.
 INFO [main] 2012-07-31 15:02:02,708 DatabaseDescriptor.java (line 127) Loading settings from file:/opt/james/cassandra/conf/cassandra.yaml
 INFO [main] 2012-07-31 15:02:03,502 DatabaseDescriptor.java (line 180) DiskAccessMode 'auto' determined to be standard, indexAccessMode is standard
 INFO [main] 2012-07-31 15:02:04,734 DatabaseDescriptor.java (line 247) Global memtable threshold is enabled at 665MB
ERROR [main] 2012-07-31 15:02:05,385 AbstractCassandraDaemon.java (line 370) Exception encountered during startup
org.xerial.snappy.SnappyError: [FAILED_TO_LOAD_NATIVE_LIBRARY] null
    at org.xerial.snappy.SnappyLoader.load(SnappyLoader.java:229)
    at org.xerial.snappy.Snappy.<clinit>(Snappy.java:44)
    at org.apache.cassandra.io.compress.SnappyCompressor.create(SnappyCompressor.java:45)
    at org.apache.cassandra.io.compress.SnappyCompressor.isAvailable(SnappyCompressor.java:55)
    at org.apache.cassandra.io.compress.SnappyCompressor.<clinit>(SnappyCompressor.java:37)
    at org.apache.cassandra.config.CFMetaData.<clinit>(CFMetaData.java:76)
    at org.apache.cassandra.config.KSMetaData.systemKeyspace(KSMetaData.java:79)
    at org.apache.cassandra.config.DatabaseDescriptor.loadYaml(DatabaseDescriptor.java:439)
    at org.apache.cassandra.config.DatabaseDescriptor.<clinit>(DatabaseDescriptor.java:118)
    at org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassandraDaemon.java:126)
    at org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCassandraDaemon.java:353)
    at org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:106)
4

1 回答 1

1

问题出在 cassandra 依赖库中。显然,Cassandra 1.1.2(我正在使用)依赖于 Snappy Compression 的本机方法。Cassandra 1.1.0 不依赖本机方法,因此可以毫无问题地工作!

于 2012-08-01T17:03:49.947 回答