cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kochheiser,Todd W - TOK-DITT-1" <>
Subject RE: Running Cassandra as a Windows Service
Date Fri, 02 Jul 2010 16:51:54 GMT
Yes, I have had success starting Cassandra using the CassandraDeamon class and Procrun, but
stopping it was slightly problematic.   I ran into several problems:

 1.  I could not get Procrun to start Cassandra (via CassandraDeamon class) when using "JVM"
mode.  You have to use "JAVA" mode in that case.  One of the downside of using "JAVA" mode
is that the Cassandra process will show up as "java.exe" instead of something like "Cassandra.exe".
 Not a big deal, but annoying!
 2.  When running in "JAVA" mode with Procrun, attempting to stop the service would cause
the process to crash instead of cleanly exiting.  Even though Cassandra always restarted okay
and this may never have caused a problem, for me this was simply not acceptable.

Since I wanted to use JVM mode and didn't want Cassandra to crash when attempting to stop
it, a simple wrapper class around the CassandraDeamon class made everything work nicely.


From: Viktor Jevdokimov []
Sent: Friday, July 02, 2010 2:15 AM
Subject: RE: Running Cassandra as a Windows Service

I'm very interested in Windows Service, as x86 as x64 versions.

Have you any success to start Cassandra with Procrun alone?


From: Kochheiser,Todd W - TOK-DITT-1 []
Sent: Thursday, July 01, 2010 9:49 PM
To: ''
Subject: RE: Running Cassandra as a Windows Service

I've been running it in our development & test environments as a Windows Service without
any problem.  I have not been too sophisticated in my configurations, but have been running
some simple two node clusters.  At this point nothing has "yet" caused me any concern.

I have been working on a contrib. package for Cassandra and hope to have something submitted
for review in the next week or so.  It will include everything needed to run Cassandra as
a service.  In order to make Cassandra work well with Apache's Procrun<>,
I needed to write a simple WindowsService class.  In addition to the procrun executables for
32/64 bit platforms and a batch file to install and remove the service, I'll also be including
an ant build file and associated unit tests.


From: Viktor Jevdokimov []
Sent: Thursday, July 01, 2010 6:39 AM
Cc: Kochheiser,Todd W - TOK-DITT-1
Subject: RE: Running Cassandra as a Windows Service


Can you share your experience with running Cassandra as a Windows Service?

Thank you,

From: Kochheiser,Todd W - TO-DITT1 []
Sent: Thursday, June 10, 2010 8:34 PM
To: ''
Subject: Running Cassandra as a Windows Service

For various reasons I am required to deploy systems on Windows.  As such, I went looking for
information on running Cassandra as a Windows service.  I've read some of the user threads
regarding running Cassandra as a Windows service, such as this one:

I also found the following JIRA issue:

As it didn't look like anyone has contributed a formal solution and having some experience
using Apache's Procrun (, I decided to go ahead
and write a batch script and a simple "WindowsService" class to accomplish the task.  The
WindowsService class only makes calls to public methods in CassandraDeamon and is fairly simple.
 In combination with the batch script, it is very easy to install and remove the service.
 At this point, I've installed Cassandra as a Windows service on XP (32 bit), Windows 7 (64
bit) and Windows Server 2008 R1/R2 (64 bit).  It should work fine on other version of Windows
(2K, 2K3).


1.       Has anyone else already done this work?
2.       If not, I wouldn't mind sharing the code/script or contributing it back to the project.
 Is there any interest in this from the Cassandra dev team or the user community?

Ideally the WindowsService could be included in the distributed source/binary distributions
(perhaps in a contrib area) as well as the batch script and associated procrun executables.
 Or, perhaps it could be posted to a Cassandra community site (is there one?).


View raw message