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 CC66B623B for ; Thu, 26 May 2011 21:39:22 +0000 (UTC) Received: (qmail 38910 invoked by uid 500); 26 May 2011 21:39:20 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 38881 invoked by uid 500); 26 May 2011 21:39:20 -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 38873 invoked by uid 99); 26 May 2011 21:39:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 May 2011 21:39:20 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [208.113.200.5] (HELO homiemail-a83.g.dreamhost.com) (208.113.200.5) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 May 2011 21:39:13 +0000 Received: from homiemail-a83.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a83.g.dreamhost.com (Postfix) with ESMTP id 13A525E06E for ; Thu, 26 May 2011 14:38:51 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=thelastpickle.com; h=from :mime-version:content-type:subject:date:in-reply-to:to :references:message-id; q=dns; s=thelastpickle.com; b=G5ntGWDnXa oDT/r3JgqkRew8NInuIm9cfg5k069gpkZZcWApWSULCsMic5PL4oLQzQti2hchw4 i5IUX1Sn9ssd6fo66aN4S/noxPwjwwXyhqpUmsKvV0FgroaNGM4oY/SupBfsIsb1 DFZpoW6j9kXN/wLjhTHB/hyvJELYL4i/E= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=thelastpickle.com; h=from :mime-version:content-type:subject:date:in-reply-to:to :references:message-id; s=thelastpickle.com; bh=Gf0923gUxzRNx2Df iE04ZUBy3VU=; b=kIwF+vYzFof6QIzxikDm8a8DCaJLY8+y64/WCnC965kW4TFY WURbeM4Y7bVqM3tV821NEFGxe9KZxGRXMV68Y0OB2ZMTuuxn8+AVzN1d6qe8NZEq QmnkWSWBJuieNrwk8fnpBf6yZHUBo56L3ZgxECHwnG2Hc4VnKIwUuZ2sVAk= Received: from [10.0.1.151] (121-73-157-230.cable.telstraclear.net [121.73.157.230]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: aaron@thelastpickle.com) by homiemail-a83.g.dreamhost.com (Postfix) with ESMTPSA id 504C85E06A for ; Thu, 26 May 2011 14:38:50 -0700 (PDT) From: aaron morton Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: multipart/alternative; boundary=Apple-Mail-15--426270633 Subject: Re: EC2 node adding trouble Date: Fri, 27 May 2011 09:38:47 +1200 In-Reply-To: To: user@cassandra.apache.org References: <6AF0D2D6-EB8B-47BC-800C-F9AD87B21E0B@synchromedia.co.uk> <0188B94A-F8E0-47C3-8470-904576C09659@synchromedia.co.uk> <1306342845852-6403602.post@n2.nabble.com> <34613B1A-DFDC-433C-8D9B-43DE2576D0DB@synchromedia.co.uk> Message-Id: <6B404EB5-6121-470E-8A8D-B7F90CF00DE6@thelastpickle.com> X-Mailer: Apple Mail (2.1084) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail-15--426270633 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii This ticket may be just the ticket :) https://issues.apache.org/jira/browse/CASSANDRA-2452 Cheers ----------------- Aaron Morton Freelance Cassandra Developer @aaronmorton http://www.thelastpickle.com On 27 May 2011, at 01:16, Sasha Dolgy wrote: > As an aside, you can also use that command to pull meta-data about > instances in AWS. I have implemented this to maintain a list of seed > nodes. This way, when a new instance is brought online, the default > cassandra.yaml is `enhanced` to contain a dynamic list of valid seeds, > proper hostname and a few other bits of useful information. >=20 > Finally, if you aren't using a single security group for all of your > cassandra instances, maybe this may be of help to you. When we add > new nodes to our ring, we add them to a single cassandra security > group. No messing about with security groups per instance... >=20 > -sd >=20 > On Thu, May 26, 2011 at 2:36 PM, Marcus Bointon > wrote: >> Thanks for all your helpful suggestions - I've now got it working. It = was down to a combination of things. >>=20 >> 1. A missing rule in a security group >> 2. A missing DNS name for the new node, so its default name was = defaulting to localhost >> 3. Google DNS caching the failed DNS lookup for the full duration of = the SOA's TTL >>=20 >> In order to avoid the whole problem with assigning IPs using the = internal/external trick and using up elastic IPs, I found this service = which I'd not seen before: = http://www.ducea.com/2009/06/01/howto-update-dns-hostnames-automatically-f= or-your-amazon-ec2-instances/ >>=20 >> This means you can reliably set (and reset as necessary) a listen = address with this command: >>=20 >> sed -i "s/^listen_address:.*/listen_address: `curl = http://169.254.169.254/latest/meta-data/local-ipv4`/" = /etc/cassandra/cassandra.yaml >>=20 >> It's not quite as good as having a true dynamic hostname, but at = least you can drop it in a startup script and forget it. >>=20 >> Marcus --Apple-Mail-15--426270633 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii This = ticket may be just the ticket :)


Cheers

http://www.thelastpickle.com

On 27 May 2011, at 01:16, Sasha Dolgy wrote:

As an = aside, you can also use that command to pull meta-data = about
instances in AWS.  I have implemented this to maintain a = list of seed
nodes.  This way, when a new instance is brought = online, the default
cassandra.yaml is `enhanced` to contain a dynamic = list of valid seeds,
proper hostname and a few other bits of useful = information.

Finally, if you aren't using a single security group = for all of your
cassandra instances, maybe this may be of help to = you.  When we add
new nodes to our ring, we add them to a single = cassandra security
group.  No messing about with security groups = per instance...

-sd

On Thu, May 26, 2011 at 2:36 PM, = Marcus Bointon
<marcus@synchromedia.co.uk>= ; wrote:
Thanks for all your helpful = suggestions - I've now got it working. It was down to a combination of = things.

1. A missing = rule in a security group
2. A = missing DNS name for the new node, so its default name was defaulting to = localhost
3. Google DNS = caching the failed DNS lookup for the full duration of the SOA's = TTL

In order to avoid the whole problem with assigning IPs = using the internal/external trick and using up elastic IPs, I found this = service which I'd not seen before: http://www.ducea.com/2009/06/01/how= to-update-dns-hostnames-automatically-for-your-amazon-ec2-instances/

This means you can reliably set (and reset as necessary) a = listen address with this command:

sed -i = "s/^listen_address:.*/listen_address: `curl http://169.254.169.254/la= test/meta-data/local-ipv4`/" = /etc/cassandra/cassandra.yaml

It's not quite = as good as having a true dynamic hostname, but at least you can drop it = in a startup script and forget it.

Marcus

= --Apple-Mail-15--426270633--