Support Questions

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

HiveServer2 may be unavailable

avatar
New Contributor
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/cloudera/parcels/CDH-5.9.1-1.cdh5.9.1.p0.4/jars/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/data/11/yarn/nm/filecache/4718/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
Connecting to xxx/
Connected to: Apache Hive (version 1.1.0-cdh5.9.1)
Driver: Hive JDBC (version 1.1.0-cdh5.9.1)
Transaction isolation: TRANSACTION_REPEATABLE_READ
No rows affected (0.479 seconds)
No rows affected (0.003 seconds)
No rows affected (0.003 seconds)
No rows affected (0.003 seconds)
No rows affected (0.003 seconds)
No rows affected (0.002 seconds)
No rows affected (0.003 seconds)
HS2 may be unavailable, check server status
Error: org.apache.thrift.transport.TTransportException: java.net.SocketException: Broken pipe (state=08S01,code=0)
Closing: 0: xxx/
HS2 may be unavailable, check server status
Error: Error while cleaning up the server resources (state=,code=0)
Intercepting System.exit(2)
Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.Hive2Main], exit code [2]

 

I have series of hive actions in a oozie workflow and I am getting the same error everyday in or the other hive actions. I have attached the logs of the job which failed. Please help me resolve it.

 

Running it on CDH 5.9.1 . Have set following global parameters in workflow.xml as well :

 

hive_server2_session_check_interval=3600000
hive_server2_idle_operation_timeout=86400000
hive_server2_idle_session_timeout=259200000

 

1 ACCEPTED SOLUTION

avatar
Super Guru
In that case, my suggestion is to check for HS2 logs to try to find any queries that takes time to compile. Because HS2 currently can only compile one query at a time, if you have a query that takes a while to compile, it will lock out HS2 and other requests will have to wait.

I am not sure if it is the cause, but worth to check the HS2 log. Look for the following example:

Completed compiling command(queryId=hive_20170227192424_ee0c5216-bef5-456a-934e-212aabe55b75); Time taken: 0.191 seconds

and check if any Time taken values are too big around the time when issue happens.

View solution in original post

3 REPLIES 3

avatar
Super Guru

Hi ,

 

The error message suggested that HS2 was not running, have you confirmed by connecting from beeline to make sure that you can run queries through the HS2?

avatar
New Contributor
Hi Eric

Yes I am able to connect to HS2. Moreover, most of my queries are dealing with huge data so the execution time is also high. Most of the days it fails in on or the other hive actions.

Also, other jobs including hive action are working fine.

avatar
Super Guru
In that case, my suggestion is to check for HS2 logs to try to find any queries that takes time to compile. Because HS2 currently can only compile one query at a time, if you have a query that takes a while to compile, it will lock out HS2 and other requests will have to wait.

I am not sure if it is the cause, but worth to check the HS2 log. Look for the following example:

Completed compiling command(queryId=hive_20170227192424_ee0c5216-bef5-456a-934e-212aabe55b75); Time taken: 0.191 seconds

and check if any Time taken values are too big around the time when issue happens.