Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

getting error in hive view in ambari

getting error in hive view in ambari

Rising Star

Getting below error Message: Cannot open a hive connection with connect string jdbc:hive2://vbindevhadoopdata1.axisb.com:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2;hive.server2.proxy.user=admin

please let me know what is to be checked?

3 REPLIES 3

Re: getting error in hive view in ambari

Expert Contributor
@Rishit shah

Can you please check Ambari logs for any errors and also test connectivity via Beeline.

Re: getting error in hive view in ambari

Rising Star

found this in hive-view logs

07 Jun 2017 10:30:09,493 INFO [pool-3-thread-1] [ ] DDLProxy:81 - Creating DDLProxy 07 Jun 2017 14:53:59,315 INFO [main] [ ] DDLProxy:81 - Creating DDLProxy 07 Jun 2017 14:54:51,179 INFO [main] [ ] DDLProxy:81 - Creating DDLProxy 07 Jun 2017 17:00:59,686 INFO [main] [ ] DDLProxy:81 - Creating DDLProxy 08 Jun 2017 13:54:36,977 ERROR [ambari-client-thread-5324] [HIVE 2.0.0 AUTO_HIVE20_INSTANCE] ServiceFormattedException:97 - Cannot open a hive connec tion with connect string jdbc:hive2://vbindevhadoopdata1.axisb.com:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2;hive.server2.p roxy.user=admin 08 Jun 2017 13:54:36,978 ERROR [ambari-client-thread-5324] [HIVE 2.0.0 AUTO_HIVE20_INSTANCE] ServiceFormattedException:98 - org.apache.ambari.view.hi ve20.internal.ConnectionException: Cannot open a hive connection with connect string jdbc:hive2://vbindevhadoopdata1.axisb.com:2181/;serviceDiscovery Mode=zooKeeper;zooKeeperNamespace=hiveserver2;hive.server2.proxy.user=admin org.apache.ambari.view.hive20.internal.ConnectionException: Cannot open a hive connection with connect string jdbc:hive2://vbindevhadoopdata1.axisb.c om:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2;hive.server2.proxy.user=admin at org.apache.ambari.view.hive20.internal.HiveConnectionWrapper.connect(HiveConnectionWrapper.java:89) at org.apache.ambari.view.hive20.resources.browser.ConnectionService.attemptHiveConnection(ConnectionService.java:109) at org.apache.ambari.view.hive20.resources.browser.ConnectionService.attemptConnection(ConnectionService.java:92) 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:497) at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMetho dDispatchProvider.java:205) at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419)

Caused by: java.sql.SQLException: Could not open client transport for any of the Server URI's in ZooKeeper: java.net.ConnectException: Connection ref used at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:219) at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:157) at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:107) at java.sql.DriverManager.getConnection(DriverManager.java:664) at java.sql.DriverManager.getConnection(DriverManager.java:247) at org.apache.ambari.view.hive20.internal.HiveConnectionWrapper$1.run(HiveConnectionWrapper.java:78) at org.apache.ambari.view.hive20.internal.HiveConnectionWrapper$1.run(HiveConnectionWrapper.java:75) 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:1866) at org.apache.ambari.view.hive20.internal.HiveConnectionWrapper.connect(HiveConnectionWrapper.java:75) ... 99 more Caused by: org.apache.thrift.transport.TTransportException: java.net.ConnectException: Connection refused at org.apache.thrift.transport.TSocket.open(TSocket.java:185) at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:248) at org.apache.thrift.transport.TSaslClientTransport.open(TSaslClientTransport.java:37) at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:195)

Re: getting error in hive view in ambari

Rising Star

Hi got this solved by adding below path in hiveserver2 JDBC URL

jdbc:hive2://<hostname>:10000/;transportMode=binary

In hive view, i was receiving error which was solved using below

using below link (check WebHDFS url path)

https://community.hortonworks.com/questions/80603/hdfs020-could-not-write-file-useradminhivejobshive...

thanks,

Rishit Shah

Don't have an account?
Coming from Hortonworks? Activate your account here