Support Questions

Find answers, ask questions, and share your expertise

Problem connecting DbVisualiser 12.1.3 to kerberised hive (hdp 3.1.5)

avatar
Explorer

Team,

 

facing issue connecting DbVisualiser to kerberised hive (hdp),

 

An error occurred while establishing the connection:

Long Message:
Bad URL format. Hostname not found in authority part of the url: <hiveserevr2 host>:10000;. Are you missing a '/' after the hostname ?

FYI: i followed this kb article,

https://community.cloudera.com/t5/Community-Articles/Support-Video-How-to-connect-DbVisualizer-to-Hi...

 

any suggestions pls?

9 REPLIES 9

avatar

Did you try the hint mentioned in ERROR?

Try : <hiveserevr2 host>:10000/;

Spoiler
Are you missing a '/' after the hostname

 

avatar
Explorer

Thanks rpathak for your reply,

now i'm trying to connect DBURL 

jdbc:hive2://<host1>:2181,<host2>:2181,<host3>:2181/default;principal=hive/<hivserver2>@example.com;serviceDiscoveryMode=zooKeeper;ssl=true;zooKeeperNamespace=hiveserver2

 

but getting this error:

An error occurred while establishing the connection:

Details:
   Type: java.lang.reflect.UndeclaredThrowableException

Stack Trace:
java.lang.ClassNotFoundException: org.apache.hadoop.util.PlatformName
   at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
   at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
   at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
[wrapped] java.lang.NoClassDefFoundError: org/apache/hadoop/util/PlatformName
   at org.apache.hadoop.security.UserGroupInformation.getOSLoginModuleName(UserGroupInformation.java:418)
   at org.apache.hadoop.security.UserGroupInformation.<clinit>(UserGroupInformation.java:463)
   at org.apache.hadoop.hive.metastore.security.HadoopThriftAuthBridge.createClientWithConf(HadoopThriftAuthBridge.java:95)
   at org.apache.hive.service.auth.KerberosSaslHelper.getKerberosTransport(KerberosSaslHelper.java:56)
   at org.apache.hive.jdbc.HiveConnection.createBinaryTransport(HiveConnection.java:697)
   at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:429)
   at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:312)
   at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:107)
   at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.base/java.lang.reflect.Method.invoke(Method.java:566)
   at com.onseven.dbvis.jdbc.b.e.b(Z:2153)
   at com.onseven.dbvis.jdbc.b.g$_b.call(Z:3572)
[wrapped] java.lang.Exception: java.lang.NoClassDefFoundError: org/apache/hadoop/util/PlatformName
   at com.onseven.dbvis.jdbc.b.g$_b.call(Z:1558)
   at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[wrapped] java.lang.reflect.UndeclaredThrowableException
   at com.sun.proxy.$Proxy6.connect(Unknown Source)
   at com.onseven.dbvis.db.n.k.wc(Z:1821)
   at com.onseven.dbvis.db.n.k.ac(Z:3119)
   at com.onseven.dbvis.db.n.m.ac(Z:3404)
   at com.onseven.dbvis.db.n.e.te(Z:1756)
   at com.onseven.dbvis.l.f.eb.le(Z:2748)
   at com.onseven.dbvis.l.f.n.c(Z:1374)
   at com.onseven.dbvis.l.f.n.doInBackground(Z:1521)
   at java.desktop/javax.swing.SwingWorker$1.call(SwingWorker.java:304)
   at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
   at java.desktop/javax.swing.SwingWorker.run(SwingWorker.java:343)
   at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
   at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
   at java.base/java.lang.Thread.run(Thread.java:829)

 

any suggestions please?

avatar

Hi Video KB you are following is more than 2 years old.

Try using Cloudera JDBC driver for hive.

You can download the latest driver and user guide from below links.

https://www.cloudera.com/downloads/connectors/hive/jdbc/2-6-17.html

https://docs.cloudera.com/documentation/other/connectors/hive-jdbc/2-6-17.html

 

avatar
Explorer

hello rpathak,

 

i tried using cloudera JDBC driver for hive, it throws below:

 

An error occurred while establishing the connection:

Details:
   Type: java.lang.reflect.UndeclaredThrowableException

Stack Trace:
java.lang.NoClassDefFoundError: Could not initialize class org.apache.hadoop.security.UserGroupInformation
   at org.apache.hadoop.hive.metastore.security.HadoopThriftAuthBridge.createClientWithConf(HadoopThriftAuthBridge.java:95)
   at org.apache.hive.service.auth.KerberosSaslHelper.getKerberosTransport(KerberosSaslHelper.java:56)
   at org.apache.hive.jdbc.HiveConnection.createBinaryTransport(HiveConnection.java:697)
   at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:429)
   at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:312)
   at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:107)
   at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.base/java.lang.reflect.Method.invoke(Method.java:566)
   at com.onseven.dbvis.jdbc.b.e.b(Z:2153)
   at com.onseven.dbvis.jdbc.b.g$_b.call(Z:3572)
[wrapped] java.lang.Exception: java.lang.NoClassDefFoundError: Could not initialize class org.apache.hadoop.security.UserGroupInformation
   at com.onseven.dbvis.jdbc.b.g$_b.call(Z:1558)
   at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[wrapped] java.lang.reflect.UndeclaredThrowableException
   at com.sun.proxy.$Proxy6.connect(Unknown Source)
   at com.onseven.dbvis.db.n.k.wc(Z:1821)
   at com.onseven.dbvis.db.n.k.ac(Z:3119)
   at com.onseven.dbvis.db.n.m.ac(Z:3404)
   at com.onseven.dbvis.db.n.e.te(Z:1756)
   at com.onseven.dbvis.l.f.eb.le(Z:2748)
   at com.onseven.dbvis.l.f.n.c(Z:1374)
   at com.onseven.dbvis.l.f.n.doInBackground(Z:1521)
   at java.desktop/javax.swing.SwingWorker$1.call(SwingWorker.java:304)
   at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
   at java.desktop/javax.swing.SwingWorker.run(SwingWorker.java:343)
   at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
   at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
   at java.base/java.lang.Thread.run(Thread.java:829)

 

Thanks for your reply.

avatar

This error does not looks to be coming from Cloudera JDBC driver.

This error is loading org.apache.hive.jdbc.

Cloudera's driver name start with com.cloudera*

avatar
Explorer

@rpathak you are right, i configured driver and tried again:

 

An error occurred while establishing the connection:
The selected Driver cannot handle the specified Database URL.
The most common reason for this error is that the database URL
contains a syntax error preventing the driver from accepting it.
The error also occurs when trying to connect to a database
with the wrong driver. Correct this and try again.

avatar
Explorer

FYI @rpathak 

i'm using DbViZ 12.1.3 And hdp 3.1.5

avatar
Community Manager

@aarif  Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future. Thanks!


Regards,

Diana Torres,
Community Moderator


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community:

avatar
Explorer

hello @DianaTorres 

sure , i will mark, still looking for solution.