phoenix启动报错:org.apache.phoenix.exception.PhoenixIOException: SYSTEM.CATALOG

↘锁芯ラ 提交于 2020-01-07 00:23:07

错误:

org.apache.phoenix.exception.PhoenixIOException: SYSTEM.CATALOG
 at org.apache.phoenix.util.ServerUtil.parseServerException(ServerUtil.java:144)
 at org.apache.phoenix.query.ConnectionQueryServicesImpl.metaDataCoprocessorExec(ConnectionQueryServicesImpl.java:1379)
 at org.apache.phoenix.query.ConnectionQueryServicesImpl.metaDataCoprocessorExec(ConnectionQueryServicesImpl.java:1343)
 at org.apache.phoenix.query.ConnectionQueryServicesImpl.getTable(ConnectionQueryServicesImpl.java:1560)
 at org.apache.phoenix.schema.MetaDataClient.updateCache(MetaDataClient.java:643)
 at org.apache.phoenix.schema.MetaDataClient.updateCache(MetaDataClient.java:538)
 at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:428)
 at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:391)
 at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
 at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:389)
 at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:378)
 at org.apache.phoenix.jdbc.PhoenixStatement.executeUpdate(PhoenixStatement.java:1806)
 at org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:2528)
 at org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:2491)
 at org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:76)
 at org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:2491)
 at org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:255)
 at org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.createConnection(PhoenixEmbeddedDriver.java:150)
 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.close(Commands.java:906)
 at sqlline.Commands.closeall(Commands.java:880)
 at sqlline.SqlLine.begin(SqlLine.java:714)
 at sqlline.SqlLine.start(SqlLine.java:398)
 at sqlline.SqlLine.main(SqlLine.java:291)
Caused by: org.apache.hadoop.hbase.TableNotFoundException: SYSTEM.CATALOG
 at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.locateRegionInMeta(ConnectionManager.java:1417)
 at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.locateRegion(ConnectionManager.java:1211)
 at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.locateRegion(ConnectionManager.java:1191)
 at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.locateRegion(ConnectionManager.java:1148)
 at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.getRegionLocation(ConnectionManager.java:983)
 at org.apache.hadoop.hbase.client.HRegionLocator.getRegionLocation(HRegionLocator.java:83)
 at org.apache.hadoop.hbase.client.HTable.getRegionLocation(HTable.java:571)
 at org.apache.hadoop.hbase.client.HTable.getKeysAndRegionsInRange(HTable.java:787)
 at org.apache.hadoop.hbase.client.HTable.getKeysAndRegionsInRange(HTable.java:757)
 at org.apache.hadoop.hbase.client.HTable.getStartKeysInRange(HTable.java:1835)
 at org.apache.hadoop.hbase.client.HTable.coprocessorService(HTable.java:1790)
 at org.apache.hadoop.hbase.client.HTable.coprocessorService(HTable.java:1770)
 at org.apache.phoenix.query.ConnectionQueryServicesImpl.metaDataCoprocessorExec(ConnectionQueryServicesImpl.java:1362)
 ... 24 more

解决办法:

去zk里面删除SYSTEM.CATALOG表

bin/hbase zkcli 进入zk界面

再次报错:

ERROR] Terminal initialization failed; falling back to unsupported
java.lang.IncompatibleClassChangeError: Found class jline.Terminal, but interface was expected
 at jline.TerminalFactory.create(TerminalFactory.java:101)
 at jline.TerminalFactory.get(TerminalFactory.java:159)
 at jline.console.ConsoleReader.<init>(ConsoleReader.java:227)
 at jline.console.ConsoleReader.<init>(ConsoleReader.java:219)
 at jline.console.ConsoleReader.<init>(ConsoleReader.java:207)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
 at org.apache.zookeeper.ZooKeeperMain.run(ZooKeeperMain.java:311)
 at org.apache.zookeeper.ZooKeeperMain.main(ZooKeeperMain.java:282)
 at org.apache.hadoop.hbase.zookeeper.ZooKeeperMainServer.main(ZooKeeperMainServer.java:108)

JLine support is disabled

找到hbase conf下的hbase文件315行下添加红色的classpath:

elif [ "$COMMAND" = "zkcli" ] ; then
class="org.apache.hadoop.hbase.zookeeper.ZooKeeperMainServer"
CLASSPATH=`echo $CLASSPATH | sed 's/jruby-cloudera-1\.0\.0\.jar//g'`

之后重启hbase伪分布环境,之后再次进入zk的客户端不报错了,正常进入:

重新进入 zk界面

找到了这些表

rmr /hbase/table/SYSTEM.CATALOG

  rmr /hbase/table/SYSTEM.SEQUENCE

  rmr /hbase/table/SYSTEM.STATS

  rmr /hbase/table/SYSTEM.FUNCTION

  方法3:/bin/hbase clean --cleanAll

   在执行上述命令之前:先关闭hbase(包括HMaster和regionServer)

3.重新启动hbase

4.通过 ./sqlline.py 进入phoenix,系统会自动创建Phoenix的系统表

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!