You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Anurag Gujral <an...@gmail.com> on 2011/03/24 09:26:57 UTC
error connecting to cassandra 0.7.3
I am using cassandra-0.7.3 and thrift-0.0.5,I wrote a java client using
thrift 0.0.5 when I try to connect to
local cassandra server I get the following error
ERROR com.bluekai.cassandra.validation.ValidationThread - Failed to connect
to 127.0.0.1.
org.apache.thrift.transport.TTransportException: Cannot write to null
outputStream
I am able to connect to the local cassandra server using cassandra-cli
though
Any suggestions
Thanks
Anurag
Re: error connecting to cassandra 0.7.3
Posted by Tyler Hobbs <ty...@datastax.com>.
I highly recommend using one of the existing Cassandra
clients<http://wiki.apache.org/cassandra/ClientOptions>instead of
writing your own.
On Thu, Mar 24, 2011 at 10:17 AM, Anurag Gujral <an...@gmail.com>wrote:
> Hi All,
> I was able to resolve by making socket open.
> Thanks
> Anurag
>
>
> On Thu, Mar 24, 2011 at 7:48 AM, Anurag Gujral <an...@gmail.com>wrote:
>
>> Hi All,
>> I am using the following code as per suggestion by Ruslan
>> tr = new TSocket(url, port,timeout);
>> TTransport transport= new TFramedTransport(tr);
>> TProtocol proto = new TBinaryProtocol(transport);
>>
>> client = new Cassandra.Client(proto);
>> client.set_keyspace(this.keyspace);
>>
>> But I am getting the error
>>
>> at
>> org.apache.thrift.transport.TIOStreamTransport.write(TIOStreamTransport.java:142)
>> at
>> org.apache.thrift.transport.TFramedTransport.flush(TFramedTransport.java:156)
>> at
>> org.apache.cassandra.thrift.Cassandra$Client.send_set_keyspace(Cassandra.java:414)
>> at
>> org.apache.cassandra.thrift.Cassandra$Client.set_keyspace(Cassandra.java:403)
>> Please suggest why is this an error
>> Thanks
>> Anurag
>>
>>
>> On Thu, Mar 24, 2011 at 7:15 AM, Anurag Gujral <an...@gmail.com>wrote:
>>
>>> Hi Ruslan
>>> where is this framed transport defined.
>>> I did TProtocol proto = new TFramedTransport(tr);
>>>
>>> I am getting
>>> annot find symbol
>>> [javac] symbol : class TFramedTransport
>>> Please Suggest
>>> Thanks
>>> Anurag
>>>
>>> On Thu, Mar 24, 2011 at 2:13 AM, ruslan usifov <ru...@gmail.com>wrote:
>>>
>>>> and where is transport creation for your thrift interface? Cassandra 0.7
>>>> uses Framed transport as default
>>>>
>>>>
>>>> 2011/3/24 Anurag Gujral <an...@gmail.com>
>>>>
>>>>>
>>>>> I am using the following code to create my client.
>>>>>
>>>>> tr = new TSocket(url, port);
>>>>> TProtocol proto = new TBinaryProtocol(tr);
>>>>> client = new Cassandra.Client(proto);
>>>>> client.set_keyspace(this.keyspace);
>>>>>
>>>>> I am getting the errors I mentioned below
>>>>> Thanks
>>>>> Anurag
>>>>>
>>>>>
>>>>> ---------- Forwarded message ----------
>>>>> From: Anurag Gujral <an...@gmail.com>
>>>>> Date: Thu, Mar 24, 2011 at 1:26 AM
>>>>> Subject: error connecting to cassandra 0.7.3
>>>>> To: user@cassandra.apache.org
>>>>>
>>>>>
>>>>> I am using cassandra-0.7.3 and thrift-0.0.5,I wrote a java client using
>>>>> thrift 0.0.5 when I try to connect to
>>>>> local cassandra server I get the following error
>>>>> ERROR com.bluekai.cassandra.validation.ValidationThread - Failed to
>>>>> connect to 127.0.0.1.
>>>>> org.apache.thrift.transport.TTransportException: Cannot write to null
>>>>> outputStream
>>>>>
>>>>>
>>>>> I am able to connect to the local cassandra server using cassandra-cli
>>>>> though
>>>>>
>>>>> Any suggestions
>>>>> Thanks
>>>>> Anurag
>>>>>
>>>>>
>>>>
>>>
>>
>
--
Tyler Hobbs
Software Engineer, DataStax <http://datastax.com/>
Maintainer of the pycassa <http://github.com/pycassa/pycassa> Cassandra
Python client library
Re: error connecting to cassandra 0.7.3
Posted by Anurag Gujral <an...@gmail.com>.
Hi All,
I was able to resolve by making socket open.
Thanks
Anurag
On Thu, Mar 24, 2011 at 7:48 AM, Anurag Gujral <an...@gmail.com>wrote:
> Hi All,
> I am using the following code as per suggestion by Ruslan
> tr = new TSocket(url, port,timeout);
> TTransport transport= new TFramedTransport(tr);
> TProtocol proto = new TBinaryProtocol(transport);
>
> client = new Cassandra.Client(proto);
> client.set_keyspace(this.keyspace);
>
> But I am getting the error
>
> at
> org.apache.thrift.transport.TIOStreamTransport.write(TIOStreamTransport.java:142)
> at
> org.apache.thrift.transport.TFramedTransport.flush(TFramedTransport.java:156)
> at
> org.apache.cassandra.thrift.Cassandra$Client.send_set_keyspace(Cassandra.java:414)
> at
> org.apache.cassandra.thrift.Cassandra$Client.set_keyspace(Cassandra.java:403)
> Please suggest why is this an error
> Thanks
> Anurag
>
>
> On Thu, Mar 24, 2011 at 7:15 AM, Anurag Gujral <an...@gmail.com>wrote:
>
>> Hi Ruslan
>> where is this framed transport defined.
>> I did TProtocol proto = new TFramedTransport(tr);
>>
>> I am getting
>> annot find symbol
>> [javac] symbol : class TFramedTransport
>> Please Suggest
>> Thanks
>> Anurag
>>
>> On Thu, Mar 24, 2011 at 2:13 AM, ruslan usifov <ru...@gmail.com>wrote:
>>
>>> and where is transport creation for your thrift interface? Cassandra 0.7
>>> uses Framed transport as default
>>>
>>>
>>> 2011/3/24 Anurag Gujral <an...@gmail.com>
>>>
>>>>
>>>> I am using the following code to create my client.
>>>>
>>>> tr = new TSocket(url, port);
>>>> TProtocol proto = new TBinaryProtocol(tr);
>>>> client = new Cassandra.Client(proto);
>>>> client.set_keyspace(this.keyspace);
>>>>
>>>> I am getting the errors I mentioned below
>>>> Thanks
>>>> Anurag
>>>>
>>>>
>>>> ---------- Forwarded message ----------
>>>> From: Anurag Gujral <an...@gmail.com>
>>>> Date: Thu, Mar 24, 2011 at 1:26 AM
>>>> Subject: error connecting to cassandra 0.7.3
>>>> To: user@cassandra.apache.org
>>>>
>>>>
>>>> I am using cassandra-0.7.3 and thrift-0.0.5,I wrote a java client using
>>>> thrift 0.0.5 when I try to connect to
>>>> local cassandra server I get the following error
>>>> ERROR com.bluekai.cassandra.validation.ValidationThread - Failed to
>>>> connect to 127.0.0.1.
>>>> org.apache.thrift.transport.TTransportException: Cannot write to null
>>>> outputStream
>>>>
>>>>
>>>> I am able to connect to the local cassandra server using cassandra-cli
>>>> though
>>>>
>>>> Any suggestions
>>>> Thanks
>>>> Anurag
>>>>
>>>>
>>>
>>
>
Re: error connecting to cassandra 0.7.3
Posted by Anurag Gujral <an...@gmail.com>.
Hi All,
I am using the following code as per suggestion by Ruslan
tr = new TSocket(url, port,timeout);
TTransport transport= new TFramedTransport(tr);
TProtocol proto = new TBinaryProtocol(transport);
client = new Cassandra.Client(proto);
client.set_keyspace(this.keyspace);
But I am getting the error
at
org.apache.thrift.transport.TIOStreamTransport.write(TIOStreamTransport.java:142)
at
org.apache.thrift.transport.TFramedTransport.flush(TFramedTransport.java:156)
at
org.apache.cassandra.thrift.Cassandra$Client.send_set_keyspace(Cassandra.java:414)
at
org.apache.cassandra.thrift.Cassandra$Client.set_keyspace(Cassandra.java:403)
Please suggest why is this an error
Thanks
Anurag
On Thu, Mar 24, 2011 at 7:15 AM, Anurag Gujral <an...@gmail.com>wrote:
> Hi Ruslan
> where is this framed transport defined.
> I did TProtocol proto = new TFramedTransport(tr);
>
> I am getting
> annot find symbol
> [javac] symbol : class TFramedTransport
> Please Suggest
> Thanks
> Anurag
>
> On Thu, Mar 24, 2011 at 2:13 AM, ruslan usifov <ru...@gmail.com>wrote:
>
>> and where is transport creation for your thrift interface? Cassandra 0.7
>> uses Framed transport as default
>>
>>
>> 2011/3/24 Anurag Gujral <an...@gmail.com>
>>
>>>
>>> I am using the following code to create my client.
>>>
>>> tr = new TSocket(url, port);
>>> TProtocol proto = new TBinaryProtocol(tr);
>>> client = new Cassandra.Client(proto);
>>> client.set_keyspace(this.keyspace);
>>>
>>> I am getting the errors I mentioned below
>>> Thanks
>>> Anurag
>>>
>>>
>>> ---------- Forwarded message ----------
>>> From: Anurag Gujral <an...@gmail.com>
>>> Date: Thu, Mar 24, 2011 at 1:26 AM
>>> Subject: error connecting to cassandra 0.7.3
>>> To: user@cassandra.apache.org
>>>
>>>
>>> I am using cassandra-0.7.3 and thrift-0.0.5,I wrote a java client using
>>> thrift 0.0.5 when I try to connect to
>>> local cassandra server I get the following error
>>> ERROR com.bluekai.cassandra.validation.ValidationThread - Failed to
>>> connect to 127.0.0.1.
>>> org.apache.thrift.transport.TTransportException: Cannot write to null
>>> outputStream
>>>
>>>
>>> I am able to connect to the local cassandra server using cassandra-cli
>>> though
>>>
>>> Any suggestions
>>> Thanks
>>> Anurag
>>>
>>>
>>
>
Re: error connecting to cassandra 0.7.3
Posted by Anurag Gujral <an...@gmail.com>.
Hi Ruslan
where is this framed transport defined.
I did TProtocol proto = new TFramedTransport(tr);
I am getting
annot find symbol
[javac] symbol : class TFramedTransport
Please Suggest
Thanks
Anurag
On Thu, Mar 24, 2011 at 2:13 AM, ruslan usifov <ru...@gmail.com>wrote:
> and where is transport creation for your thrift interface? Cassandra 0.7
> uses Framed transport as default
>
>
> 2011/3/24 Anurag Gujral <an...@gmail.com>
>
>>
>> I am using the following code to create my client.
>>
>> tr = new TSocket(url, port);
>> TProtocol proto = new TBinaryProtocol(tr);
>> client = new Cassandra.Client(proto);
>> client.set_keyspace(this.keyspace);
>>
>> I am getting the errors I mentioned below
>> Thanks
>> Anurag
>>
>>
>> ---------- Forwarded message ----------
>> From: Anurag Gujral <an...@gmail.com>
>> Date: Thu, Mar 24, 2011 at 1:26 AM
>> Subject: error connecting to cassandra 0.7.3
>> To: user@cassandra.apache.org
>>
>>
>> I am using cassandra-0.7.3 and thrift-0.0.5,I wrote a java client using
>> thrift 0.0.5 when I try to connect to
>> local cassandra server I get the following error
>> ERROR com.bluekai.cassandra.validation.ValidationThread - Failed to
>> connect to 127.0.0.1.
>> org.apache.thrift.transport.TTransportException: Cannot write to null
>> outputStream
>>
>>
>> I am able to connect to the local cassandra server using cassandra-cli
>> though
>>
>> Any suggestions
>> Thanks
>> Anurag
>>
>>
>
Re: error connecting to cassandra 0.7.3
Posted by ruslan usifov <ru...@gmail.com>.
and where is transport creation for your thrift interface? Cassandra 0.7
uses Framed transport as default
2011/3/24 Anurag Gujral <an...@gmail.com>
>
> I am using the following code to create my client.
>
> tr = new TSocket(url, port);
> TProtocol proto = new TBinaryProtocol(tr);
> client = new Cassandra.Client(proto);
> client.set_keyspace(this.keyspace);
>
> I am getting the errors I mentioned below
> Thanks
> Anurag
>
>
> ---------- Forwarded message ----------
> From: Anurag Gujral <an...@gmail.com>
> Date: Thu, Mar 24, 2011 at 1:26 AM
> Subject: error connecting to cassandra 0.7.3
> To: user@cassandra.apache.org
>
>
> I am using cassandra-0.7.3 and thrift-0.0.5,I wrote a java client using
> thrift 0.0.5 when I try to connect to
> local cassandra server I get the following error
> ERROR com.bluekai.cassandra.validation.ValidationThread - Failed to
> connect to 127.0.0.1.
> org.apache.thrift.transport.TTransportException: Cannot write to null
> outputStream
>
>
> I am able to connect to the local cassandra server using cassandra-cli
> though
>
> Any suggestions
> Thanks
> Anurag
>
>
error connecting to cassandra 0.7.3
Posted by Anurag Gujral <an...@gmail.com>.
I am using the following code to create my client.
tr = new TSocket(url, port);
TProtocol proto = new TBinaryProtocol(tr);
client = new Cassandra.Client(proto);
client.set_keyspace(this.keyspace);
I am getting the errors I mentioned below
Thanks
Anurag
---------- Forwarded message ----------
From: Anurag Gujral <an...@gmail.com>
Date: Thu, Mar 24, 2011 at 1:26 AM
Subject: error connecting to cassandra 0.7.3
To: user@cassandra.apache.org
I am using cassandra-0.7.3 and thrift-0.0.5,I wrote a java client using
thrift 0.0.5 when I try to connect to
local cassandra server I get the following error
ERROR com.bluekai.cassandra.validation.ValidationThread - Failed to connect
to 127.0.0.1.
org.apache.thrift.transport.TTransportException: Cannot write to null
outputStream
I am able to connect to the local cassandra server using cassandra-cli
though
Any suggestions
Thanks
Anurag