Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 25771 invoked from network); 29 Jul 2010 03:50:09 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 29 Jul 2010 03:50:09 -0000 Received: (qmail 95462 invoked by uid 500); 29 Jul 2010 03:50:07 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 95172 invoked by uid 500); 29 Jul 2010 03:50:04 -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 95162 invoked by uid 99); 29 Jul 2010 03:50:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Jul 2010 03:50:03 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of dabylon@gmail.com designates 209.85.213.172 as permitted sender) Received: from [209.85.213.172] (HELO mail-yx0-f172.google.com) (209.85.213.172) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Jul 2010 03:49:57 +0000 Received: by yxj4 with SMTP id 4so61826yxj.31 for ; Wed, 28 Jul 2010 20:49:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=PKChR+U9DIZ61t1L+gHCZvr+qTuSs7ErZI/8n51A2Ak=; b=ANdDjTh1vND8zWEtl8Itb/MocU7VPfaRtruqGCylW2+PgKbgl9rCiDnhXZNfTnS/Rm yOA1ClmIHFADokhD+8IvXK+3J6YMi63HWxN3erlqXrNukCS/m7h+Og1dZqKKbCLev42L Pyr0xjEmJjGlNi9Ok4xnpXnqD5nWu9OkijQl0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=FpmvWKVJ6/BJtv4v4hGnnJoH5JO8k5ZxPlyj6EbAp1ogjefcLvf4EgzbALsjISqi+U +9szbzNTgtMu/NRa017qb0g/tQ+MiQsN+nEw8IFiOWMgnPeXKbisH4N8x7qjIo0cGM1b FUqH6vH2AP8nXwmgo6JIdNQIvhj1WfveCCy78= MIME-Version: 1.0 Received: by 10.90.52.19 with SMTP id z19mr200993agz.164.1280375372039; Wed, 28 Jul 2010 20:49:32 -0700 (PDT) Received: by 10.229.230.194 with HTTP; Wed, 28 Jul 2010 20:49:01 -0700 (PDT) In-Reply-To: References: Date: Wed, 28 Jul 2010 20:49:01 -0700 Message-ID: Subject: Re: NoServer Available From: Daniel Bernstein To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=00163630f3053affb6048c7e9f5f X-Virus-Checked: Checked by ClamAV on apache.org --00163630f3053affb6048c7e9f5f Content-Type: text/plain; charset=ISO-8859-1 Thanks for the help Aaron. I sorted it out: the problem was that I was using the latest version of pycassa against cassandra 0.6.x. When I downloaded the 0.3.0 pycassa and used the previous api, all worked properly. Cheers, db On Wed, Jul 28, 2010 at 2:44 PM, Aaron Morton wrote: > Just checking the obvious, your connecting to the local host so is this > code running on one of the machines with the cassandra installed ? > > Second, assuming your using the current git hub source, put a break point > in connection.py at line 191 > to see what the actual error is when it tries to connect. > > Aaron > > > On 28 Jul, 2010,at 07:26 AM, Daniel Bernstein > wrote: > > I've set up a 2 node cluster and I'm trying to connect using pycassa. > > My thrift address is set to the default: localhost:9160 > > I've verified that the port is open and I'm able to connect to it via > telnet. > > My keyspace "Ananda" is defined as is the column family "URL" in > storage.xml > > Running the following commands locally, I get this: > > > >>> client = pycassa.connect("Ananda", ['127.0.0.1:9160'],timeout=3.5) > >>> cf = pycassa.ColumnFamily(client, "URL") > >>> cf.insert("foo", {"bar":"value"}) > Traceback (most recent call last): > File "", line 1, in > File "pycassa/columnfamily.py", line 332, in insert > self._wcl(write_consistency_level)) > File "pycassa/connection.py", line 164, in _client_call > conn = self._ensure_connection() > File "pycassa/connection.py", line 175, in _ensure_connection > conn = self.connect() > File "pycassa/connection.py", line 193, in connect > return self.connect() > File "pycassa/connection.py", line 186, in connect > server = self._servers.get() > File "pycassa/connection.py", line 136, in get > raise NoServerAvailable() > pycassa.connection.NoServerAvailable > > > NB: When I try to connect without any timeout, it just hangs. > When I shutdown cassandra, it fails immediately (rather than failing in 3.5 > seconds when I use a timeout). > > Any help would be much appreciated. > > --Daniel > > --00163630f3053affb6048c7e9f5f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks for the help Aaron.

I sorted it out: the problem was that I w= as using the latest version of pycassa against cassandra 0.6.x.

When= I downloaded the 0.3.0 pycassa and used the previous api, all worked prope= rly.

Cheers,

db


On Wed, Jul 28, 2010 at 2:44 PM, Aaron M= orton <aaro= n@thelastpickle.com> wrote:
Just checking the obvious, your connecting to the local host so i= s this code running on one of the machines with the cassandra installed ? <= br>

Second, assuming your using the current git hub source, p= ut a break point in connection.py at line 191
to see what the actual error is when it tries to connect.

Aaron


On 2= 8 Jul, 2010,at 07:26 AM, Daniel Bernstein <dbernstein@archive.org> wrote:

I've set up a 2 node cluster an= d I'm trying to connect using pycassa.

My thrift address is set = to the default:=A0 localhost:9160

I've verified that the port i= s open and I'm able to connect to it via telnet.

My keyspace "Ananda" is defined as is the column family "= ;URL" in storage.xml

Running the following commands locally, I = get this:


>>> client =3D pycassa.connect("Ananda&q= uot;, ['127.0.0.1:9160'],timeout=3D3.5)
>>> cf =3D pycassa.ColumnFamily(client, "URL")
>&g= t;> cf.insert("foo", {"bar":"value"})
T= raceback (most recent call last):
=A0 File "<stdin>", li= ne 1, in <module>
=A0 File "pycassa/columnfamily.py", line 332, in insert
=A0=A0= =A0 self._wcl(write_consistency_level))
=A0 File "pycassa/connectio= n.py", line 164, in _client_call
=A0=A0=A0 conn =3D self._ensure_co= nnection()
=A0 File "pycassa/connection.py", line 175, in _ensure_connection=
=A0=A0=A0 conn =3D self.connect()
=A0 File "pycassa/connection.= py", line 193, in connect
=A0=A0=A0 return self.connect()
=A0 Fi= le "pycassa/connection.py", line 186, in connect
=A0=A0=A0 server =3D self._servers.get()
=A0 File "pycassa/connecti= on.py", line 136, in get
=A0=A0=A0 raise NoServerAvailable()
pyc= assa.connection.NoServerAvailable


NB: When I try to connect with= out any timeout, it just hangs.
When I shutdown cassandra, it fails immediately (rather than failing in 3.5= seconds when I use a timeout).

Any help would be much appreciated.<= br>
--Daniel


--00163630f3053affb6048c7e9f5f--