HDP下解决Hbase 无法创建表问题

HDP下Hbase 无法创建表问题解决

环境: Ambari + HDP 3.1.5

Problem

HBase Shell
Use "help" to get list of supported commands.
Use "exit" to quit this interactive shell.
For Reference, please visit: http://hbase.apache.org/2.0/book.html#shell
Version 2.1.6.3.1.5.0-152, rUnknown, Thu Dec 12 20:16:57 UTC 2019
Took 0.0033 seconds
hbase(main):001:0> create 'empData',{NAME => 'details'}

ERROR: org.apache.hadoop.hbase.PleaseHoldException: Master is initializing
        at org.apache.hadoop.hbase.master.HMaster.checkInitialized(HMaster.java:2975)
        at org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:1968)
        at org.apache.hadoop.hbase.master.MasterRpcServices.createTable(MasterRpcServices.java:636)
        at org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos$MasterService$2.callBlockingMethod(MasterProtos.java)
        at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:413)
        at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:132)
        at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:324)
        at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:304)

For usage try 'help "create"'

Took 9.1944 seconds
hbase(main):002:0> list
TABLE
0 row(s)
Took 0.0304 seconds
=> []

另有Hive报错:


        Connection failed on host node6:10000 (Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/stacks/HDP/3.0/services/HIVE/package/alerts/alert_hive_thrift_port.py", line 213, in execute
    ldap_password=ldap_password, pam_username=pam_username, pam_password=pam_password)
  File "/usr/lib/ambari-agent/lib/resource_management/libraries/functions/hive_check.py", line 95, in check_thrift_port_sasl
    timeout_kill_strategy=TerminateStrategy.KILL_PROCESS_TREE,
  File "/usr/lib/ambari-agent/lib/resource_management/core/base.py", line 166, in __init__
    self.env.run()
  File "/usr/lib/ambari-agent/lib/resource_management/core/environment.py", line 160, in run
    self.run_action(resource, action)
  File "/usr/lib/ambari-agent/lib/resource_management/core/environment.py", line 124, in run_action
    provider_action()
  File "/usr/lib/ambari-agent/lib/resource_management/core/providers/system.py", line 263, in action_run
    returns=self.resource.returns)
  File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 72, in inner
    result = function(command, **kwargs)
  File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 102, in checked_call
    tries=tries, try_sleep=try_sleep, timeout_kill_strategy=timeout_kill_strategy, returns=returns)
  File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 150, in _call_wrapper
    result = _call(command, **kwargs_copy)
  File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 314, in _call
    raise ExecutionFailed(err_msg, code, out, err)
ExecutionFailed: Execution of '! (beeline -u 'jdbc:hive2://node6:10000/;transportMode=binary' -n hive -e ';' 2>&1 | awk '{print}' | grep -vz -i -e 'Connected to:' -e 'Transaction isolation:' -e 'inactive HS2 instance; use service discovery')' returned 1. SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/hdp/3.1.5.0-152/hive/lib/log4j-slf4j-impl-2.10.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found
Metastore on node6 is not listening or port 9083

Solve

时钟同步后问题没有解决,考虑到服务器此前曾删除重装过所有Service,清空元数据

zookeeper-client -server localhost:2181
rmr /hbase-unsecure/meta-region-server
rmr /atsv2-hbase-unsecure/meta-region-server

Details

[root@node1 ~]# zookeeper-client -server localhost:2181
Connecting to localhost:2181
2021-11-10 09:16:14,242 - INFO  [main:Environment@100] - Client environment:zookeeper.version=3.4.6-152--1, built on 12/12/2019 19:36 GMT
2021-11-10 09:16:14,243 - INFO  [main:Environment@100] - Client environment:host.name=node1
2021-11-10 09:16:14,244 - INFO  [main:Environment@100] - Client environment:java.version=1.8.0_151
2021-11-10 09:16:14,245 - INFO  [main:Environment@100] - Client environment:java.vendor=Oracle Corporation
2021-11-10 09:16:14,245 - INFO  [main:Environment@100] - Client environment:java.home=/usr/java/jdk1.8.0_151/jre
2021-11-10 09:16:14,245 - INFO  [main:Environment@100] - Client environment:java.class.path=/usr/hdp/3.1.5.0-152//zookeeper/bin/../build/classes:/usr/hdp/3.1.5.0-152//zookeeper/bin/../build/lib/*.jar:/usr/hdp/3.1.5.0-152//zookeeper/bin/../lib/slf4j-log4j12-1.6.1.jar:/usr/hdp/3.1.5.0-152//zookeeper/bin/../lib/slf4j-api-1.6.1.jar:/usr/hdp/3.1.5.0-152//zookeeper/bin/../lib/netty-3.10.5.Final.jar:/usr/hdp/3.1.5.0-152//zookeeper/bin/../lib/log4j-1.2.16.jar:/usr/hdp/3.1.5.0-152//zookeeper/bin/../lib/jline-0.9.94.jar:/usr/hdp/3.1.5.0-152//zookeeper/bin/../zookeeper-3.4.6.3.1.5.0-152.jar:/usr/hdp/3.1.5.0-152//zookeeper/bin/../src/java/lib/*.jar:/usr/hdp/3.1.5.0-152//zookeeper/conf::/usr/hdp/3.1.5.0-152//zookeeper/conf:/usr/hdp/3.1.5.0-152//zookeeper/zookeeper-3.4.6.3.1.5.0-152.jar:/usr/hdp/3.1.5.0-152//zookeeper/zookeeper.jar:/usr/hdp/3.1.5.0-152//zookeeper/lib/jline-0.9.94.jar:/usr/hdp/3.1.5.0-152//zookeeper/lib/log4j-1.2.16.jar:/usr/hdp/3.1.5.0-152//zookeeper/lib/netty-3.10.5.Final.jar:/usr/hdp/3.1.5.0-152//zookeeper/lib/slf4j-api-1.6.1.jar:/usr/hdp/3.1.5.0-152//zookeeper/lib/slf4j-log4j12-1.6.1.jar:/usr/share/zookeeper/*
2021-11-10 09:16:14,245 - INFO  [main:Environment@100] - Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
2021-11-10 09:16:14,245 - INFO  [main:Environment@100] - Client environment:java.io.tmpdir=/tmp
2021-11-10 09:16:14,245 - INFO  [main:Environment@100] - Client environment:java.compiler=<NA>
2021-11-10 09:16:14,245 - INFO  [main:Environment@100] - Client environment:os.name=Linux
2021-11-10 09:16:14,245 - INFO  [main:Environment@100] - Client environment:os.arch=amd64
2021-11-10 09:16:14,245 - INFO  [main:Environment@100] - Client environment:os.version=3.10.0-1160.42.2.el7.x86_64
2021-11-10 09:16:14,245 - INFO  [main:Environment@100] - Client environment:user.name=root
2021-11-10 09:16:14,246 - INFO  [main:Environment@100] - Client environment:user.home=/root
2021-11-10 09:16:14,246 - INFO  [main:Environment@100] - Client environment:user.dir=/root
2021-11-10 09:16:14,246 - INFO  [main:ZooKeeper@438] - Initiating client connection, connectString=localhost:2181 sessionTimeout=30000 watcher=org.apache.zookeeper.ZooKeeperMain$MyWatcher@5c29bfd
Welcome to ZooKeeper!
JLine support is enabled
2021-11-10 09:16:14,266 - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@1013] - Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
2021-11-10 09:16:14,309 - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@856] - Socket connection established, initiating session, client: /127.0.0.1:46108, server: localhost/127.0.0.1:2181
2021-11-10 09:16:14,317 - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@1273] - Session establishment complete on server localhost/127.0.0.1:2181, sessionid = 0x17d0699f507000d, negotiated timeout = 30000

WATCHER::

WatchedEvent state:SyncConnected type:None path:null
[zk: localhost:2181(CONNECTED) 0] ls /
[logsearch, registry, hiveserver2, storm, hiveserver2-leader, zookeeper, infra-solr, hbase-unsecure, rmstore, atsv2-hbase-unsecure, ambari-metrics-cluster]
[zk: localhost:2181(CONNECTED) 1] ls /hbase-unsecure
[meta-region-server, rs, splitWAL, backup-masters, table-lock, flush-table-proc, master-maintenance, online-snapshot, switch, running, draining, namespace, hbaseid, table]
[zk: localhost:2181(CONNECTED) 2] ls /atsv2-hbase-unsecure
[meta-region-server, rs, splitWAL, backup-masters, table-lock, flush-table-proc, master-maintenance, online-snapshot, switch, running, draining, namespace, hbaseid, table]
[zk: localhost:2181(CONNECTED) 3] rm -r /hbase-unsecure/meta-region-server
ZooKeeper -server host:port cmd args
        stat path [watch]
        set path data [version]
        ls path [watch]
        delquota [-n|-b] path
        ls2 path [watch]
        setAcl path acl
        setquota -n|-b val path
        history
        redo cmdno
        printwatches on|off
        delete path [version]
        sync path
        listquota path
        rmr path
        get path [watch]
        create [-s] [-e] path data acl
        addauth scheme auth
        quit
        getAcl path
        close
        connect host:port
[zk: localhost:2181(CONNECTED) 4] rmr /hbase-unsecure/meta-region-server
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Bernard5

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值