apachephoenix-如何在kerberos集群上启动查询服务器和瘦客户机

tzcvj98z  于 2021-06-02  发布在  Hadoop
关注(0)|答案(0)|浏览(309)

我最近花了几天时间试图通过zookeeper运行phoenix thin(queryserver.py和sqlline thin.py)和thick来保护集群。但是,我无法在secure cluster上启动或连接phoenix服务。
在phoenix瘦客户机和厚客户机上面临以下问题

17/09/27 08:41:47 WARN util.NativeCodeLoader: Unable to load native-hadoop libra
ry for your platform... using builtin-java classes where applicable
Error: java.lang.RuntimeException: java.lang.NullPointerException (state=,code=0
)
java.sql.SQLException: java.lang.RuntimeException: java.lang.NullPointerExceptio
n
        at org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(Connecti
onQueryServicesImpl.java:2465)
        at org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(Connecti
onQueryServicesImpl.java:2382)
        at org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExe
cutor.java:76)
        at org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQ
ueryServicesImpl.java:2382)
        at org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(Phoe
nixDriver.java:255)
        at org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.createConnection(Phoeni
xEmbeddedDriver.java:149)
        at org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:221)

        at sqlline.DatabaseConnection.connect(DatabaseConnection.java:157)
        at sqlline.DatabaseConnection.getConnection(DatabaseConnection.java:203)

        at sqlline.Commands.connect(Commands.java:1064)
        at sqlline.Commands.connect(Commands.java:996)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at sqlline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.jav
a:38)
        at sqlline.SqlLine.dispatch(SqlLine.java:809)
        at sqlline.SqlLine.initArgs(SqlLine.java:588)
        at sqlline.SqlLine.begin(SqlLine.java:661)
        at sqlline.SqlLine.start(SqlLine.java:398)
        at sqlline.SqlLine.main(SqlLine.java:291)
Caused by: java.lang.RuntimeException: java.lang.NullPointerException
        at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithoutRetries(R
pcRetryingCaller.java:218)
        at org.apache.hadoop.hbase.client.ClientScanner.call(ClientScanner.java:
326)
        at org.apache.hadoop.hbase.client.ClientScanner.nextScanner(ClientScanne
r.java:301)
        at org.apache.hadoop.hbase.client.ClientScanner.initializeScannerInConst
ruction(ClientScanner.java:166)
        at org.apache.hadoop.hbase.client.ClientScanner.<init>(ClientScanner.jav
a:161)
        at org.apache.hadoop.hbase.client.HTable.getScanner(HTable.java:797)
        at org.apache.hadoop.hbase.MetaTableAccessor.fullScan(MetaTableAccessor.
java:602)
        at org.apache.hadoop.hbase.MetaTableAccessor.tableExists(MetaTableAccess
or.java:366)
        at org.apache.hadoop.hbase.client.HBaseAdmin.tableExists(HBaseAdmin.java
:406)
        at org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(Connecti
onQueryServicesImpl.java:2410)
        ... 20 more
Caused by: java.lang.NullPointerException
        at org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.getMetaReplicaNode
s(ZooKeeperWatcher.java:489)
        at org.apache.hadoop.hbase.zookeeper.MetaTableLocator.blockUntilAvailabl
e(MetaTableLocator.java:558)
        at org.apache.hadoop.hbase.client.ZooKeeperRegistry.getMetaRegionLocatio
n(ZooKeeperRegistry.java:61)
        at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplement
ation.locateMeta(ConnectionManager.java:1211)
        at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplement
ation.locateRegion(ConnectionManager.java:1178)
        at org.apache.hadoop.hbase.client.RpcRetryingCallerWithReadReplicas.getR
egionLocations(RpcRetryingCallerWithReadReplicas.java:305)
        at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(Scann
erCallableWithReplicas.java:156)
        at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(Scann
erCallableWithReplicas.java:60)
        at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithoutRetries(R
pcRetryingCaller.java:210)
        ... 29 more
sqlline version 1.2.0
0: jdbc:phoenix:Namenode1>

遵循以下步骤
已删除phoenix上的hbase-site.xml文件并设置hbase包环境。
在$hbase\u conf\u dir/hbase-site.xml文件中为phoenix查询服务器提供了kerberos主体和keytab。
phoenix.queryserver.kerberos.principal http/webuser@domain.com
phoenix.queryserver.kerberos.keytab
c:\keytab\webuser.keytab
执行瘦服务器和客户端
答。启动query server-/bin>python queryserver.ph,它已正确启动。
b。启动瘦客户端-/bin>python sqlline.py http://namenode1:8765;authentication=SPENGO;principal=HTTP/webuser@Domain.COM;keytab=C:\\KeyTab\\webuser.keytab 4.通过以下命令在厚客户端上执行

/bin> python sqlline.py Namenode1:2181:/hbase-secure:HTTP/webuser@Domain.COM:C:\\KeyTab\\webuser.keytab

让我知道,任何其他配置都需要一个apache phoenix和安全集群。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题