intra-mart Accel Platform / Cassandra Administrator Guide

Version 8 2014-04-01

«  4.5. Registration/Deletion to Linux Daemon   ::   Contents   ::   6. Cassandra Cluster Build  »

5. How to Start/Stop Cassandra

In this section the methods of starting/stopping Cassandra are described.

Warning

When Cassandra is operated, please make sure that the time on every node be synchronized by NTP etc.
If there is a mismatch of the time between each node, Cassandra itself might possibly stop.

5.1. Cassandra Startup for Windows

Please double-click <%CASSANDRA_HOME%/bin/cassandra.bat>.

Startup is completed, if the message below is displayed on the Command Prompt.

INFO 12:55:11,319 Using synchronous/threadpool thrift server on localhost/127.0.0.1 : 9160
INFO 12:55:11,320 Listening for thrift clients...

If it has been made into Windows service by Registration/Deletion to Windows Service, please start it from [Local Service Display].

Note

If the error below occurs at the time of Apache Cassandra startup, please change the setting of port number.

Error: Exception has been thrown by the agent. : java.rmi.server.ExportException: Port already in use: 7199;
nested exception is: java.net.BindException: Address already in use: JVM_Bind

Please open <%CASSANDRA_HOME%/bin/cassandra.bat> file by the editor.

[7199] which is set to the -Dcom.sun.management.jmxremote.port property should be changed to
unused port number such as [7198].
-Dcom.sun.management.jmxremote.port=8199^

After completing the change, please start Apache Cassandra again.

5.2. Cassandra Stoppage for Windows

On the Command Prompt that was used for startup, please execute [Ctrl]+[C] command, and stop the process.

Warning

If you close it by the upper right X button on the Command Prompt, Finish Process may not be performed correctly, and data could be damaged.
Please make sure that you use [Ctrl]+[C] command to stop it.

If it has been made into Windows service by Registration/Deletion to Windows Service , please stop it from [Local Service Display].

5.3. Cassandra Startup for Linux

It will run on the background by the command below.
/usr/local/cassandra/bin/cassandra -p /var/run/cassandra.pid
Startup is completed, if the message below is displayed on the console.
INFO 12:55:11,319 Using synchronous/threadpool thrift server on localhost/127.0.0.1 : 9160
INFO 12:55:11,320 Listening for thrift clients...
You can prevent Cassandra from becoming a Daemon by the command below, and can force it to start on the foreground.
/usr/local/cassandra/bin/cassandra -f
If it has been made into Linux daemon by Registration/Deletion to Linux Daemon , it will be executed on the background with the command below.
/etc/init.d/cassandra start

Note

If the following error occurs at the time of Apache Cassandra startup, please change the setting of port number.

Error: Exception has been thrown by the agent. : java.rmi.server.ExportException: Port already in use: 7199;
nested exception is: java.net.BindException: Address already in use: JVM_Bind

Please open </usr/local/cassandra/bin/cassandra.in.sh> file by the editor.

[7199] which is set to the -Dcom.sun.management.jmxremote.port property should be changed to
unused port number such as [7198].
-Dcom.sun.management.jmxremote.port=8199^
After completing the change, please start Apache Cassandra again.

5.4. Cassandra Stoppage for Linux

It can be stopped by the command below.
kill `cat /var/run/cassandra.pid`
If it has been started by the command below, please execute [Ctrl]+[C] command, and stop the process.
/usr/local/cassandra/bin/cassandra -f
If it has been made into Linux daemon by Registration/Deletion to Linux Daemon , it can be stopped by the command below.
/etc/init.d/cassandra stop

«  4.5. Registration/Deletion to Linux Daemon   ::   Contents   ::   6. Cassandra Cluster Build  »