Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 28880 invoked from network); 9 Nov 2010 18:07:53 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 9 Nov 2010 18:07:53 -0000 Received: (qmail 17184 invoked by uid 500); 9 Nov 2010 18:08:21 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 17096 invoked by uid 500); 9 Nov 2010 18:08: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 17088 invoked by uid 99); 9 Nov 2010 18:08:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Nov 2010 18:08:20 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=SPF_PASS,T_HK_NAME_DR X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ajp@eutechnyx.com designates 194.116.198.142 as permitted sender) Received: from [194.116.198.142] (HELO gse-mta-03.emailfiltering.com) (194.116.198.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Nov 2010 18:08:14 +0000 Received: from host-195-188-251-108.reversezone.co.uk ([195.188.251.108]) by gse-mta-03.emailfiltering.com with emfmta (version 4.6.0.72) vanilla id 9579402342 for user@cassandra.apache.org;ed3e3a6dbdb53ac4; Tue, 09 Nov 2010 18:07:53 +0000 Received: from xchange.eutechnyx.com (10.12.0.40:23538) by mail.eutechnyx.com with [XMail 1.20 ESMTP Server] id for from ; Tue, 9 Nov 2010 18:07:54 -0000 Received: from XCHANGE.eutechnyx.com ([::1]) by xchange.eutechnyx.com ([::1]) with mapi; Tue, 9 Nov 2010 18:07:52 +0000 From: "Dr. Andrew Perella" To: "user@cassandra.apache.org" Subject: RE: Cassandra - python communication problem Thread-Topic: Cassandra - python communication problem Thread-Index: AcuANjlp8CPKx6NITFeCQsAFjL6CJgAARP4AAABiSJA= Date: Tue, 9 Nov 2010 18:07:49 +0000 Message-ID: <9F83B51B5E3935419B14FC2D1436FC0947EF5A2E@xchange.eutechnyx.com> References: <9F83B51B5E3935419B14FC2D1436FC0947EF59CF@xchange.eutechnyx.com> In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Thanks Jonathan,=20 So it looks like the python bindings are using a deprecated non framed prot= ocol. Leaving that problem aside for a moment I changed the server to work = in non framed mode and now get a different error: vu@vs001:~/apache-cassandra-0.7.0-beta3/interface/gen-py/cassandra$ Cassand= ra-remote -h localhost:9160 describe_keyspace systemTraceback (most recent= call last): File "/usr/local/bin/Cassandra-remote", line 5, in pkg_resources.run_script('python-cassandra=3D=3D0.6.1', 'Cassandra-remo= te') File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 461, in ru= n_script self.require(requires)[0].run_script(script_name, ns) File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 1194, in r= un_script execfile(script_filename, namespace, namespace) File "/usr/local/lib/python2.6/dist-packages/python_cassandra-0.6.1-py2.6= .egg/EGG-INFO/scripts/Cassandra-remote", line 204, in pp.pprint(client.describe_keyspace(args[0],)) File "/usr/local/lib/python2.6/dist-packages/python_cassandra-0.6.1-py2.6= .egg/cassandra/Cassandra.py", line 1006, in describe_keyspace return self.recv_describe_keyspace() File "/usr/local/lib/python2.6/dist-packages/python_cassandra-0.6.1-py2.6= .egg/cassandra/Cassandra.py", line 1030, in recv_describe_keyspace raise TApplicationException(TApplicationException.MISSING_RESULT, "desc= ribe_keyspace failed: unknown result"); thrift.Thrift.TApplicationException: describe_keyspace failed: unknown resu= lt Any ideas? Cheers, Andrew -----Original Message----- From: Jonathan Ellis [mailto:jbellis@gmail.com]=20 Sent: 09 November 2010 17:56 To: user Subject: Re: Cassandra - python communication problem You're using an unframed transport to talk to a framed server, or vice vers= a. On Tue, Nov 9, 2010 at 11:47 AM, Dr. Andrew Perella wro= te: > Hi, > > > > I have been trying to connect to Cassandra 0.7.0-beta3 via python to no > avail: > > > > vu@vs001:~/apache-cassandra-0.7.0-beta3/interface/gen-py/cassandra$ > Cassandra-remote=A0 -h localhost:9160 describe_keyspace system > > Traceback (most recent call last): > > =A0 File "/usr/local/bin/Cassandra-remote", line 5, in > > =A0=A0=A0 pkg_resources.run_script('python-cassandra=3D=3D0.6.1', 'Cassan= dra-remote') > > =A0 File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 461, i= n > run_script > > =A0=A0=A0 self.require(requires)[0].run_script(script_name, ns) > > =A0 File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 1194, = in > run_script > > =A0=A0=A0 execfile(script_filename, namespace, namespace) > > =A0 File > "/usr/local/lib/python2.6/dist-packages/python_cassandra-0.6.1-py2.6.egg/= EGG-INFO/scripts/Cassandra-remote", > line 204, in > > =A0=A0=A0 pp.pprint(client.describe_keyspace(args[0],)) > > =A0 File > "/usr/local/lib/python2.6/dist-packages/python_cassandra-0.6.1-py2.6.egg/= cassandra/Cassandra.py", > line 1006, in describe_keyspace > > =A0=A0=A0 return self.recv_describe_keyspace() > > =A0 File > "/usr/local/lib/python2.6/dist-packages/python_cassandra-0.6.1-py2.6.egg/= cassandra/Cassandra.py", > line 1017, in recv_describe_keyspace > > =A0=A0=A0 (fname, mtype, rseqid) =3D self._iprot.readMessageBegin() > > =A0 File > "/usr/local/lib/python2.6/dist-packages/Thrift-0.2.0-py2.6-linux-x86_64.e= gg/thrift/protocol/TBinaryProtocol.py", > line 126, in readMessageBegin > > =A0=A0=A0 sz =3D self.readI32() > > =A0 File > "/usr/local/lib/python2.6/dist-packages/Thrift-0.2.0-py2.6-linux-x86_64.e= gg/thrift/protocol/TBinaryProtocol.py", > line 203, in readI32 > > =A0=A0=A0 buff =3D self.trans.readAll(4) > > =A0 File > "/usr/local/lib/python2.6/dist-packages/Thrift-0.2.0-py2.6-linux-x86_64.e= gg/thrift/transport/TTransport.py", > line 58, in readAll > > =A0=A0=A0 chunk =3D self.read(sz-have) > > =A0 File > "/usr/local/lib/python2.6/dist-packages/Thrift-0.2.0-py2.6-linux-x86_64.e= gg/thrift/transport/TTransport.py", > line 155, in read > > =A0=A0=A0 self.__rbuf =3D StringIO(self.__trans.read(max(sz, self.DEFAULT= _BUFFER))) > > =A0 File > "/usr/local/lib/python2.6/dist-packages/Thrift-0.2.0-py2.6-linux-x86_64.e= gg/thrift/transport/TSocket.py", > line 94, in read > > =A0=A0=A0 raise TTransportException(type=3DTTransportException.END_OF_FIL= E, > message=3D'TSocket read 0 bytes') > > thrift.transport.TTransport.TTransportException: TSocket read 0 bytes > > > > I get similar errors for all queries. > > > > I cannot work out what is going wrong here. Can anyone help? (I need many= of > the functions only added in 0.7) > > > > Best Regards, > > Andrew > > > > > > This e-mail is confidential and may be privileged. It may be read, copied > and used only by the intended recipient. No communication sent by e-mail = to > or from Eutechnyx is intended to give rise to contractual or other legal > liability, apart from liability which cannot be excluded under English la= w. > > This email has been scanned for all known viruses by www.epagency.net. > > www.eutechnyx.com Eutechnyx Limited. Registered in England No: 2172322 --=20 Jonathan Ellis Project Chair, Apache Cassandra co-founder of Riptano, the source for professional Cassandra support http://riptano.com This email has been scanned for all known viruses by the Email Protection A= gency. = This e-mail is confidential and may be privileged. It may be read, copi= ed and used only by the intended recipient. No communication sent by e-= mail to or from Eutechnyx is intended to give rise to contractual or ot= her legal liability, apart from liability which cannot be excluded unde= r English law.=20=0D=0A=0D=0AThis email has been scanned for all known = viruses by the Email Protection Agency. http://www.epagency.net=0D=0A=0D= =0A=0D=0Awww.eutechnyx.com Eutechnyx Limited. Registered in England No:= 2172322=0D=0A=