Skip to main content
aarif
Silver ⭐️⭐️⭐️
April 1, 2022
Question

Problem connecting DbVisualiser 12.1.3 to kerberised hive (hdp 3.1.5)

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-Hive-with/ta-p/278424

 

any suggestions pls?

9 replies

rpathak
Gold ⭐️
Gold ⭐️
April 5, 2022

Did you try the hint mentioned in ERROR?

Try : <hiveserevr2 host>:10000/;

Spoiler
Are you missing a '/' after the hostname

 

Translate
aarif
aarifAuthor
Silver ⭐️⭐️⭐️
April 7, 2022

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?

Translate
aarif
aarifAuthor
Silver ⭐️⭐️⭐️
April 19, 2022

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.

Translate
DianaTorres
Community Manager
Community Manager
April 18, 2022

@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!

Translate
Regards, Diana Torres, Senior Community Moderator
aarif
aarifAuthor
Silver ⭐️⭐️⭐️
April 19, 2022

hello @DianaTorres 

sure , i will mark, still looking for solution.

Translate