Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 79581 invoked from network); 9 Sep 2010 20:50:06 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 9 Sep 2010 20:50:06 -0000 Received: (qmail 978 invoked by uid 500); 9 Sep 2010 20:50:04 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 920 invoked by uid 500); 9 Sep 2010 20:50:03 -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 912 invoked by uid 99); 9 Sep 2010 20:50:03 -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 20:50:03 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.215.172] (HELO mail-ey0-f172.google.com) (209.85.215.172) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Sep 2010 20:49:59 +0000 Received: by eyd10 with SMTP id 10so1434366eyd.31 for ; Thu, 09 Sep 2010 13:49:37 -0700 (PDT) Received: by 10.216.12.8 with SMTP id 8mr785716wey.107.1284065377395; Thu, 09 Sep 2010 13:49:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.3.129 with HTTP; Thu, 9 Sep 2010 13:49:17 -0700 (PDT) In-Reply-To: References: From: Benjamin Black Date: Thu, 9 Sep 2010 13:49:17 -0700 Message-ID: Subject: Re: Connect to localhost is ok,but the ip fails. To: user@cassandra.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable correct, 0.0.0.0 is a wildcard. On Thu, Sep 9, 2010 at 1:19 PM, Aaron Morton wrot= e: > I =A0set this to 0.0.0.0 I think the original storage_config.xml had a co= mment > that it would make thrift respond on all interfaces. > Aaron > On 09 Sep, 2010,at 08:37 PM, Benjamin Black wrote: > > when you say "localhost's ip" do you mean 127.0.0.1 or do you mean an > ip on its local interface? > > On Thu, Sep 9, 2010 at 1:29 AM, Ying Tang wrote: >> oh.solve it. >> >> Change the rpc_address to my localhost's ip ,then in the client code ,th= e >> TSocket can connect to the ip. >> >> On Thu, Sep 9, 2010 at 4:14 AM, Ying Tang wrote: >>> >>> 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? =A0Does 'netstat -an | gre= p >>>> 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 wrot= e: >>>> > 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")) ? ne= w >>>> > 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 , throws out the >>>> > "java.net.ConnectException: Connection refused". >>>> > >>>> > And the connecting to other ip also fails. >>>> > >>>> > -- >>>> > Best regards, >>>> > Ivy Tang >>>> > >>>> > >>>> > >>> >>> >>> >>> -- >>> Best regards, >>> Ivy Tang >>> >>> >> >> >> >> -- >> Best regards, >> Ivy Tang >> >> >> >