Support Questions
Find answers, ask questions, and share your expertise

Cannot list replicated tables from hbase shell

Rising Star

Hi,

I'm currently testing "HA" feature for HBase (in a kerberized cluster), but cannot perform successfully elementary tests...

I've been using hbase shell to try to create replicated table, but cannot list replicated table afterward :

hbase(main):008:0> create 'testtable', 'f', {REGION_REPLICATION => 2}
0 row(s) in 2.2980 seconds

=> Hbase::Table - testtable
hbase(main):009:0> list_replicated_tables
TABLE:COLUMNFAMILY  ReplicationType

ERROR: KeeperErrorCode = NoAuth for /hbase-secure/replication/peers

Here is some help for this command:
List all the tables and column families replicated from this cluster

  hbase> list_replicated_tables
  hbase> list_replicated_tables 'abc.*'

Any help would be appreciated ...

Sebastien

3 REPLIES 3

Guru

The problem is that by default, when you launch hbase shell, it does not authenticate to zookeeper. For doing replication-related operations, you should be authenticating as the hbase server-side user.

The easiest way, would be to launch the shell like this:

hbase --auth-as-server shell

See

https://issues.apache.org/jira/browse/HBASE-15145

Rising Star

Hi Enis,

Thanks for your answer, but this didn't work for me, I got the exact same error...

Is there a way to debug or get more details about the problem ?

Thanks again

Guru

Maybe you don't have the patch. Which version of HDP is this?

You can try something like this:

export HBASE_OPTS="$HBASE_OPTS -XX:+UseConcMarkSweepGC -XX:ErrorFile=/var/log/hbase/hs_err_pid%p.log -Djava.security.auth.login.config=/usr/hdp/current/hbase-client/conf/hbase_client_jaas.conf"

Then run the hbase shell command.