Return-Path: Delivered-To: apmail-incubator-cassandra-user-archive@minotaur.apache.org Received: (qmail 91616 invoked from network); 9 Feb 2010 09:13:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Feb 2010 09:13:12 -0000 Received: (qmail 9134 invoked by uid 500); 9 Feb 2010 09:13:12 -0000 Delivered-To: apmail-incubator-cassandra-user-archive@incubator.apache.org Received: (qmail 9117 invoked by uid 500); 9 Feb 2010 09:13:12 -0000 Mailing-List: contact cassandra-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cassandra-user@incubator.apache.org Delivered-To: mailing list cassandra-user@incubator.apache.org Received: (qmail 9108 invoked by uid 99); 9 Feb 2010 09:13:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Feb 2010 09:13:12 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jackculpepper@gmail.com designates 209.85.221.171 as permitted sender) Received: from [209.85.221.171] (HELO mail-qy0-f171.google.com) (209.85.221.171) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Feb 2010 09:13:04 +0000 Received: by qyk1 with SMTP id 1so2037072qyk.0 for ; Tue, 09 Feb 2010 01:12:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=35vIL/BXAnuIlTL4g6Dy14Wvxh2XQdKrH7DdKJDjjeM=; b=EHHFRaXbRBqO/SIbGwyUY/az8XmL8vpXeS0AKJZS+69931O+mZl0hyBFkPu1scA5OS Le4EMQd0fo/mN+laRpAUnzitf6tsFZWLpZCNJV+UtaU0xq6ZOjJBEwtExIF0yhMESXvT Ca4u1o6P6+8WHHtFwwajjibp9gX2rXwzavXpM= 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:content-transfer-encoding; b=b5kgsDvdghDhWbRBj4zKX3SOXx3IlKzJj8JHqSPGttbxegruwSYzKVs9RTW8VZyG9m Ir/lc3Ll/yHboYstbuzt9tw87lQgqiX3Bf1wTbuj8hISkjHr4ZBV1g/33/qtBrwhdFqj BuFylDqt36mlRHVKRqk6raoksoFu2qDw6VxcE= MIME-Version: 1.0 Received: by 10.229.68.4 with SMTP id t4mr1041907qci.15.1265706763100; Tue, 09 Feb 2010 01:12:43 -0800 (PST) In-Reply-To: <037b01caa967$30faf840$92f0e8c0$@com> References: <037b01caa967$30faf840$92f0e8c0$@com> From: Jack Culpepper Date: Tue, 9 Feb 2010 01:12:23 -0800 Message-ID: <261c158e1002090112u429d6d2csffe4ad03838bf86d@mail.gmail.com> Subject: Re: Unable connect Thrift client to cassandra remotely (connection refused) To: cassandra-user@incubator.apache.org Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Read the Miscellaneous section of this page: http://wiki.apache.org/cassandra/StorageConfiguration The default config binds only to localhost. You have to change if you want to connect remotely. Best, Jack On Tue, Feb 9, 2010 at 1:06 AM, Weijun Li wrote: > Hello, > > > > I installed Cassandra =A00.50 and started the instance without any proble= m. > The problem is: if I run > > > > bin/cassandra-cli --host localhost -port 9160 > > > > it worked perfectly. > > > > But whenever I tried to connect from any non-localhost and non-127.0.0.1 > address (from other server or same server with domain name), I got > =93connection refused=94, --no matter how I open port, disable firewall o= r > change port number. > > > > So is there any default restriction in Cassandra that doesn=92t allow > non-localhost client connection? How can I get Cassandra-cli to work > remotely on an Cassandra instance? Also it seems to have same issue for > nodeprobe. > > > > -bash-3.1# bin/cassandra-cli --host [xxxx-hostname] -port 9160 > > Exception java.net.ConnectException: Connection refused > > org.apache.thrift.transport.TTransportException: java.net.ConnectExceptio= n: > Connection refused > > =A0=A0=A0=A0=A0=A0=A0 at org.apache.thrift.transport.TSocket.open(TSocket= .java:185) > > =A0=A0=A0=A0=A0=A0=A0 at org.apache.cassandra.cli.CliMain.connect(CliMain= .java:65) > > =A0=A0=A0=A0=A0=A0=A0 at org.apache.cassandra.cli.CliMain.main(CliMain.ja= va:151) > > Caused by: java.net.ConnectException: Connection refused > > =A0=A0=A0=A0=A0=A0=A0 at java.net.PlainSocketImpl.socketConnect(Native Me= thod) > > =A0=A0=A0=A0=A0=A0=A0 at java.net.PlainSocketImpl.doConnect(PlainSocketIm= pl.java:333) > > =A0=A0=A0=A0=A0=A0=A0 at > java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) > > =A0=A0=A0=A0=A0=A0=A0 at java.net.PlainSocketImpl.connect(PlainSocketImpl= .java:182) > > =A0=A0=A0=A0=A0=A0=A0 at java.net.SocksSocketImpl.connect(SocksSocketImpl= .java:366) > > =A0=A0=A0=A0=A0=A0=A0 at java.net.Socket.connect(Socket.java:519) > > =A0=A0=A0=A0=A0=A0=A0 at java.net.Socket.connect(Socket.java:469) > > =A0=A0=A0=A0=A0=A0=A0 at org.apache.thrift.transport.TSocket.open(TSocket= .java:180) > > =A0=A0=A0=A0=A0=A0=A0 ... 2 more > > > > Thanks, > > -Weijun