cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Morton <aa...@thelastpickle.com>
Subject Re: NoServer Available
Date Wed, 28 Jul 2010 21:44:48 GMT
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 <dbernstein@archive.org> 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 "<stdin>", line 1, in <module>
>   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()
> pycassaconnection.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
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
    • Unnamed multipart/related (inline, None, 0 bytes)
View raw message