Re: Running Cassandra as a Windows Service
If you'd like to get it included in the Cassandra tree, submitting it to https://issues.apache.org/jira/browse/CASSANDRA-292 would be a good start. On Sun, Jul 4, 2010 at 2:54 PM, Kochheiser,Todd W - TOK-DITT-1 twkochhei...@bpa.gov wrote: Apache’s Procrun is a “real windows service” similar to the one from Tanuki Software. In regards to batch files, they are not used by Procrun in any way. The batch file I created simply makes installing and removing the service super easy. I’ve used the Tanuki Java Wrapper Service before and it also works very nicely. However, since Cassandra is an Apache project, it seemed most appropriate to go ahead and use a Windows service runner from Apache and to avoid any possible licensing or bundling issues, especially since I’d like to see it included as a contrib. And, Procrun has been used for years by various Apache project with Apache Tomcat probably being the most famous. Regardless, the Tanuki runner works well. Todd PS: I believe the community version of the Java Serviced Wrapper from Tanuki is GPL v2, but I could be wrong. Their licensing is a mix of From: Richard Grossman [mailto:richie...@gmail.com] Sent: Sunday, July 04, 2010 3:37 AM To: user@cassandra.apache.org Subject: Re: Running Cassandra as a Windows Service Hello Why not using Java Wrapper Service? http://wrapper.tanukisoftware.org/doc/english/download.jsp You can configure any java process as real windows services instead of batch files Richard On Thu, Jun 10, 2010 at 8:34 PM, Kochheiser,Todd W - TO-DITT1 twkochhei...@bpa.gov wrote: 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: http://www.mail-archive.com/user@cassandra.apache.org/msg01656.html I also found the following JIRA issue: https://issues.apache.org/jira/browse/CASSANDRA-292 As it didn’t look like anyone has contributed a formal solution and having some experience using Apache’s Procrun (http://commons.apache.org/daemon/procrun.html), 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). Questions: 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?). Todd -- Jonathan Ellis Project Chair, Apache Cassandra co-founder of Riptano, the source for professional Cassandra support http://riptano.com
Re: Running Cassandra as a Windows Service
Hello Why not using Java Wrapper Service? http://wrapper.tanukisoftware.org/doc/english/download.jsp You can configure any java process as real windows services instead of batch files Richard On Thu, Jun 10, 2010 at 8:34 PM, Kochheiser,Todd W - TO-DITT1 twkochhei...@bpa.gov wrote: 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: * http://www.mail-archive.com/user@cassandra.apache.org/msg01656.html*http://www.mail-archive.com/user@cassandra.apache.org/msg01656.html I also found the following JIRA issue: *https://issues.apache.org/jira/browse/CASSANDRA-292*https://issues.apache.org/jira/browse/CASSANDRA-292 As it didn’t look like anyone has contributed a formal solution and having some experience using Apache’s Procrun (* http://commons.apache.org/daemon/procrun.html*http://commons.apache.org/daemon/procrun.html), 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). Questions: 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?). Todd
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? Viktor From: Kochheiser,Todd W - TOK-DITT-1 [mailto:twkochhei...@bpa.gov] Sent: Thursday, July 01, 2010 9:49 PM To: 'user@cassandra.apache.org' 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 Procrunhttp://commons.apache.org/daemon/procrun.html, 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. Todd From: Viktor Jevdokimov [mailto:viktor.jevdoki...@adform.com] Sent: Thursday, July 01, 2010 6:39 AM To: user@cassandra.apache.org Cc: Kochheiser,Todd W - TOK-DITT-1 Subject: RE: Running Cassandra as a Windows Service Hi, Can you share your experience with running Cassandra as a Windows Service? Thank you, Viktor From: Kochheiser,Todd W - TO-DITT1 [mailto:twkochhei...@bpa.gov] Sent: Thursday, June 10, 2010 8:34 PM To: 'user@cassandra.apache.org' 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: http://www.mail-archive.com/user@cassandra.apache.org/msg01656.html I also found the following JIRA issue: https://issues.apache.org/jira/browse/CASSANDRA-292 As it didn't look like anyone has contributed a formal solution and having some experience using Apache's Procrun (http://commons.apache.org/daemon/procrun.html), 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). Questions: 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?). Todd
RE: Running Cassandra as a Windows Service
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. Todd From: Viktor Jevdokimov [mailto:viktor.jevdoki...@adform.com] Sent: Friday, July 02, 2010 2:15 AM To: user@cassandra.apache.org 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? Viktor From: Kochheiser,Todd W - TOK-DITT-1 [mailto:twkochhei...@bpa.gov] Sent: Thursday, July 01, 2010 9:49 PM To: 'user@cassandra.apache.org' 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 Procrunhttp://commons.apache.org/daemon/procrun.html, 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. Todd From: Viktor Jevdokimov [mailto:viktor.jevdoki...@adform.com] Sent: Thursday, July 01, 2010 6:39 AM To: user@cassandra.apache.org Cc: Kochheiser,Todd W - TOK-DITT-1 Subject: RE: Running Cassandra as a Windows Service Hi, Can you share your experience with running Cassandra as a Windows Service? Thank you, Viktor From: Kochheiser,Todd W - TO-DITT1 [mailto:twkochhei...@bpa.gov] Sent: Thursday, June 10, 2010 8:34 PM To: 'user@cassandra.apache.org' 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: http://www.mail-archive.com/user@cassandra.apache.org/msg01656.html I also found the following JIRA issue: https://issues.apache.org/jira/browse/CASSANDRA-292 As it didn't look like anyone has contributed a formal solution and having some experience using Apache's Procrun (http://commons.apache.org/daemon/procrun.html), 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). Questions: 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?). Todd
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 Procrunhttp://commons.apache.org/daemon/procrun.html, 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. Todd From: Viktor Jevdokimov [mailto:viktor.jevdoki...@adform.com] Sent: Thursday, July 01, 2010 6:39 AM To: user@cassandra.apache.org Cc: Kochheiser,Todd W - TOK-DITT-1 Subject: RE: Running Cassandra as a Windows Service Hi, Can you share your experience with running Cassandra as a Windows Service? Thank you, Viktor From: Kochheiser,Todd W - TO-DITT1 [mailto:twkochhei...@bpa.gov] Sent: Thursday, June 10, 2010 8:34 PM To: 'user@cassandra.apache.org' 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: http://www.mail-archive.com/user@cassandra.apache.org/msg01656.html I also found the following JIRA issue: https://issues.apache.org/jira/browse/CASSANDRA-292 As it didn't look like anyone has contributed a formal solution and having some experience using Apache's Procrun (http://commons.apache.org/daemon/procrun.html), 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). Questions: 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?). Todd
RE: Running Cassandra as a Windows Service
I'll put something together and submit it. Thanks for the help. Todd -Original Message- From: Gary Dusbabek [mailto:gdusba...@gmail.com] Sent: Friday, June 11, 2010 4:49 AM To: user@cassandra.apache.org Subject: Re: Running Cassandra as a Windows Service Sure. Please create a jira ticket (https://issues.apache.org/jira/browse/CASSANDRA) and attach the files you wish to contribute. One of the committers (probably myself) will review them and decide how to integrate them into the project. If it's not too much trouble, an ant build script would be excellent and would help to automate the process of generating testable builds. Gary. On Thu, Jun 10, 2010 at 17:31, Kochheiser,Todd W - TO-DITT1 twkochhei...@bpa.gov wrote: I agree that bitrot might be happen if all of the core Cassandra developers are using Linux. Your suggestion of putting things in a contrib area where curious (or desperate) parties suffering on the Windows platform could pick it up seems like a reasonable place to start. It might also be an opportunity to increase the number of application developers using Cassandra if Cassandra was slightly more approachable on the Windows platform. Any suggestions on next steps? Todd. -Original Message- From: Gary Dusbabek [mailto:gdusba...@gmail.com] Sent: Thursday, June 10, 2010 10:59 AM To: user@cassandra.apache.org Subject: Re: Running Cassandra as a Windows Service IMO this is one of those things that would bitrot fairly quickly if it were not maintained. It may be useful in contrib, where curious parties could pick it up, get it back in shape, and send in the changes to be committed. Judging by the sparse interest so far, this probably wouldn't be a good fit in core since there don't seem to be many (any?) cassandra developers who run windows. Gary. On Thu, Jun 10, 2010 at 12:34, Kochheiser,Todd W - TO-DITT1 twkochhei...@bpa.gov wrote: 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: http://www.mail-archive.com/user@cassandra.apache.org/msg01656.html I also found the following JIRA issue: https://issues.apache.org/jira/browse/CASSANDRA-292 As it didn't look like anyone has contributed a formal solution and having some experience using Apache's Procrun (http://commons.apache.org/daemon/procrun.html), 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). Questions: Has anyone else already done this work? 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?). Todd
Re: Running Cassandra as a Windows Service
For various reasons I am required to deploy systems on Windows. I don't think it would be difficult to argue the business case for running Cassandra on Linux. It's still a young project and everybody in IRC and the mailing list is running it on Linux. You should really re-think whatever factors are requiring you to run it on Windows and try to overcome those obstacles. -Ben On Thu, Jun 10, 2010 at 10:58 AM, Gary Dusbabek gdusba...@gmail.com wrote: IMO this is one of those things that would bitrot fairly quickly if it were not maintained. It may be useful in contrib, where curious parties could pick it up, get it back in shape, and send in the changes to be committed. Judging by the sparse interest so far, this probably wouldn't be a good fit in core since there don't seem to be many (any?) cassandra developers who run windows. Gary. On Thu, Jun 10, 2010 at 12:34, Kochheiser,Todd W - TO-DITT1 twkochhei...@bpa.gov wrote: 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: http://www.mail-archive.com/user@cassandra.apache.org/msg01656.html I also found the following JIRA issue: https://issues.apache.org/jira/browse/CASSANDRA-292 As it didn’t look like anyone has contributed a formal solution and having some experience using Apache’s Procrun (http://commons.apache.org/daemon/procrun.html), 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). Questions: Has anyone else already done this work? 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?). Todd
RE: Running Cassandra as a Windows Service
I agree that bitrot might be happen if all of the core Cassandra developers are using Linux. Your suggestion of putting things in a contrib area where curious (or desperate) parties suffering on the Windows platform could pick it up seems like a reasonable place to start. It might also be an opportunity to increase the number of application developers using Cassandra if Cassandra was slightly more approachable on the Windows platform. Any suggestions on next steps? Todd. -Original Message- From: Gary Dusbabek [mailto:gdusba...@gmail.com] Sent: Thursday, June 10, 2010 10:59 AM To: user@cassandra.apache.org Subject: Re: Running Cassandra as a Windows Service IMO this is one of those things that would bitrot fairly quickly if it were not maintained. It may be useful in contrib, where curious parties could pick it up, get it back in shape, and send in the changes to be committed. Judging by the sparse interest so far, this probably wouldn't be a good fit in core since there don't seem to be many (any?) cassandra developers who run windows. Gary. On Thu, Jun 10, 2010 at 12:34, Kochheiser,Todd W - TO-DITT1 twkochhei...@bpa.gov wrote: 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: http://www.mail-archive.com/user@cassandra.apache.org/msg01656.html I also found the following JIRA issue: https://issues.apache.org/jira/browse/CASSANDRA-292 As it didn't look like anyone has contributed a formal solution and having some experience using Apache's Procrun (http://commons.apache.org/daemon/procrun.html), 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). Questions: Has anyone else already done this work? 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?). Todd