无法将Apache Drill / Dremio与Nifi 1.8.0连接

时间:2019-02-12 09:24:37

标签: apache-nifi

我无法使用nifi-1.8.0与apache drill连接,但可以与nifi-1.7.1连接。

我正在使用ExecuteSql处理器使用jdbc连接字符串与apache钻连接。 对于nifi-1.8.0,poolableExcecption即将到来。

 Unable to execute SQL select query SELECT * from test.wellRecords due to org.apache.nifi.processor.exception.ProcessException: java.sql.SQLException: Cannot create PoolableConnectionFactory (null). No FlowFile to route to failure: org.apache.nifi.processor.exception.ProcessException: java.sql.SQLException: Cannot create PoolableConnectionFactory (null)
org.apache.nifi.processor.exception.ProcessException: java.sql.SQLException: Cannot create PoolableConnectionFactory (null)
    at org.apache.nifi.dbcp.DBCPConnectionPool.getConnection(DBCPConnectionPool.java:308)
    at org.apache.nifi.dbcp.DBCPService.getConnection(DBCPService.java:49)
    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.nifi.controller.service.StandardControllerServiceInvocationHandler.invoke(StandardControllerServiceInvocationHandler.java:84)
    at com.sun.proxy.$Proxy95.getConnection(Unknown Source)
    at org.apache.nifi.processors.standard.AbstractExecuteSQL.onTrigger(AbstractExecuteSQL.java:195)
    at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
    at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1165)
    at org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:203)
    at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:117)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.sql.SQLException: Cannot create PoolableConnectionFactory (null)
    at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2385)
    at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:2110)
    at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1563)
    at org.apache.nifi.dbcp.DBCPConnectionPool.getConnection(DBCPConnectionPool.java:305)
    ... 19 common frames omitted
Caused by: java.sql.SQLFeatureNotSupportedException: null
    at oadd.org.apache.calcite.avatica.Helper.unsupported(Helper.java:53)
    at oadd.org.apache.calcite.avatica.AvaticaConnection.isValid(AvaticaConnection.java:325)
    at org.apache.drill.jdbc.impl.DrillConnectionImpl.isValid(DrillConnectionImpl.java:657)
    at org.apache.commons.dbcp2.DelegatingConnection.isValid(DelegatingConnection.java:874)
    at org.apache.commons.dbcp2.PoolableConnection.validate(PoolableConnection.java:270)
    at org.apache.commons.dbcp2.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:389)
    at org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:2398)
    at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2381)
    ... 22 common frames omitted

我想连接nifi-1.8.0处理器,因为所有nifi配置都使用当前的nifi版本编写。

1 个答案:

答案 0 :(得分:0)

我无法对此问题发表评论,因此,这里有一些想法有望对您有所帮助。

  • 您是否使用与nifi-1.7中相同的jdbc驱动程序?
  • Nifi放弃了commons-dbcp-1.4,转而使用1.8版中的commons-dbcp2-2.5。 Link to pom.xml

从读取堆栈跟踪信息来看,验证与数据库服务器的连接存在问题。 Maybe others have similar issues?您是否要设置验证查询?