NiFi-无法使用JDBC Uri打开客户端传输

时间:2020-06-11 11:37:21

标签: jdbc hiveql apache-nifi

每当我尝试从NiFi连接到cloudera(5.16.2)hiveserver2时,都会得到以下错误,我启用了kerberos,同时也启用了SSL来进行hive服务,hive运行的Java版本在OpenJDK上并且NiFi运行在Oracle JDK 1.8.162,我在NiFi处理器中提到的jdbc uri是“ jdbc:hive2://主机名:10000 /; ssl = true; sslTrustStore = / data / nifi-1.10.0 / tls / truststore.jks; Principal=hive/hostname@AA.BBCC.NET

2020-06-11 10:03:34,853 INFO [NiFi Web Server-709] o.a.n.controller.StandardProcessorNode Starting PutHiveQL[id=734f0b34-d3fc-16bb-ffff-ffffeacb958f]
2020-06-11 10:03:34,853 INFO [Timer-Driven Process Thread-8] o.a.n.c.s.TimerDrivenSchedulingAgent Scheduled PutHiveQL[id=734f0b34-d3fc-16bb-ffff-ffffeacb958f] to run with 1 threads
2020-06-11 10:03:34,857 INFO [Timer-Driven Process Thread-7] org.apache.hive.jdbc.Utils Supplied authorities: hostname:10000
2020-06-11 10:03:34,857 INFO [Timer-Driven Process Thread-7] org.apache.hive.jdbc.Utils Resolved authority: hostname:10000
2020-06-11 10:03:34,860 INFO [Timer-Driven Process Thread-7] org.apache.hive.jdbc.HiveConnection Will try to open client transport with JDBC Uri: jdbc:hive2://hostname:10000/;ssl=true;sslTrustStore=/data/nifi-1.10.0/tls/truststore.jks;principal=hive/hostname@AA.BBCC.NET
2020-06-11 10:03:34,861 INFO [Timer-Driven Process Thread-7] org.apache.hive.jdbc.HiveConnection Could not open client transport with JDBC Uri: jdbc:hive2://hostname:10000/;ssl=true;sslTrustStore=/data/nifi-1.10.0/tls/truststore.jks;principal=hive/hostname@AA.BBCC.NET
2020-06-11 10:03:34,861 INFO [Timer-Driven Process Thread-7] org.apache.hive.jdbc.HiveConnection Transport Used for JDBC connection: null
2020-06-11 10:03:34,862 ERROR [Timer-Driven Process Thread-7] o.a.nifi.dbcp.hive.HiveConnectionPool HiveConnectionPool[id=734f0b3c-d3fc-16bb-ffff-fffffcb9ca34] Error getting Hive connection: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Could not open client transport with JDBC Uri: jdbc:hive2://hostname:10000/;ssl=true;sslTrustStore=/data/nifi-1.10.0/tls/truststore.jks;principal=hive/hostname@AA.BBCC.NET: Invalid status 21)
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Could not open client transport with JDBC Uri: jdbc:hive2://hostname:10000/;ssl=true;sslTrustStore=/data/nifi-1.10.0/tls/truststore.jks;principal=hive/hostname@AA.BBCC.NET: Invalid status 21)
        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 org.apache.nifi.dbcp.hive.HiveConnectionPool.lambda$getConnection$0(HiveConnectionPool.java:369)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:422)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1656)
        at org.apache.nifi.dbcp.hive.HiveConnectionPool.getConnection(HiveConnectionPool.java:369)
        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:87)
        at com.sun.proxy.$Proxy227.getConnection(Unknown Source)
        at org.apache.nifi.processors.hive.PutHiveQL.lambda$new$1(PutHiveQL.java:209)
        at org.apache.nifi.processor.util.pattern.Put.onTrigger(Put.java:97)
        at org.apache.nifi.processors.hive.PutHiveQL.lambda$onTrigger$6(PutHiveQL.java:295)
        at org.apache.nifi.processor.util.pattern.PartialFunctions.onTrigger(PartialFunctions.java:114)
        at org.apache.nifi.processor.util.pattern.RollbackOnFailure.onTrigger(RollbackOnFailure.java:184)
        at org.apache.nifi.processors.hive.PutHiveQL.onTrigger(PutHiveQL.java:295)
        at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1176)
        at org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:213)
        at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:117)
        at org.apache.nifi.engine.FlowEngine$2.run(FlowEngine.java:110)
        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: Could not open client transport with JDBC Uri: jdbc:hive2://hostname:10000/;ssl=true;sslTrustStore=/data/nifi-1.10.0/tls/truststore.jks;principal=hive/hostname@AA.BBCC.NET: Invalid status 21
        at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:231)
        at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:176)
        at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105)
        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)
        ... 31 common frames omitted
Caused by: org.apache.thrift.transport.TTransportException: Invalid status 21
        at org.apache.thrift.transport.TSaslTransport.sendAndThrowMessage(TSaslTransport.java:232)
        at org.apache.thrift.transport.TSaslTransport.receiveSaslMessage(TSaslTransport.java:184)
        at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:277)
        at org.apache.thrift.transport.TSaslClientTransport.open(TSaslClientTransport.java:37)
        at org.apache.hadoop.hive.thrift.client.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:52)
        at org.apache.hadoop.hive.thrift.client.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:49)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:422)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1656)
        at org.apache.hadoop.hive.thrift.client.TUGIAssumingTransport.open(TUGIAssumingTransport.java:49)
        at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:204)
        ... 37 common frames omitted
2020-06-11 10:03:34,862 ERROR [Timer-Driven Process Thread-7] o.apache.nifi.processors.hive.PutHiveQL PutHiveQL[id=734f0b34-d3fc-16bb-ffff-ffffeacb958f] org.apache.nifi.processors.hive.PutHiveQL$$Lambda$960/419761608@2c9b9d46 failed to process due to org.apache.nifi.processor.exception.ProcessException: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Could not open client transport with JDBC Uri: jdbc:hive2://hostname:10000/;ssl=true;sslTrustStore=/data/nifi-1.10.0/tls/truststore.jks;principal=hive/hostname@AA.BBCC.NET: Invalid status 21); rolling back session: org.apache.nifi.processor.exception.ProcessException: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Could not open client transport with JDBC Uri: jdbc:hive2://hostname:10000/;ssl=true;sslTrustStore=/data/nifi-1.10.0/tls/truststore.jks;principal=hive/hostname@AA.BBCC.NET: Invalid status 21)
org.apache.nifi.processor.exception.ProcessException: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Could not open client transport with JDBC Uri: jdbc:hive2://hostname:10000/;ssl=true;sslTrustStore=/data/nifi-1.10.0/tls/truststore.jks;principal=hive/hostname@AA.BBCC.NET: Invalid status 21)
        at org.apache.nifi.dbcp.hive.HiveConnectionPool.getConnection(HiveConnectionPool.java:384)
        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:87)
        at com.sun.proxy.$Proxy227.getConnection(Unknown Source)
        at org.apache.nifi.processors.hive.PutHiveQL.lambda$new$1(PutHiveQL.java:209)
        at org.apache.nifi.processor.util.pattern.Put.onTrigger(Put.java:97)
        at org.apache.nifi.processors.hive.PutHiveQL.lambda$onTrigger$6(PutHiveQL.java:295)
        at org.apache.nifi.processor.util.pattern.PartialFunctions.onTrigger(PartialFunctions.java:114)
        at org.apache.nifi.processor.util.pattern.RollbackOnFailure.onTrigger(RollbackOnFailure.java:184)
        at org.apache.nifi.processors.hive.PutHiveQL.onTrigger(PutHiveQL.java:295)
        at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1176)
        at org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:213)
        at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:117)
        at org.apache.nifi.engine.FlowEngine$2.run(FlowEngine.java:110)
        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: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Could not open client transport with JDBC Uri: jdbc:hive2://hostname:10000/;ssl=true;sslTrustStore=/data/nifi-1.10.0/tls/truststore.jks;principal=hive/hostname@AA.BBCC.NET: Invalid status 21)
        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 org.apache.nifi.dbcp.hive.HiveConnectionPool.lambda$getConnection$0(HiveConnectionPool.java:369)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:422)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1656)
        at org.apache.nifi.dbcp.hive.HiveConnectionPool.getConnection(HiveConnectionPool.java:369)
        ... 24 common frames omitted
Caused by: java.sql.SQLException: Could not open client transport with JDBC Uri: jdbc:hive2://hostname:10000/;ssl=true;sslTrustStore=/data/nifi-1.10.0/tls/truststore.jks;principal=hive/hostname@AA.BBCC.NET: Invalid status 21
        at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:231)
        at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:176)
        at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105)
        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)
        ... 31 common frames omitted

0 个答案:

没有答案