Support Questions

Find answers, ask questions, and share your expertise

Hive Database Connection Pooling Service

avatar

Hive Database Connection Pooling Service -- it says cannot create ppolable connection factory. I tried below command in the Database connection url. jdbc:hive2://myserver:8443/; Is there way to get the exact jdbc Database connection url

6 REPLIES 6

avatar
Master Mentor

@Sateesh Mandumula

Did you try the "HiveServer2 JDBC URL" mentioned in the Hive Service section in the Ambari UI?

16483-hive-connection-url.png

.

By clicking on the copy to clipboard button at the end of the URL you can get the connection url.

.

- If that does not work then can you please let us know if by any chance you have enabled SSL (i se port 8443)

- Also are you using kerberized setup?

- How are you trying to connect to HiveServer2 (using Shell, Java code ...etc), Can you please share the complete stackTrace of the Error that you are getting?

.

avatar

Hi Jay

I dont have access to ambari.

I tried both hive and hive2 comamnds but none of the are working.

I am trying to connect hiveserver2 using NIFI tool

hive2.jpgnifi.jpghive.jpg

avatar
Master Mentor

@Sateesh Mandumula

Looks like the Hive Server JDBC URL is not being set correctly.

Can you please refer to the following article to determine the URL: https://community.hortonworks.com/articles/4103/hiveserver2-jdbc-connection-url-examples.html

.

avatar

Hi Jay

I went through the link but now sure which method is enabled.

here is the snapshot of the hive-site.xml.

<property> <name>hive.server2.allow.user.substitution</name> <value>true</value> </property> <property> <name>hive.server2.authentication</name> <value>NONE</value> </property> <property> <name>hive.server2.authentication.spnego.keytab</name> <value>HTTP/_HOST@EXAMPLE.COM</value> </property> <property> <name>hive.server2.authentication.spnego.principal</name> <value>/etc/security/keytabs/spnego.service.keytab</value> </property> <property> <name>hive.server2.enable.doAs</name> <value>false</value> </property> <property> <name>hive.server2.logging.operation.enabled</name> <value>true</value> </property> <property> <name>hive.server2.logging.operation.log.location</name> <value>/tmp/hive/operation_logs</value> </property> <property> <name>hive.server2.max.start.attempts</name> <value>5</value> </property> <property> <name>hive.server2.support.dynamic.service.discovery</name> <value>true</value> </property> <property> <name>hive.server2.table.type.mapping</name> <value>CLASSIC</value> </property> <property> <name>hive.server2.tez.default.queues</name> <value>default</value> </property> <property> <name>hive.server2.tez.initialize.default.sessions</name> <value>false</value> </property> <property> <name>hive.server2.tez.sessions.per.default.queue</name> <value>1</value> </property> <property> <name>hive.server2.thrift.http.path</name> <value>cliservice</value> </property> <property> <name>hive.server2.thrift.http.port</name> <value>10001</value> </property> <property> <name>hive.server2.thrift.max.worker.threads</name> <value>500</value> </property> <property> <name>hive.server2.thrift.port</name> <value>10000</value> </property> <property> <name>hive.server2.thrift.sasl.qop</name> <value>auth</value> </property> <property> <name>hive.server2.transport.mode</name> <value>binary</value> </property> <property> <name>hive.server2.use.SSL</name> <value>false</value> </property> <property> <name>hive.server2.zookeeper.namespace</name> <value>hiveserver2</value> </property>

avatar
Master Mentor

@Sateesh Mandumula

We see that you are using Kerberized Hive.

So you should be defining the Principal in the HiveServer2 connection URL, Something like:

jdbc:hive2://<hostname>:10000/<hive_db>;principal=hive/_HOST@EXAMPLE.COM

.

avatar

Hi jay

I tried above command but it is throwing me below error

jdbc:hive2://xxxx.com:10000/default;principal=hive/_HOST@EXAMPLE.COM

nifi-kerb.jpg

<property> <name>hive.metastore.kerberos.keytab.file</name> <value>/etc/security/keytabs/hive.service.keytab</value> </property> <property> <name>hive.metastore.kerberos.principal</name> <value>hive/_HOST@EXAMPLE.COM</value> </property>