Windows上的Cassandra,不支持uname -o

时间:2014-07-01 07:24:58

标签: windows cassandra

如何在Windows上启动Cassandra? 我的环境看起来像什么?

我在Windows上启动Cassandra时遇到错误... uname -o不受支持。 我正在使用uname(GNU sh-utils)2.0 我不是在cygwin中运行,而只是一个纯粹的PowerShell窗口。

我的Cassandra版本直接来自git

以下是我的尝试:

D:\dev\3rdparty\cassandra\cassandra [trunk +1 ~0 -0 !]> .\bin\cassandra.bat -v -f
Detected powershell execution permissions.  Running with enhanced startup scripts.
Sourcing cassandra config file: D:/dev/3rdparty/cassandra/cassandra/conf/cassandra-env.ps1
Setting up Cassandra environment
Starting cassandra server
Running cassandra with: [java.exe  -javaagent:"D:\dev\3rdparty\cassandra\cassandra\lib\jamm-0.2.6.jar" -ea -Dlog4j.defa
ultInitOverride=true -XX:+CMSClassUnloadingEnabled -XX:+UseThreadPriorities -XX:ThreadPriorityPolicy=42 -Xms3072M -Xmx3
072M -Xmn768M -XX:+HeapDumpOnOutOfMemoryError -Xss256k -XX:StringTableSize=1000003 -XX:+UseParNewGC -XX:+UseConcMarkSwe
epGC -XX:+CMSParallelRemarkEnabled -XX:SurvivorRatio=8 -XX:MaxTenuringThreshold=1 -XX:CMSInitiatingOccupancyFraction=75
 -XX:+UseCMSInitiatingOccupancyOnly -XX:+UseTLAB -Djava.net.preferIPv4Stack=true -Dcom.sun.management.jmxremote.port=71
99 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false  -Dlog4j.configuration=lo
g4j-server.properties -Dcassandra -Dlogback.configurationFile=logback.xml -Dcassandra.logdir="D:\dev\3rdparty\cassandra
\cassandra/logs" -Dcassandra.storagedir="D:\dev\3rdparty\cassandra\cassandra/data" -cp "D:\dev\3rdparty\cassandra\cassa
ndra\conf";"D:/dev/3rdparty/cassandra/cassandra/lib/airline-0.6.jar";"D:/dev/3rdparty/cassandra/cassandra/lib/antlr-run
time-3.5.2.jar";"D:/dev/3rdparty/cassandra/cassandra/lib/commons-cli-1.1.jar";"D:/dev/3rdparty/cassandra/cassandra/lib/
commons-codec-1.2.jar";"D:/dev/3rdparty/cassandra/cassandra/lib/commons-lang3-3.1.jar";"D:/dev/3rdparty/cassandra/cassa
ndra/lib/commons-math3-3.2.jar";"D:/dev/3rdparty/cassandra/cassandra/lib/compress-lzf-0.8.4.jar";"D:/dev/3rdparty/cassa
ndra/cassandra/lib/concurrentlinkedhashmap-lru-1.4.jar";"D:/dev/3rdparty/cassandra/cassandra/lib/disruptor-3.0.1.jar";"
D:/dev/3rdparty/cassandra/cassandra/lib/guava-16.0.jar";"D:/dev/3rdparty/cassandra/cassandra/lib/high-scale-lib-1.0.6.j
ar";"D:/dev/3rdparty/cassandra/cassandra/lib/jackson-core-asl-1.9.2.jar";"D:/dev/3rdparty/cassandra/cassandra/lib/jacks
on-mapper-asl-1.9.2.jar";"D:/dev/3rdparty/cassandra/cassandra/lib/jamm-0.2.6.jar";"D:/dev/3rdparty/cassandra/cassandra/
lib/javax.inject.jar";"D:/dev/3rdparty/cassandra/cassandra/lib/jbcrypt-0.3m.jar";"D:/dev/3rdparty/cassandra/cassandra/l
ib/jline-1.0.jar";"D:/dev/3rdparty/cassandra/cassandra/lib/jna-4.0.0.jar";"D:/dev/3rdparty/cassandra/cassandra/lib/json
-simple-1.1.jar";"D:/dev/3rdparty/cassandra/cassandra/lib/libthrift-0.9.1.jar";"D:/dev/3rdparty/cassandra/cassandra/lib
/logback-classic-1.1.2.jar";"D:/dev/3rdparty/cassandra/cassandra/lib/logback-core-1.1.2.jar";"D:/dev/3rdparty/cassandra
/cassandra/lib/lz4-1.2.0.jar";"D:/dev/3rdparty/cassandra/cassandra/lib/metrics-core-2.2.0.jar";"D:/dev/3rdparty/cassand
ra/cassandra/lib/netty-all-4.0.20.Final.jar";"D:/dev/3rdparty/cassandra/cassandra/lib/reporter-config-2.1.0.jar";"D:/de
v/3rdparty/cassandra/cassandra/lib/slf4j-api-1.7.2.jar";"D:/dev/3rdparty/cassandra/cassandra/lib/snakeyaml-1.11.jar";"D
:/dev/3rdparty/cassandra/cassandra/lib/snappy-java-1.0.5.1.jar";"D:/dev/3rdparty/cassandra/cassandra/lib/stream-2.5.2.j
ar";"D:/dev/3rdparty/cassandra/cassandra/lib/stringtemplate-4.0.2.jar";"D:/dev/3rdparty/cassandra/cassandra/lib/super-c
sv-2.1.0.jar";"D:/dev/3rdparty/cassandra/cassandra/lib/thrift-server-0.3.5.jar";"D:\dev\3rdparty\cassandra\cassandra\bu
ild\classes\main";"D:\dev\3rdparty\cassandra\cassandra\build\classes\thrift" "org.apache.cassandra.service.CassandraDae
mon"]
"C:/Users/las1/AppData/Local/GitHub/PortableGit_054f2e797ebafd44a30203088cd3d58663c627ef/bin/**uname.exe": invalid option -- o**
Try `"C:/Users/las1/AppData/Local/GitHub/PortableGit_054f2e797ebafd44a30203088cd3d58663c627ef/bin/uname.exe" --help' for
 more information.
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

1 个答案:

答案 0 :(得分:0)

可能是你没有正确设置环境变量..

你必须在用户变量下的环境变量中设置cassandra_home直到低于点。

CASSANDRA_HOME : D:\dev\3rdparty\cassandra\cassandra

- >第二件事是错误的建议

-Xms3072M -Xmx3072M这是更多

Xms应该是1 gb左右,或者Xmx和Xmx的一半应该是RAM大小的1/2。

所以根据你系统的ram将这两件事改成cassandra / conf下的cassandra-env.sh文件