Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 44FB718BF2 for ; Tue, 23 Feb 2016 16:43:17 +0000 (UTC) Received: (qmail 1704 invoked by uid 500); 23 Feb 2016 16:35:50 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 1664 invoked by uid 500); 23 Feb 2016 16:35:50 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 1654 invoked by uid 99); 23 Feb 2016 16:35:50 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Feb 2016 16:35:50 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id DFB5C1805F3 for ; Tue, 23 Feb 2016 16:35:49 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.43 X-Spam-Level: * X-Spam-Status: No, score=1.43 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=yahoo.co.in Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id PmXaokuly_LC for ; Tue, 23 Feb 2016 16:35:48 +0000 (UTC) Received: from nm33-vm7.bullet.mail.sg3.yahoo.com (nm33-vm7.bullet.mail.sg3.yahoo.com [106.10.151.230]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id 4BEEA5FBEF for ; Tue, 23 Feb 2016 16:35:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.in; s=s2048; t=1456245338; bh=oCHBXfA5n7qE8RiQdfgNAa89N2uRe/vGCPKe6JTnvA8=; h=Date:From:To:In-Reply-To:References:Subject:From:Subject; b=EQD2FYLPZ0IXm8FBgnTQXKRRTSgmgQZ7uXwMldJf8rSGl/3noej7S4szfS57a+Q8PcvdwAfzaO6LLDUPKeQEFXILf77QTGpiFWN9DYnlBLAcENrOE1LlfSK+bUG3c/pYwvrxsYPfwIUA4NdTeOnQs+e0WrnP8KtIuS+F42AtjAJfcDMYr7UhHhE03n2wM51tf0LwTdpPi3tgI9kGM2tfPEddIemmItMiBVyJ3u0gyrRmQUr3SyJUPwJyRpZdrFAtOXtPw5+Kep0/Fy3rfQzDh6SvPjoBRGuwNawzAdI/SMGkmyN9yt/6BXVBQqnC8jQiqVoPPjIJShj03ar+ATt9Vg== Received: from [106.10.166.117] by nm33.bullet.mail.sg3.yahoo.com with NNFMP; 23 Feb 2016 16:35:38 -0000 Received: from [106.10.151.171] by tm6.bullet.mail.sg3.yahoo.com with NNFMP; 23 Feb 2016 16:35:38 -0000 Received: from [127.0.0.1] by omp1011.mail.sg3.yahoo.com with NNFMP; 23 Feb 2016 16:35:38 -0000 X-Yahoo-Newman-Property: ymail-5 X-Yahoo-Newman-Id: 734144.84323.bm@omp1011.mail.sg3.yahoo.com Received: by 106.10.196.183; Tue, 23 Feb 2016 16:35:38 +0000 Date: Tue, 23 Feb 2016 16:35:37 +0000 (UTC) From: Anuj Wadehra To: "user@cassandra.apache.org" , Debraj Manna , "user@cassandra.apache.org" Message-ID: <272691882.7229249.1456245337233.JavaMail.yahoo@mail.yahoo.com> In-Reply-To: References: Subject: Re: Restart Cassandra automatically MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_7229248_545923276.1456245337230" ------=_Part_7229248_545923276.1456245337230 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi Subharaj, Cassandra is built to be a Fault tolerant distributed db and suitable for building HA systems. As Cassandra provides multiple replicas for the same data, if a single nide goes down in Production, it wont bring down the cluster. In my opinion, if you target to start one or more failed Cassandra nodes without investigating the issue, you can damage system health rather than preserve it. Please set RF amd CL appropriately to ensure that system can afford node failures. ThanksAnuj Sent from Yahoo Mail on Android On Fri, 5 Feb, 2016 at 9:56 am, Debraj Manna wrote: Hi, What is the best way to keep cassandra running? My requirement is if for some reason cassandra stops then it should get started automatically. I tried to achieve this by adding cassandra to supervisord. My supervisor conf for cassandra looks like below:- [program:cassandra] command=/bin/bash -c 'sleep 10 && bin/cassandra' directory=/opt/cassandra/ autostart=true autorestart=true startretries=3 stderr_logfile=/var/log/cassandra_supervisor.err.log stdout_logfile=/var/log/cassandra_supervisor.out.log But it does not seem to work properly. Even if I stop cassandra from supervisor then the cassandra process seem to be running if I do ps -ef | grep cassandra I also tried the configuration mentioned in this question but still no luck. Can someone let me know what is the best way to keep cassandra running on production environment? Environment - Cassandra 2.2.4 - Debian 8 Thanks, ------=_Part_7229248_545923276.1456245337230 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Subharaj,

C= assandra is built to be a Fault tolerant distributed db and suitable for bu= ilding HA systems. As Cassandra provides multiple replicas for the same dat= a, if a single nide goes down in Production, it wont bring down the cluster= .

=
In my opinion, if= you target to start one or more failed Cassandra nodes without investigati= ng the issue, you can damage system health rather than preserve it.

Please set RF amd CL app= ropriately to ensure that system can afford node failures.

Thanks
Anuj



On Fri, 5 Feb, 2016 at 9:56 am, Debraj Man= na
<subharaj.manna@gmail.com> wrote:
Hi,

What is the best way to keep cass= andra running? My requirement is if=20 for some reason cassandra stops then it should get started=20 automatically.

I tried to achieve = this by adding cassandra to supervisord. My supervisor conf for cassandra l= ooks like below:-

[program:cassandra]
command=3D/bin/bash -c 'sleep 10 && bin/cassandra'
directory=3D/opt/cassandra/
autostart=3Dtrue
autorestart=3Dtrue
startretries=3D3
stderr_logfile=3D/var/log/cassandra_supervisor.err.log
stdout_logfile=3D/var/log/cassandra_supervisor.out.log

But it does not seem to= work properly. Even if I stop cassandra from=20 supervisor then the cassandra process seem to be running if I do
ps -ef | grep cassandra

I also tri= ed the configuration mentioned in this question but still no luck.

Can someone let me know what is the best way to keep cassandra running o= n production environment?

Environment
  • Cassandra 2.2.4
  • Debian 8

Thanks,=



------=_Part_7229248_545923276.1456245337230--