简体   繁体   中英

Try to connect to aws ec2 Hbase using java hbase client

when I try to use java hbase client to create a table on my aws hbase , it gives me exceptions:

org.apache.hadoop.hbase.client.RetriesExhaustedException: Failed after attempts=36, exceptions:

Sun Dec 13 08:26:29 EST 2015, null, java.net.SocketTimeoutException: callTimeout=60000, callDuration=69130: row 'wujintao,,00000000000000' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=Slave1,60020,1449708947932, seqNum=0

And my java code is like this:

public static Configuration configuration; 
static { 
    configuration = HBaseConfiguration.create(); 
    configuration.set("hbase.zookeeper.property.clientPort", "2181"); 
    configuration.set("hbase.zookeeper.quorum","ec2-52-2-133-43.compute-1.amazonaws.com,ec2-52-70-140-152.compute-1.amazonaws.com,ec2-52-70-195-91.compute-1.amazonaws.com"); 
//  configuration.set("hbase.zookeeper.property.clientPort","2181"); 

    configuration.set("hbase.master", "*ec2-52-2-133-43.compute-1.amazonaws.com:9000"); 
}

does it means it has connected to the master but failed on the slaves? why fail?

Does hostname=Slave1,60020 defined in /etc/hosts file or Slave1 hostname is accessible from your client machine and master ? Hbase and others works with hostnames, even if you attemp to connect with ip, it will return hostname and try to use in it next call.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM