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.

Unable to login to Hive shell.Taking more time and still cannot access.

Unable to login to Hive shell.Taking more time and still cannot access.

New Contributor

Logging initialized using configuration in file:/etc/hive/conf.dist/hive-log4j.properties...........

 

 

When entering into beeline............Displays No current connection

6 REPLIES 6

Re: Unable to login to Hive shell.Taking more time and still cannot access.

Master Collaborator
Can you check if the Hive Server 2 service is running?

{code}
sudo service hive-server2 status
{code}

If it's not, restart it:

{code}
sudo service hive-server2 restart
{code}

And check the logs in /var/log/hive for any errors if you continue to have
issues.

Re: Unable to login to Hive shell.Taking more time and still cannot access.

New Contributor
I checked the hive server2 status. It is running....but still there is no change
Highlighted

Re: Unable to login to Hive shell.Taking more time and still cannot access.

New Contributor

Any other methood.....Did not work even if Hive server2 is restarted

Re: Unable to login to Hive shell.Taking more time and still cannot access.

Master Collaborator

Would really need more information here on the exact output and behavior you're seeing. As I mentioned, the logs in /var/log/hive may turn up something. You could possibly use the original Hive shell, which is invoked with just the "hive" command - however Cloudera Navigator will not work with that (which may not matter to you - Navigator is not running by default, so unless you've gone out of your way to enable it it wouldn't work anyway and wouldn't show up in the tutorial). Beeline also has a --verbose=true option you could try specifying to get more detailed logs in your terminal.

Re: Unable to login to Hive shell.Taking more time and still cannot access.

New Contributor

Hive shell is taking too long time to open....

 

Beeline says .No current Connection.....

 

Started hive server2 and metastore.......Still no use...........

 

Attached hive-server2.log file

2015-09-11 10:12:58,836 WARN  [main]: hive.metastore (HiveMetaStoreClient.java:open(438)) - set_ugi() not successful, Likely cause: new client talking to old server. Continuing without it.
org.apache.thrift.transport.TTransportException: java.net.SocketTimeoutException: Read timed out
	at org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:129)
	at org.apache.thrift.transport.TTransport.readAll(TTransport.java:86)
	at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:429)
	at org.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.java:318)
	at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:219)
	at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:69)
	at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.recv_set_ugi(ThriftHiveMetastore.java:3604)
	at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.set_ugi(ThriftHiveMetastore.java:3590)
	at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.open(HiveMetaStoreClient.java:430)
	at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:233)
	at org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient.<init>(SessionHiveMetaStoreClient.java:74)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
	at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1486)
	at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:64)
	at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:74)
	at org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:2881)
	at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:2900)
	at org.apache.hadoop.hive.ql.metadata.Hive.getAllDatabases(Hive.java:1229)
	at org.apache.hadoop.hive.ql.metadata.Hive.reloadFunctions(Hive.java:167)
	at org.apache.hadoop.hive.ql.metadata.Hive.<clinit>(Hive.java:159)
	at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:492)
	at org.apache.hive.service.cli.CLIService.applyAuthorizationConfigPolicy(CLIService.java:124)
	at org.apache.hive.service.cli.CLIService.init(CLIService.java:111)
	at org.apache.hive.service.CompositeService.init(CompositeService.java:59)
	at org.apache.hive.service.server.HiveServer2.init(HiveServer2.java:92)
	at org.apache.hive.service.server.HiveServer2.startHiveServer2(HiveServer2.java:309)
	at org.apache.hive.service.server.HiveServer2.access$400(HiveServer2.java:68)
	at org.apache.hive.service.server.HiveServer2$StartOptionExecutor.execute(HiveServer2.java:523)
	at org.apache.hive.service.server.HiveServer2.main(HiveServer2.java:396)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
	at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
Caused by: java.net.SocketTimeoutException: Read timed out
	at java.net.SocketInputStream.socketRead0(Native Method)
	at java.net.SocketInputStream.read(SocketInputStream.java:152)
	at java.net.SocketInputStream.read(SocketInputStream.java:122)
	at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
	at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
	at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
	at org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:127)
	... 37 more
2015-09-11 10:22:59,482 ERROR [main]: hive.log (MetaStoreUtils.java:logAndThrowMetaException(1176)) - Got exception: org.apache.thrift.transport.TTransportException java.net.SocketTimeoutException: Read timed out
org.apache.thrift.transport.TTransportException: java.net.SocketTimeoutException: Read timed out
	at org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:129)
	at org.apache.thrift.transport.TTransport.readAll(TTransport.java:86)
	at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:429)
	at org.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.java:318)
	at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:219)
	at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:69)
	at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.recv_get_all_databases(ThriftHiveMetastore.java:723)
	at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.get_all_databases(ThriftHiveMetastore.java:711)
	at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getAllDatabases(HiveMetaStoreClient.java:975)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.invoke(RetryingMetaStoreClient.java:91)
	at com.sun.proxy.$Proxy10.getAllDatabases(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.apache.hadoop.hive.metastore.HiveMetaStoreClient$SynchronizedHandler.invoke(HiveMetaStoreClient.java:1909)
	at com.sun.proxy.$Proxy10.getAllDatabases(Unknown Source)
	at org.apache.hadoop.hive.ql.metadata.Hive.getAllDatabases(Hive.java:1229)
	at org.apache.hadoop.hive.ql.metadata.Hive.reloadFunctions(Hive.java:167)
	at org.apache.hadoop.hive.ql.metadata.Hive.<clinit>(Hive.java:159)
	at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:492)
	at org.apache.hive.service.cli.CLIService.applyAuthorizationConfigPolicy(CLIService.java:124)
	at org.apache.hive.service.cli.CLIService.init(CLIService.java:111)
	at org.apache.hive.service.CompositeService.init(CompositeService.java:59)
	at org.apache.hive.service.server.HiveServer2.init(HiveServer2.java:92)
	at org.apache.hive.service.server.HiveServer2.startHiveServer2(HiveServer2.java:309)
	at org.apache.hive.service.server.HiveServer2.access$400(HiveServer2.java:68)
	at org.apache.hive.service.server.HiveServer2$StartOptionExecutor.execute(HiveServer2.java:523)
	at org.apache.hive.service.server.HiveServer2.main(HiveServer2.java:396)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
	at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
Caused by: java.net.SocketTimeoutException: Read timed out
	at java.net.SocketInputStream.socketRead0(Native Method)
	at java.net.SocketInputStream.read(SocketInputStream.java:152)
	at java.net.SocketInputStream.read(SocketInputStream.java:122)
	at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
	at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
	at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
	at org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:127)
	... 38 more
2015-09-11 10:22:59,490 ERROR [main]: hive.log (MetaStoreUtils.java:logAndThrowMetaException(1177)) - Converting exception to MetaException
2015-09-11 10:22:59,893 WARN  [main]: metadata.Hive (Hive.java:<clinit>(161)) - Failed to access metastore. This class should not accessed in runtime.
org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: org.apache.thrift.transport.TTransportException java.net.SocketTimeoutException: Read timed out)
	at org.apache.hadoop.hive.ql.metadata.Hive.getAllDatabases(Hive.java:1231)
	at org.apache.hadoop.hive.ql.metadata.Hive.reloadFunctions(Hive.java:167)
	at org.apache.hadoop.hive.ql.metadata.Hive.<clinit>(Hive.java:159)
	at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:492)
	at org.apache.hive.service.cli.CLIService.applyAuthorizationConfigPolicy(CLIService.java:124)
	at org.apache.hive.service.cli.CLIService.init(CLIService.java:111)
	at org.apache.hive.service.CompositeService.init(CompositeService.java:59)
	at org.apache.hive.service.server.HiveServer2.init(HiveServer2.java:92)
	at org.apache.hive.service.server.HiveServer2.startHiveServer2(HiveServer2.java:309)
	at org.apache.hive.service.server.HiveServer2.access$400(HiveServer2.java:68)
	at org.apache.hive.service.server.HiveServer2$StartOptionExecutor.execute(HiveServer2.java:523)
	at org.apache.hive.service.server.HiveServer2.main(HiveServer2.java:396)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
	at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
Caused by: MetaException(message:Got exception: org.apache.thrift.transport.TTransportException java.net.SocketTimeoutException: Read timed out)
	at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:1178)
	at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getAllDatabases(HiveMetaStoreClient.java:977)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.invoke(RetryingMetaStoreClient.java:91)
	at com.sun.proxy.$Proxy10.getAllDatabases(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.apache.hadoop.hive.metastore.HiveMetaStoreClient$SynchronizedHandler.invoke(HiveMetaStoreClient.java:1909)
	at com.sun.proxy.$Proxy10.getAllDatabases(Unknown Source)
	at org.apache.hadoop.hive.ql.metadata.Hive.getAllDatabases(Hive.java:1229)
	... 17 more
2015-09-11 10:23:01,366 INFO  [main]: session.SessionState (SessionState.java:createPath(625)) - Created local directory: /tmp/2c5ec8fc-9a54-4e6a-98cb-93f89f01c0a4_resources
2015-09-11 10:23:01,381 INFO  [main]: session.SessionState (SessionState.java:createPath(625)) - Created HDFS directory: /tmp/hive/hive/2c5ec8fc-9a54-4e6a-98cb-93f89f01c0a4
2015-09-11 10:23:01,401 INFO  [main]: session.SessionState (SessionState.java:createPath(625)) - Created local directory: /tmp/hive/2c5ec8fc-9a54-4e6a-98cb-93f89f01c0a4
2015-09-11 10:23:01,406 INFO  [main]: session.SessionState (SessionState.java:createPath(625)) - Created HDFS directory: /tmp/hive/hive/2c5ec8fc-9a54-4e6a-98cb-93f89f01c0a4/_tmp_space.db
2015-09-11 10:23:01,408 INFO  [main]: session.SessionState (SessionState.java:start(527)) - No Tez session required at this point. hive.execution.engine=mr.
2015-09-11 12:45:48,321 WARN  [HiveServer2-Handler-Pool: Thread-19]: security.UserGroupInformation (UserGroupInformation.java:getGroupNames(1535)) - No groups available for user username
2015-09-11 12:55:48,433 WARN  [HiveServer2-Handler-Pool: Thread-19]: hive.metastore (HiveMetaStoreClient.java:open(438)) - set_ugi() not successful, Likely cause: new client talking to old server. Continuing without it.
org.apache.thrift.transport.TTransportException: java.net.SocketTimeoutException: Read timed out
	at org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:129)
	at org.apache.thrift.transport.TTransport.readAll(TTransport.java:86)
	at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:429)
	at org.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.java:318)
	at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:219)
	at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:69)
	at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.recv_set_ugi(ThriftHiveMetastore.java:3604)
	at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.set_ugi(ThriftHiveMetastore.java:3590)
	at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.open(HiveMetaStoreClient.java:430)
	at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:233)
	at org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient.<init>(SessionHiveMetaStoreClient.java:74)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
	at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1486)
	at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:64)
	at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:74)
	at org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:2881)
	at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:2900)
	at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:492)
	at org.apache.hive.service.cli.session.HiveSessionImpl.open(HiveSessionImpl.java:138)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:78)
	at org.apache.hive.service.cli.session.HiveSessionProxy.access$000(HiveSessionProxy.java:36)
	at org.apache.hive.service.cli.session.HiveSessionProxy$1.run(HiveSessionProxy.java:63)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:415)
	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1671)
	at org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:59)
	at com.sun.proxy.$Proxy23.open(Unknown Source)
	at org.apache.hive.service.cli.session.SessionManager.openSession(SessionManager.java:258)
	at org.apache.hive.service.cli.CLIService.openSessionWithImpersonation(CLIService.java:186)
	at org.apache.hive.service.cli.thrift.ThriftCLIService.getSessionHandle(ThriftCLIService.java:405)
	at org.apache.hive.service.cli.thrift.ThriftCLIService.OpenSession(ThriftCLIService.java:299)
	at org.apache.hive.service.cli.thrift.TCLIService$Processor$OpenSession.getResult(TCLIService.java:1253)
	at org.apache.hive.service.cli.thrift.TCLIService$Processor$OpenSession.getResult(TCLIService.java:1238)
	at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
	at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
	at org.apache.hive.service.auth.TSetIpAddressProcessor.process(TSetIpAddressProcessor.java:56)
	at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:285)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.SocketTimeoutException: Read timed out
	at java.net.SocketInputStream.socketRead0(Native Method)
	at java.net.SocketInputStream.read(SocketInputStream.java:152)
	at java.net.SocketInputStream.read(SocketInputStream.java:122)
	at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
	at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
	at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
	at org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:127)
	... 46 more
2015-09-11 12:55:48,491 INFO  [HiveServer2-Handler-Pool: Thread-19]: session.SessionState (SessionState.java:createPath(625)) - Created HDFS directory: /tmp/hive/username
2015-09-11 12:55:48,493 INFO  [HiveServer2-Handler-Pool: Thread-19]: session.SessionState (SessionState.java:createPath(625)) - Created local directory: /tmp/c40a19c8-1ed8-4aff-bd6a-79253fda1781_resources
2015-09-11 12:55:48,502 INFO  [HiveServer2-Handler-Pool: Thread-19]: session.SessionState (SessionState.java:createPath(625)) - Created HDFS directory: /tmp/hive/username/c40a19c8-1ed8-4aff-bd6a-79253fda1781
2015-09-11 12:55:48,506 INFO  [HiveServer2-Handler-Pool: Thread-19]: session.SessionState (SessionState.java:createPath(625)) - Created local directory: /tmp/hive/c40a19c8-1ed8-4aff-bd6a-79253fda1781
2015-09-11 12:55:48,510 INFO  [HiveServer2-Handler-Pool: Thread-19]: session.SessionState (SessionState.java:createPath(625)) - Created HDFS directory: /tmp/hive/username/c40a19c8-1ed8-4aff-bd6a-79253fda1781/_tmp_space.db
2015-09-11 12:55:48,521 INFO  [HiveServer2-Handler-Pool: Thread-19]: session.SessionState (SessionState.java:start(527)) - No Tez session required at this point. hive.execution.engine=mr.
2015-09-11 12:55:48,570 WARN  [HiveServer2-Handler-Pool: Thread-19]: security.UserGroupInformation (UserGroupInformation.java:getGroupNames(1535)) - No groups available for user username
2015-09-11 12:55:48,570 WARN  [HiveServer2-Handler-Pool: Thread-19]: security.UserGroupInformation (UserGroupInformation.java:getGroupNames(1535)) - No groups available for user username

...........Please let me know the solution

Re: Unable to login to Hive shell.Taking more time and still cannot access.

Contributor
did anyone found a solution to this? I'm getting the same error.
Don't have an account?
Coming from Hortonworks? Activate your account here