Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 37360 invoked from network); 9 Sep 2010 08:15:15 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 9 Sep 2010 08:15:15 -0000 Received: (qmail 27455 invoked by uid 500); 9 Sep 2010 08:15:13 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 26125 invoked by uid 500); 9 Sep 2010 08:15:10 -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 26117 invoked by uid 99); 9 Sep 2010 08:15:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Sep 2010 08:15:10 +0000 X-ASF-Spam-Status: No, hits=4.4 required=10.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ivytang0812@gmail.com designates 209.85.214.172 as permitted sender) Received: from [209.85.214.172] (HELO mail-iw0-f172.google.com) (209.85.214.172) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Sep 2010 08:15:05 +0000 Received: by iwn3 with SMTP id 3so1021772iwn.31 for ; Thu, 09 Sep 2010 01:14:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type; bh=23m63PmQv5z9FKUwZoDUKWMDUf3sDdadLr6LIR2tNQA=; b=aoDAiwpFGpLKX+oh7Fir70gkTgpI1wM/lWxtuxPsqcxjkxOIIRg5s4XQZT3kqlPmyD av8Oxh/XjcNXmjLKqdweybJsa3d5pxq3ovjGqpJVutoS5PagMOLsXKTBd4qzHpVH1AAZ t2GrnemjFOyvCs6PAK0fwrNU7tdYO3I1iJIy0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=pLl+9iNzaI+OdK3nmW2kdFVKoeCKkbsVWLWv6Zvi258xtY2FjA0o11WHdoGpkbbOmO LZE3wffbuimi0Ud1vIstbXk+rAPULcNlazeDKPEwuT20inZmeEX8PzyzMAwWtGBF4Nrz SfVE8AQ0ciFkT4ZO1Kz0cpRIvBFX8HGgdZneQ= Received: by 10.231.162.13 with SMTP id t13mr2620327ibx.160.1284020084289; Thu, 09 Sep 2010 01:14:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.160.3 with HTTP; Thu, 9 Sep 2010 01:14:24 -0700 (PDT) In-Reply-To: References: From: Ying Tang Date: Thu, 9 Sep 2010 04:14:24 -0400 Message-ID: Subject: Re: Connect to localhost is ok,but the ip fails. To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=00504501400c023326048fcf39ba --00504501400c023326048fcf39ba Content-Type: text/plain; charset=ISO-8859-1 no , i didn't change the yaml file. On Thu, Sep 9, 2010 at 4:10 AM, Benjamin Black wrote: > Do you mean you are changing the yaml file? Does 'netstat -an | grep > 9160' indicate cassandra is bound to ipv4 or ipv6 (tcp vs tcp6 in the > netstat output)? > > > b > > On Thu, Sep 9, 2010 at 1:06 AM, Ying Tang wrote: > > I'm using cassandra 0.7 . > > And in storage-conf . > > > > # The address to bind the Thrift RPC service to > > rpc_address: localhost > > # port for Thrift to listen on > > rpc_port: 9160 > > > > In my client , the code below works successfully. > > > > TSocket socket = new TSocket("localhost", 9160); > > TTransport trans = > > Boolean.valueOf(System.getProperty("cassandra.framed", "true")) ? new > > TFramedTransport( > > socket) : socket; > > trans.open(); > > > > But if i changed "localhost" to the localhost's ip , throws out the > > "java.net.ConnectException: Connection refused". > > > > And the connecting to other ip also fails. > > > > -- > > Best regards, > > Ivy Tang > > > > > > > -- Best regards, Ivy Tang --00504501400c023326048fcf39ba Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable no , i didn't change the yaml file.

O= n Thu, Sep 9, 2010 at 4:10 AM, Benjamin Black <b@b3k.us> wrote:
Do you mean you are changing the yaml file? =A0Does 'netstat -an | grep=
9160' indicate cassandra is bound to ipv4 or ipv6 (tcp vs tcp6 in the netstat output)?


b

On Thu, Sep 9, 2010 at 1:06 AM, Ying Tang <ivytang0812@gmail.com> wrote:
> I'm using cassandra 0.7 .
> And in storage-conf .
>
> # The address to bind the Thrift RPC service to
> rpc_address: localhost
> # port for Thrift to listen on
> rpc_port: 9160
>
> In my client , the code below works successfully.
>
> =A0 =A0 =A0 =A0 TSocket socket =3D new TSocket("localhost", = 9160);
> =A0=A0=A0=A0=A0=A0=A0 TTransport trans =3D
> Boolean.valueOf(System.getProperty("cassandra.framed", "= ;true")) ? new
> TFramedTransport(
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 socket) : socket;
> =A0=A0=A0=A0=A0=A0=A0 trans.open();
>
> But if i changed "localhost" to the localhost's ip , thr= ows out the
> "java.net.ConnectException: Connection refused".
>
> And the connecting to other ip also fails.
>
> --
> Best regards,
> Ivy Tang
>
>
>



--
Best r= egards,

Ivy Tang



--00504501400c023326048fcf39ba--