hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Suraj Varma <svarma...@gmail.com>
Subject Re: Cannot connect to HBase from a remote machine
Date Thu, 10 Feb 2011 13:15:25 GMT
Do you have multi-homed hosts for hbase/hadoop, by any chance?

Use the hbase shelll or master.jsp UI to do a zookeeper dump and check what
hosts/IPs are registered on zookeeper.
Next check if you are able to telnet to that host / ip combination.

If you are using multi-homed boxes, you may have to either disable one of
them, tie them together or configure hbase to explcitly pick the specific
dns.interface you want. Search the lists for multi-homed / multiple
interfaces and you should get some discussions on this.

--Suraj

On Mon, Feb 7, 2011 at 6:54 AM, Mark Kerzner <markkerzner@gmail.com> wrote:

> Thank you, I checked - exactly the same, from Cloudera distribution
>
> On Mon, Feb 7, 2011 at 3:27 AM, Shuja Rehman <shujamughal@gmail.com>
> wrote:
>
> > check the version of jars files on client and server machine. both should
> > have same version. i had the similar problem in past and i found that i
> was
> > using the old jars on client where server had the latest jars.
> >
> >
> >
> > On Mon, Feb 7, 2011 at 10:33 AM, Mark Kerzner <markkerzner@gmail.com>
> > wrote:
> >
> > > My friendly network administrators have found out that the ports were
> > > blocked, and they have disabled port blocking, so now the nc works
> right,
> > > but the program still hangs:
> > >
> > > nc myip 2181
> > > ruok*
> > > imok
> > >
> > > java -jar dist/HBaseMailboxIdCounter.jar
> > > 11/02/06 20:24:54 INFO zookeeper.ZooKeeperWrapper: Reconnecting to
> > > zookeeper
> > > 11/02/06 20:24:54 INFO zookeeper.ZooKeeper: Client
> > > environment:zookeeper.version=3.3.1-942149, built on 05/07/2010 17:14
> GMT
> > > 11/02/06 20:24:55 INFO zookeeper.ZooKeeper: Client environment:
> host.name
> > > =myhost
> > > 11/02/06 20:24:55 INFO zookeeper.ZooKeeper: Client
> > > environment:java.version=1.6.0_22
> > > 11/02/06 20:24:55 INFO zookeeper.ZooKeeper: Client
> > > environment:java.vendor=Sun Microsystems Inc.
> > > 11/02/06 20:24:55 INFO zookeeper.ZooKeeper: Client
> > > environment:java.home=/usr/java/jdk1.6.0_22/jre
> > > 11/02/06 20:24:55 INFO zookeeper.ZooKeeper: Client
> > > environment:java.class.path=dist/HBaseMailboxIdCounter.jar
> > > 11/02/06 20:24:55 INFO zookeeper.ZooKeeper: Client
> > >
> > >
> >
> environment:java.library.path=/usr/java/jdk1.6.0_22/jre/lib/amd64/server:/usr/java/jdk1.6.0_22/jre/lib/amd64:/usr/java/jdk1.6.0_22/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
> > > 11/02/06 20:24:55 INFO zookeeper.ZooKeeper: Client
> > > environment:java.io.tmpdir=/tmp
> > > 11/02/06 20:24:55 INFO zookeeper.ZooKeeper: Client
> > > environment:java.compiler=<NA>
> > > 11/02/06 20:24:55 INFO zookeeper.ZooKeeper: Client environment:os.name
> > > =Linux
> > > 11/02/06 20:24:55 INFO zookeeper.ZooKeeper: Client
> > > environment:os.arch=amd64
> > > 11/02/06 20:24:55 INFO zookeeper.ZooKeeper: Client
> > > environment:os.version=2.6.18-194.el5
> > > 11/02/06 20:24:55 INFO zookeeper.ZooKeeper: Client environment:
> user.name
> > > =markk
> > > 11/02/06 20:24:55 INFO zookeeper.ZooKeeper: Client
> > > environment:user.home=/home/markk
> > > 11/02/06 20:24:55 INFO zookeeper.ZooKeeper: Client
> > > environment:user.dir=/home/markk
> > > 11/02/06 20:24:55 INFO zookeeper.ZooKeeper: Initiating client
> connection,
> > > connectString=myip:2181 sessionTimeout=60000
> > > watcher=org.apache.hadoop.hbase.zookeeper.ZooKeeperWrapper@2d04faf8
> > > 11/02/06 20:24:55 INFO zookeeper.ClientCnxn: Opening socket connection
> to
> > > server /myip:2181
> > > 11/02/06 20:24:55 INFO zookeeper.ClientCnxn: Socket connection
> > established
> > > to 184-106-69-238.static.cloud-ips.com/myip:2181, initiating session
> > > 11/02/06 20:24:55 INFO zookeeper.ClientCnxn: Session establishment
> > complete
> > > on server 184-106-69-238.static.cloud-ips.com/myip:2181, sessionid =
> > > 0x12dfe59049a0003, negotiated timeout = 40000
> > >
> > > (hangs here)
> > >
> > > On Sun, Feb 6, 2011 at 9:40 PM, Ted Dunning <tdunning@maprtech.com>
> > wrote:
> > >
> > > > Yes.  No route to host is a little odd if ping works, but it looks
> like
> > > you
> > > > have network problems.
> > > >
> > > > On Sun, Feb 6, 2011 at 7:34 PM, Mark Kerzner <markkerzner@gmail.com>
> > > > wrote:
> > > >
> > > > > This probably diagnoses the problem:
> > > > >
> > > > > If I do nc on the HBase computer, it works, like this -
> > > > >
> > > > > nc myip 2181
> > > > > ruok*
> > > > > imok
> > > > >
> > > > > but if I do it on the remote one, it comes back right away, no
> error,
> > > but
> > > > > no
> > > > > work either -
> > > > >
> > > > > $ nc myip 2181
> > > > > $
> > > > >
> > > > > Also telnet tells the same story:
> > > > >
> > > > > telnet myip 2181
> > > > > Trying myip...
> > > > > telnet: connect to address myip: No route to host
> > > > > telnet: Unable to connect to remote host: No route to host
> > > > >
> > > > > I can ping it OK though.
> > > > >
> > > > > Thank you,
> > > > > Mark
> > > > >
> > > > > On Sun, Feb 6, 2011 at 8:28 PM, Ted Dunning <tdunning@maprtech.com
> >
> > > > wrote:
> > > > >
> > > > > > What happens when you try to connect to myip:2181 directly?
> > > > > >
> > > > > > You can use nc (network cat) for this:
> > > > > >
> > > > > >   $ *nc myip 2181*
> > > > > > *   ruok*
> > > > > >   imok
> > > > > >   $
> > > > > >
> > > > > > You type the part in bold italics (nc and ruok) and the response
> > from
> > > > the
> > > > > > system is (should be) "imok".
> > > > > >
> > > > > > There are a number of such "four letter words" that Zookeeper
> > > supports,
> > > > > but
> > > > > > the key here is to verify that Zookeeper is up and running and
> > > > > accessible.
> > > > > >
> > > > > > On Sun, Feb 6, 2011 at 5:25 PM, Mark Kerzner <
> > markkerzner@gmail.com>
> > > > > > wrote:
> > > > > >
> > > > > > > Then I get this error:
> > > > > > >
> > > > > > > 11/02/06 17:16:09 INFO zookeeper.ZooKeeper: Initiating
client
> > > > > connection,
> > > > > > > connectString=myip:2181 sessionTimeout=60000
> > > > > > >
> > watcher=org.apache.hadoop.hbase.zookeeper.ZooKeeperWrapper@21f8c6df
> > > > > > > 11/02/06 17:16:09 INFO zookeeper.ClientCnxn: Opening socket
> > > > connection
> > > > > to
> > > > > > > server /myip:2181
> > > > > > > 11/02/06 17:16:09 WARN zookeeper.ClientCnxn: Session 0x0
for
> > server
> > > > > null,
> > > > > > > unexpected error, closing socket connection and attempting
> > > reconnect
> > > > > > > java.net.NoRouteToHostException: No route to host
> > > > > > > at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> > > > > > > at
> > > > >
> > sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:574)
> > > > > > > at
> > > > org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1078)
> > > > > > >
> > > > > > > (of course, myip is the real ip with digits, I just replaced
it
> > for
> > > > > this
> > > > > > > email, and I verified that the ip is correct, and that
HBase
> runs
> > > at
> > > > > this
> > > > > > > ip)
> > > > > > >
> > > > > > > Thank you again,
> > > > > > > Mark
> > > > > > >
> > > > > > > On Sun, Feb 6, 2011 at 5:34 PM, Tost <ncanis@gmail.com>
wrote:
> > > > > > >
> > > > > > > > Try this.
> > > > > > > > config.set("hbase.zookeeper.quorum", "myip");
> > > > > > > >
> > > > > > > > 2011/2/6 Mark Kerzner <markkerzner@gmail.com>
> > > > > > > >
> > > > > > > > > Hi, guys,
> > > > > > > > >
> > > > > > > > > I have these lines trying to connect to the HBase,
and it
> > works
> > > > > > > perfectly
> > > > > > > > > well when I am connecting on that machine that
runs HBase,
> > but
> > > > not
> > > > > > when
> > > > > > > I
> > > > > > > > > am
> > > > > > > > > connecting from the outside. What ports or other
conditions
> > > > should
> > > > > I
> > > > > > > > check?
> > > > > > > > >
> > > > > > > > >        Configuration config = HBaseConfiguration.create();
> > > > > > > > >        config.set("hbase.zookeeper.quorum", "myip:60010");
> > > > > > > > >        config.set("hbase.zookeeper.property.clientPort",
> > > "2181");
> > > > > > > > >
> > > > > > > > >        HTable table = new HTable(config, "myTable");
> > > > > > > > >
> > > > > > > > > Thank you!
> > > > > > > > >
> > > > > > > > > Mark
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> >
> >
> > --
> > Regards
> > Shuja-ur-Rehman Baig
> > <http://pk.linkedin.com/in/shujamughal>
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message