java通过phoenix的jdbc链接hbase数据库遇到如下情况:

查看日志发现phoenix维护的表system.function 的文件缺失了(在hdfs上),就是有节点掉了。

用命令

$HBASE_PATH/bin/hbase hbck

查看确实有blk丢失,就是应为node掉了。

hdfs.DFSClient: Could not obtain BP-886382026-192.168.1.20-1515141616941:blk_1074071596_330784 from any node: 
java.io.IOException: No live nodes contain current block No live nodes contain current block Block locations: Dead nodes: . Will get new block locations from namenode and retry...
在用 hdfs dfsadmin -report 
查看是哪个节点掉了,重新启动掉线的节点以及守护进程,之后在运行代码,完美通过!
 
以下是报错的堆栈信息:
 
19/01/08 11:13:49 INFO zookeeper.ClientCnxn: EventThread shut down
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (SYSTEM.FUNCTION)
at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
at com.rs.java.db.CreatConnect.getPhoeConnect(CreatConnect.java:45)
at com.rs.java.mapreduce.oneTuoN.largebandwidth.TheTest.main(TheTest.java:25)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.hadoop.util.RunJar.run(RunJar.java:239)
at org.apache.hadoop.util.RunJar.main(RunJar.java:153)
Caused by: org.apache.phoenix.exception.PhoenixIOException: SYSTEM.FUNCTION
at org.apache.phoenix.util.ServerUtil.parseServerException(ServerUtil.java:116)
at org.apache.phoenix.query.ConnectionQueryServicesImpl.ensureTableCreated(ConnectionQueryServicesImpl.java:1153)
at org.apache.phoenix.query.ConnectionQueryServicesImpl.createTable(ConnectionQueryServicesImpl.java:1434)
at org.apache.phoenix.schema.MetaDataClient.createTableInternal(MetaDataClient.java:2624)
at org.apache.phoenix.schema.MetaDataClient.createTable(MetaDataClient.java:1040)
at org.apache.phoenix.compile.CreateTableCompiler$2.execute(CreateTableCompiler.java:212)
at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:393)
at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:376)
at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:374)
at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:363)
at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1707)
at org.apache.phoenix.query.ConnectionQueryServicesImpl.createOtherSystemTables(ConnectionQueryServicesImpl.java:2555)
at org.apache.phoenix.query.ConnectionQueryServicesImpl.access$900(ConnectionQueryServicesImpl.java:264)
at org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:2466)
at org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:2389)
at org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:76)
at org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:2389)
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 org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
... 10 more
Caused by: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.hbase.TableExistsException): SYSTEM.FUNCTION
at org.apache.hadoop.hbase.master.procedure.CreateTableProcedure.prepareCreate(CreateTableProcedure.java:286)
at org.apache.hadoop.hbase.master.procedure.CreateTableProcedure.executeFromState(CreateTableProcedure.java:107)
at org.apache.hadoop.hbase.master.procedure.CreateTableProcedure.executeFromState(CreateTableProcedure.java:59)
at org.apache.hadoop.hbase.procedure2.StateMachineProcedure.execute(StateMachineProcedure.java:139)
at org.apache.hadoop.hbase.procedure2.Procedure.doExecute(Procedure.java:499)
at org.apache.hadoop.hbase.procedure2.ProcedureExecutor.execProcedure(ProcedureExecutor.java:1148)
at org.apache.hadoop.hbase.procedure2.ProcedureExecutor.execLoop(ProcedureExecutor.java:943)
at org.apache.hadoop.hbase.procedure2.ProcedureExecutor.execLoop(ProcedureExecutor.java:896)
at org.apache.hadoop.hbase.procedure2.ProcedureExecutor.access$400(ProcedureExecutor.java:78)
at org.apache.hadoop.hbase.procedure2.ProcedureExecutor$2.run(ProcedureExecutor.java:498)
Exception in thread "main" java.lang.NullPointerException
at com.rs.java.mapreduce.oneTuoN.largebandwidth.TheTest.main(TheTest.java:27)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.hadoop.util.RunJar.run(RunJar.java:239)
at org.apache.hadoop.util.RunJar.main(RunJar.java:153)

phoenix SQLNestedException: Cannot create PoolableConnectionFactory的更多相关文章

  1. org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password:

    tationProcessor' to allow for resolving potential circular referencesDEBUG 2018-05-28 11:32:35,016 o ...

  2. Could not open JDBC Connection for transaction; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Could not create connection to database server.

    报错信息:Could not open JDBC Connection for transaction; nested exception is org.apache.commons.dbcp.SQL ...

  3. org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Could

    org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exc ...

  4. org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Unknown database 'jdsc')

    org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Unknown databas ...

  5. mybatis connection error Cannot create PoolableConnectionFactory (Access denied for user 'root '@'local

    org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.Persiste ...

  6. jdbc连接oracle时报错 Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableC

    错误: Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; ...

  7. 程序连接oracle数据库问题Cannot create PoolableConnectionFactory ...

    报错: [ERROR] -- :: com.ipi.caee.InitServlet - 初始化数据加载异常 org.springframework.transaction.CannotCreateT ...

  8. Spring 整合Mybatis 出现了Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create Poola

    我出现的 报错信息如下: ### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionExc ...

  9. SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' 解决办法

    当跑jndi项目时抛出:org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' fo ...

随机推荐

  1. HOT SUMMER 每天都是不一样,积极的去感受生活 C#关闭IE相应的窗口 .

    window.close(); System.Diagnostics.Process[]   myProcesses;     myProcesses   =   System.Diagnostics ...

  2. SQL ----------- join (inner join 内连接)

    SQL JOIN 子句用于把来自两个或多个表的行结合起来,基于这些表之间的共同字段,把两个表中的数据放在一个表中查询 注意: join 连接有多种方式,比如内连接,外连接,交叉连接 可以和where ...

  3. mysql判断是否存在数据库和表,进行删除和创建

    1.存在莫数据库,则删除创建一个新库 drop database if exists `tpm_business`; CREATE DATABASE tpm_business DEFAULT CHAR ...

  4. DNS:从零搭建公司内网DNS服务器

    写在前面的话 网上关于 DNS 的文章其实一搜索一大把,但是看别人的文档一般都会有个问题,乱,不讲究,全是 ctrl c + ctrl v,我个人是看不下去的.头皮发麻.所以决定自己来写写这方面的东西 ...

  5. 【JVM】jstat命令详解---JVM的统计监测工具

    java进程的PID获取命令: https://www.cnblogs.com/sxdcgaq8080/p/10734752.html ================================ ...

  6. SQL Server merge用法

    有两个表名:source 表和 target 表,并且要根据 source 表中匹配的值更新 target 表. 有三种情况: source 表有一些 target 表不存在的行.在这种情况下,需要将 ...

  7. C#给企业微信中的成员发送消息

    先去企业微信门户网站获得密钥和应用ID 创建一个静态工具类 using Newtonsoft.Json; using Newtonsoft.Json.Linq; using System; using ...

  8. 从零开始一步一步搭建Ubuntu Server服务器、修改数据源、安装Docker、配置镜像加速器、Compose部署Gitlab服务

    场景 最终目的是使用Docker Compose部署一个Gitlab服务. 效果 注: 博客: https://blog.csdn.net/badao_liumang_qizhi关注公众号 霸道的程序 ...

  9. ADO.NET 根据实体类自动生成添加修改语句仅限Oracle使用

    话不多说直接上代码,新手上路,高手路过勿喷,请多多指教. /// <summary> /// 等于号 /// </summary> ) + Convert.ToChar() + ...

  10. android studio学习----Failed to resolve: com.android.support:design:22.1.1

    这个目前好像没有合适的办法,唯一可行的就是 点击那个提示  进行SDK Manager下载就可以了 但是天朝的网啊,我试了很多次,突然的可以下载,运气啊 类似这一系列问题解决办法就是  重新更新SDK ...