Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

hive error connection

avatar
Master Collaborator

hi:

I have restarte hive service and i cant use hive now, here the strange error, any suggestions?? i cant connect now to mysql hive database

Connection failed on host lnxbig05.cajarural.gcr:10000 (Traceback (most recent call last): File "/var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_thrift_port.py", line 200, in execute check_command_timeout=int(check_command_timeout)) File "/usr/lib/python2.6/site-packages/resource_management/libraries/functions/hive_check.py", line 68, in check_thrift_port_sasl timeout=check_command_timeout File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 154, in __init__ self.env.run() File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 158, in run self.run_action(resource, action) File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 121, in run_action provider_action() File "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py", line 238, in action_run tries=self.resource.tries, try_sleep=self.resource.try_sleep) File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 70, in inner result = function(command, **kwargs) File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 92, in checked_call tries=tries, try_sleep=try_sleep) File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 140, in _call_wrapper result = _call(command, **kwargs_copy) File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 285, in _call raise ExecuteTimeoutException(err_msg) ExecuteTimeoutException: Execution of 'ambari-sudo.sh su ambari-qa -l -s /bin/bash -c 'export PATH='"'"'/usr/sbin:/sbin:/usr/lib/ambari-server/*:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/dmexpress/bin:/home/bigotes/bin:/usr/dmexpress/bin:/var/lib/ambari-agent:/bin/:/usr/bin/:/usr/lib/hive/bin/:/usr/sbin/'"'"' ; ! beeline -u '"'"'jdbc:hive2://HOSTNAME:10000/;transportMode=binary'"'"' -e '"'"''"'"' 2>&1| awk '"'"'{print}'"'"'|grep -i -e '"'"'Connection refused'"'"' -e '"'"'Invalid URL'"'"''' was killed due timeout after 60 seconds )

thanks

1 ACCEPTED SOLUTION

avatar
Super Guru

Hi @Roberto Sancho

Can you please run this command and share the output?

grep -iR org.apache.hadoop.hive.shims.HadoopShims /usr/hdp/current/hive-server2/

View solution in original post

14 REPLIES 14

avatar

@Roberto Sancho

re-start hiveserver2 & metastore services and give a try again?

avatar
Super Collaborator

Connection failed on host lnxbig05.cajarural.gcr:10000... This says its unable to connect to the hiveserver2 process . Please check if you hiveserver2 service is up and running .

avatar
Master Collaborator

Hi: after restarted it, the same error:

 H110 Unable to submit statement. java.lang.NoSuchMethodError: org.apache.hadoop.hive.shims.HadoopShims.setHadoopSessionContext(Ljava/lang/String;)V [ERROR_STATUS]

I think that i lost some path or jar, but i just restart the process.

avatar
Master Collaborator

HI:

Hi , hibeserver is running

hive      9704  3.3  0.7 2379760 376784 ?      Sl   18:10   0:33 /usr/jdk64/jdk1.8.0_40/bin/java -Xmx8192m -Dhdp.version=2.4.0.0-169 -Djava.net.preferIPv4Stack=true -Dhdp.version=2.4.0.0-169 -Dhadoop.log.dir=/var/log/hadoop/hive -Dhadoop.log.file=hadoop.log -Dhadoop.home.dir=/usr/hdp/2.4.0.0-169/hadoop -Dhadoop.id.str=hive -Dhadoop.root.logger=INFO,console -Djava.library.path=:/usr/hdp/current/hadoop-client/lib/native/Linux-amd64-64:/usr/hdp/2.4.0.0-169/hadoop/lib/native -Dhadoop.policy.file=hadoop-policy.xml -Djava.net.preferIPv4Stack=true -Xmx8192m -Xmx512m -Dhadoop.security.logger=INFO,NullAppender org.apache.hadoop.util.RunJar /usr/hdp/2.4.0.0-169/hive/lib/hive-service-1.2.1000.2.4.0.0-169.jar org.apache.hive.service.server.HiveServer2 --hiveconf hive.aux.jars.path=file:///usr/hdp/current/hive-webhcat/share/hcatalog/hive-hcatalog-core.jar -hiveconf hive.metastore.uris=  -hiveconf hive.log.file=hiveserver2.log -hiveconf hive.log.dir=/var/log/hive


avatar
Master Collaborator

hi:

i think i need this jar, but i dont knwo why

hive-shims-0.11.0.jar

avatar

Can you run below two commands on your server where hs2 and metastore are running and paste the output?

ps -ef | grep hiveserver2

ps -ef | grep metastore

avatar
Super Guru

Hi @Roberto Sancho

Can you please run this command and share the output?

grep -iR org.apache.hadoop.hive.shims.HadoopShims /usr/hdp/current/hive-server2/

avatar
Super Guru

@Roberto Sancho

Did you added any external jar recently inside cluster or specifically in hive?.

avatar
Super Guru

@Roberto Sancho

Great.!! :), please accept the answer which helped you to close this thread.