You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Jason Alexander <Ja...@match.com> on 2010/04/07 22:15:50 UTC

Handshake failed

Hey guys,


Excuse my noobishness here, we're working through the initial PoC phases of implementing Cassandra here on one of our major systems we're building, and I'm having a few problems.

I'm running Cassandra 0.5.1 on Fedora 12 in a VM on OS X, with the network interface running in bridged mode. I'm attempting to connect to it remotely from a separate Windows 7 workstation via C#, and getting this in the Cassandra logs:

Debugger failed to attach: handshake failed - received >[two binary bits< - excepted >JDWP-Handshake<

>From a code perspective, it's dying on the insert call:

            TTransport transport = new TSocket("10.223.131.19", 8888);
            TProtocol protocol = new TBinaryProtocol(transport);
            Cassandra.Client client = new Cassandra.Client(protocol);

            Console.WriteLine("Opening connection...");
            transport.Open();

            System.Text.Encoding utf8Encoding = System.Text.Encoding.UTF8;

            long timeStamp = DateTime.Now.Millisecond;
            ColumnPath nameColumnPath = new ColumnPath()
            {
                Column_family = "Standard1",
                Column = utf8Encoding.GetBytes("name")
            };

            Console.WriteLine("Inserting name columns...");

            //Insert the data into the column 'name' 
            client.insert("Keyspace1",
                          "1",
                          nameColumnPath,
                          utf8Encoding.GetBytes("Joe Bloggs"),
                          timeStamp,
                          ConsistencyLevel.ONE);


Am I doing something wrong here? ;)


TIA,
-Jason


Re: Handshake failed

Posted by Brandon Williams <dr...@gmail.com>.
On Wed, Apr 7, 2010 at 3:15 PM, Jason Alexander
<Ja...@match.com>wrote:

>            TTransport transport = new TSocket("10.223.131.19", 8888);
>

This is not the default Thrift port (unless you explicitly set that way),
you probably want port 9160.

-Brandon

RE: Handshake failed

Posted by Jason Alexander <Ja...@match.com>.
Awesome, thanks guys - yeah, I was trying 9160, but not able to connect. Let me tweak my firewall settings and see if I can figure out why my VM is getting sandboxed so harshly.


Thanks again,
-Jason

-----Original Message-----
From: Jonathan Ellis [mailto:jbellis@gmail.com] 
Sent: Wednesday, April 07, 2010 3:18 PM
To: user@cassandra.apache.org
Subject: Re: Handshake failed

That means you're connecting the the debugger port, instead of the
thrift one.  (Thrift is 9160 by default.)

On Wed, Apr 7, 2010 at 3:15 PM, Jason Alexander
<Ja...@match.com> wrote:
> Hey guys,
>
>
> Excuse my noobishness here, we're working through the initial PoC phases of implementing Cassandra here on one of our major systems we're building, and I'm having a few problems.
>
> I'm running Cassandra 0.5.1 on Fedora 12 in a VM on OS X, with the network interface running in bridged mode. I'm attempting to connect to it remotely from a separate Windows 7 workstation via C#, and getting this in the Cassandra logs:
>
> Debugger failed to attach: handshake failed - received >[two binary bits< - excepted >JDWP-Handshake<
>
> From a code perspective, it's dying on the insert call:
>
>            TTransport transport = new TSocket("10.223.131.19", 8888);
>            TProtocol protocol = new TBinaryProtocol(transport);
>            Cassandra.Client client = new Cassandra.Client(protocol);
>
>            Console.WriteLine("Opening connection...");
>            transport.Open();
>
>            System.Text.Encoding utf8Encoding = System.Text.Encoding.UTF8;
>
>            long timeStamp = DateTime.Now.Millisecond;
>            ColumnPath nameColumnPath = new ColumnPath()
>            {
>                Column_family = "Standard1",
>                Column = utf8Encoding.GetBytes("name")
>            };
>
>            Console.WriteLine("Inserting name columns...");
>
>            //Insert the data into the column 'name'
>            client.insert("Keyspace1",
>                          "1",
>                          nameColumnPath,
>                          utf8Encoding.GetBytes("Joe Bloggs"),
>                          timeStamp,
>                          ConsistencyLevel.ONE);
>
>
> Am I doing something wrong here? ;)
>
>
> TIA,
> -Jason
>
>

Re: Handshake failed

Posted by Jonathan Ellis <jb...@gmail.com>.
That means you're connecting the the debugger port, instead of the
thrift one.  (Thrift is 9160 by default.)

On Wed, Apr 7, 2010 at 3:15 PM, Jason Alexander
<Ja...@match.com> wrote:
> Hey guys,
>
>
> Excuse my noobishness here, we're working through the initial PoC phases of implementing Cassandra here on one of our major systems we're building, and I'm having a few problems.
>
> I'm running Cassandra 0.5.1 on Fedora 12 in a VM on OS X, with the network interface running in bridged mode. I'm attempting to connect to it remotely from a separate Windows 7 workstation via C#, and getting this in the Cassandra logs:
>
> Debugger failed to attach: handshake failed - received >[two binary bits< - excepted >JDWP-Handshake<
>
> From a code perspective, it's dying on the insert call:
>
>            TTransport transport = new TSocket("10.223.131.19", 8888);
>            TProtocol protocol = new TBinaryProtocol(transport);
>            Cassandra.Client client = new Cassandra.Client(protocol);
>
>            Console.WriteLine("Opening connection...");
>            transport.Open();
>
>            System.Text.Encoding utf8Encoding = System.Text.Encoding.UTF8;
>
>            long timeStamp = DateTime.Now.Millisecond;
>            ColumnPath nameColumnPath = new ColumnPath()
>            {
>                Column_family = "Standard1",
>                Column = utf8Encoding.GetBytes("name")
>            };
>
>            Console.WriteLine("Inserting name columns...");
>
>            //Insert the data into the column 'name'
>            client.insert("Keyspace1",
>                          "1",
>                          nameColumnPath,
>                          utf8Encoding.GetBytes("Joe Bloggs"),
>                          timeStamp,
>                          ConsistencyLevel.ONE);
>
>
> Am I doing something wrong here? ;)
>
>
> TIA,
> -Jason
>
>