【現象】
以下のメッセージが表示され、Cassandra の起動に失敗します。
The stack size specified is too small, Specify at least 228k
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
【原因】
OSとJDKバージョンの組み合わせにより、JVMパラメータのXssが不足し、Cassandraの起動に失敗する場合があります。
【条件】
以下の組み合わせにおいて発生することを確認しています。
OS:
Linux系OS
JDK:
Oracle JDK 1.7u40
Oracle JDK 1.7u45
【回避方法】
${cassandra}/conf/cassandra-env.sh に設定されているXssの値を変更することで回避可能です。
・Cassandraのバージョンが 1.1.4 の場合
■変更前
if [ "`uname`" = "Linux" ] ; then
# reduce the per-thread stack size to minimize the impact of Thrift
# thread-per-client. (Best practice is for client connections to
# be pooled anyway.) Only do so on Linux where it is known to be
# supported.
if startswith "$JVM_VERSION" '1.7.'
then
JVM_OPTS="$JVM_OPTS -Xss160k"
else
JVM_OPTS="$JVM_OPTS -Xss128k"
fi
fi
■変更後
if [ "`uname`" = "Linux" ] ; then
# reduce the per-thread stack size to minimize the impact of Thrift
# thread-per-client. (Best practice is for client connections to
# be pooled anyway.) Only do so on Linux where it is known to be
# supported.
if startswith "$JVM_VERSION" '1.7.'
then
JVM_OPTS="$JVM_OPTS -Xss228k"
else
JVM_OPTS="$JVM_OPTS -Xss128k"
fi
fi
・Cassandraのバージョンが 1.1.12 の場合
■変更前
if [ "`uname`" = "Linux" ] ; then
# reduce the per-thread stack size to minimize the impact of Thrift
# thread-per-client. (Best practice is for client connections to
# be pooled anyway.) Only do so on Linux where it is known to be
# supported.
# u34 and greater need 180k
JVM_OPTS="$JVM_OPTS -Xss180k"
fi
■変更後
if [ "`uname`" = "Linux" ] ; then
# reduce the per-thread stack size to minimize the impact of Thrift
# thread-per-client. (Best practice is for client connections to
# be pooled anyway.) Only do so on Linux where it is known to be
# supported.
# u34 and greater need 180k
JVM_OPTS="$JVM_OPTS -Xss228k"
fi
-- 対象 ------------------------------------------------------------------------
iAP/Accel Platform/全アップデート
--------------------------------------------------------------------------------
FAQID:99
Cassandra の起動に失敗します。