1. Look in the logs;
2. I think hbase shell works only locally;
3. The code below worked for me, and I don't use a config file, but give
the params directly:
public void connect() throws IOException {
Configuration hConf = HBaseConfiguration.create();
hConf.set(MyConstants.HBASE_CONFIGURATION_ZOOKEEPER_QUORUM,
MyConstants.zookeeperUrl);
hConf.set(MyConstants..HBASE_CONFIGURATION_ZOOKEEPER_CLIENTPORT,
MyConstants.zookeeperPort);
String tableName = "MyTable";
HTable hTable = new HTable(hConf, tableName);
hTable.close();
}
Mark
On Thu, Jan 12, 2012 at 10:20 AM, Peter Wolf <[email protected]> wrote:
> Still no love... Any suggestions?
>
> I'm on EC2, and I am trying to set up a Pseudo-Distributed HBaser Server
> on one machine, and access it from another. Both machines are EC2.
>
> I have already found the doc below, and I followed the instructions
>
>
> http://hbase.apache.org/book.**html#client_dependencies<http://hbase.apache.org/book.html#client_dependencies>
>
>
> My server is up and running, and I can access it from an 'hbase shell' on
> the machine. The hbase-site.xml is ...
>
> <configuration>
> <property>
> <name>hbase.zookeeper.quorum</**name>
> <value>ip-XX-YYY-Z-QQQ.ec2.**internal</value>
> </property>
> <property>
> <name>hbase.cluster.**distributed</name>
> <value>true</value>
> </property>
> <property>
> <name>hbase.rootdir</name>
> <value>hdfs://localhost/hbase<**/value>
> </property>
> </configuration>
>
> The client machine hbase-site.xml is...
>
> <configuration>
> <property>
> <name>hbase.zookeeper.quorum</**name>
> <value>ip-XX-YYY-Z-QQQ.ec2.**internal.ec2.internal</value>
> <description>Pseudo Distributed Server</description>
> </property>
> </configuration>
>
> And when I try 'hbase shell' remotely, I get this...
>
> hbase(main):001:0> status 'detailed'
>
> ERROR: org.apache.hadoop.hbase.**ZooKeeperConnectionException: HBase
> is able to connect to ZooKeeper but the connection closes
> immediately. This could be a sign that the server has too many
> connections (30 is the default). Consider inspecting your ZK server
> logs for that error and then make sure you are reusing
> HBaseConfiguration as often as you can. See HTable's javadoc for
> more information.
>
>
>
>